Skip to content

Commit

Permalink
feat: speed up flutter ci
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasXu0 committed Sep 25, 2024
1 parent 9b7d38b commit 387fd5c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 16 deletions.
35 changes: 25 additions & 10 deletions .github/actions/flutter_integration_test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ runs:
- name: Checkout source code
uses: actions/checkout@v4

- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-rust-
- name: Install Rust toolchain
id: rust_toolchain
uses: actions-rs/toolchain@v1
Expand All @@ -42,22 +53,27 @@ runs:
flutter-version: ${{ inputs.flutter_version }}
cache: true

- uses: taiki-e/install-action@v2
- name: Cache Flutter dependencies
uses: actions/cache@v3
with:
path: ${{ env.PUB_CACHE }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Install cargo-make
uses: taiki-e/install-action@v2
with:
tool: cargo-make@${{ inputs.cargo_make_version }}

- name: Install prerequisites
working-directory: frontend
- name: Install system dependencies
run: |
sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
sudo apt-get update
sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev keybinder-3.0 libnotify-dev network-manager libmpv-dev mpv
sudo apt-get install -y curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev keybinder-3.0 libnotify-dev network-manager libmpv-dev mpv
shell: bash

- name: Enable Flutter Desktop
run: |
flutter config --enable-linux-desktop
run: flutter config --enable-linux-desktop
shell: bash

- uses: actions/download-artifact@v4
Expand All @@ -73,6 +89,5 @@ runs:
run: |
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
sudo apt-get install network-manager
flutter test ${{ inputs.test_path }} -d Linux --coverage
shell: bash
shell: bash
12 changes: 6 additions & 6 deletions frontend/appflowy_flutter/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1559,10 +1559,10 @@ packages:
dependency: transitive
description:
name: platform
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
url: "https://pub.dev"
source: hosted
version: "3.1.4"
version: "3.1.5"
plugin_platform_interface:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -1989,10 +1989,10 @@ packages:
dependency: transitive
description:
name: string_scanner
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.3.0"
string_validator:
dependency: "direct main"
description:
Expand Down Expand Up @@ -2311,10 +2311,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
url: "https://pub.dev"
source: hosted
version: "14.2.1"
version: "14.2.5"
watcher:
dependency: transitive
description:
Expand Down

0 comments on commit 387fd5c

Please sign in to comment.