Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
chore: speed up ci by respecting the cargo deps cache
Binlogo2fddbce18cd2
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yamlindex 46df373824..515b3af226 100644--- a/.github/workflows/ci.yaml+++ b/.github/workflows/ci.yaml@@ -3,11 +3,11 @@ name: CIon:push:branches:- - 'main'-+ - "main"+pull_request:branches:- - 'main'+ - "main"jobs:build:@@ -23,36 +23,37 @@ jobs:steps:- uses: actions/checkout@v2-+- id: rust_toolchainuses: actions-rs/toolchain@v1with:- toolchain: 'stable-2022-01-20'-+ toolchain: "stable-2022-01-20"+- id: flutteruses: subosito/flutter-action@v2with:- channel: 'stable'+ channel: "stable"cache: true- flutter-version: '3.0.5'+ flutter-version: "3.0.5"- name: Cache Cargo+ id: cache-cargouses: actions/cache@v2- with:+ with:path: |~/.cargokey: ${{ runner.os }}-cargo-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}- name: Cache Rustuses: actions/cache@v2- with:+ with:path: |frontend/rust-lib/targetshared-lib/target- key: ${{ runner.os }}-rust-rust-lib-share-lib-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}+ key: ${{ runner.os }}-rust-rust-lib-share-lib-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}- name: Setup Environment- run: |+ run: |if [ "$RUNNER_OS" == "Linux" ]; thensudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pubsudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list@@ -63,11 +64,16 @@ jobs:fishell: bash- - name: Deps+ - if: steps.cache-cargo.outputs.cache-hit != 'true'+ name: Depsworking-directory: frontendrun: |cargo install cargo-makecargo install duckscript_cli++ - name: Cargo make flowy_dev+ working-directory: frontend+ run: |cargo make flowy_dev- name: Config Flutterdiff --git a/.github/workflows/dart_lint.yml b/.github/workflows/dart_lint.ymlindex 3ff87dc680..251848fb31 100644--- a/.github/workflows/dart_lint.yml+++ b/.github/workflows/dart_lint.yml@@ -7,14 +7,14 @@ name: Flutter linton:push:- branches: [ main ]+ branches: [main]pull_request:- branches: [ main ]+ branches: [main]env:CARGO_TERM_COLOR: always-jobs:+jobs:flutter-analyze:name: flutter analyzeruns-on: ubuntu-latest@@ -23,16 +23,38 @@ jobs:uses: actions/checkout@v2- uses: subosito/flutter-action@v1with:- flutter-version: '3.0.5'+ flutter-version: "3.0.5"channel: "stable"- uses: actions-rs/toolchain@v1with:- toolchain: 'stable-2022-01-20'+ toolchain: "stable-2022-01-20"- - name: Rust Deps+ - name: Cache Cargo+ id: cache-cargo+ uses: actions/cache@v2+ with:+ path: |+ ~/.cargo+ key: ${{ runner.os }}-cargo-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}++ - name: Cache Rust+ id: cache-rust-target+ uses: actions/cache@v2+ with:+ path: |+ frontend/rust-lib/target+ shared-lib/target+ key: ${{ runner.os }}-rust-rust-lib-share-lib-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}++ - if: steps.cache-cargo.outputs.cache-hit != 'true'+ name: Rust Depsworking-directory: frontendrun: |cargo install cargo-make++ - name: Cargo make flowy dev+ working-directory: frontend+ run: |cargo make flowy_dev- name: Flutter Deps@@ -53,4 +75,3 @@ jobs:- name: Run Flutter Analyzerworking-directory: frontend/app_flowyrun: flutter analyze-diff --git a/.github/workflows/dart_test.yml b/.github/workflows/dart_test.ymlindex e2a858999c..3ff581c2a3 100644--- a/.github/workflows/dart_test.yml+++ b/.github/workflows/dart_test.yml@@ -3,12 +3,12 @@ name: Unit test(Flutter)on:push:branches:- - 'main'-+ - "main"+pull_request:branches:- - 'main'- - 'feat/flowy_editor'+ - "main"+ - "feat/flowy_editor"env:CARGO_TERM_COLOR: always@@ -18,42 +18,49 @@ jobs:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v2-+- uses: actions-rs/toolchain@v1with:- toolchain: 'stable-2022-01-20'-+ toolchain: "stable-2022-01-20"+- uses: subosito/flutter-action@v2with:- channel: 'stable'- flutter-version: '3.0.5'+ channel: "stable"+ flutter-version: "3.0.5"cache: true- name: Cache Cargouses: actions/cache@v2- with:+ with:path: |~/.cargokey: ${{ runner.os }}-cargo-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}- name: Cache Rust+ id: cache-rust-targetuses: actions/cache@v2- with:+ with:path: |frontend/rust-lib/targetshared-lib/target- key: ${{ runner.os }}-rust-rust-lib-share-lib-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}+ key: ${{ runner.os }}-rust-rust-lib-share-lib-${{ steps.rust_toolchain.outputs.rustc_hash }}-${{ hashFiles('./frontend/rust-lib/Cargo.toml') }}- - name: Flutter Deps- working-directory: frontend/app_flowy- run: |- flutter config --enable-linux-desktop-- - name: Rust Deps+ - if: steps.cache-cargo.outputs.cache-hit != 'true'+ name: Rust Depsworking-directory: frontendrun: |cargo install cargo-make++ - name: Cargo make flowy dev+ working-directory: frontend+ run: |cargo make flowy_dev++ - name: Flutter Deps+ working-directory: frontend/app_flowy+ run: |+ flutter config --enable-linux-desktop+- name: Build FlowySDKworking-directory: frontendrun: |@@ -65,7 +72,7 @@ jobs:flutter packages pub getflutter packages pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations -s en.jsonflutter packages pub run build_runner build --delete-conflicting-outputs-+- name: Run bloc testsworking-directory: frontend/app_flowyrun: |@@ -76,4 +83,4 @@ jobs:working-directory: frontend/app_flowy/packages/flowy_editorrun: |flutter pub get- flutter test\ No newline at end of file+ flutter test