diff --git a/.github/actions/flutter_build/action.yml b/.github/actions/flutter_build/action.yml index bf1dfb3fd1baa..8b2917029bdf8 100644 --- a/.github/actions/flutter_build/action.yml +++ b/.github/actions/flutter_build/action.yml @@ -36,6 +36,27 @@ runs: flutter-version: ${{ inputs.flutter_version }} cache: true + - name: Install Rust toolchain + id: rust_toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ inputs.rust_toolchain }} + target: ${{ inputs.rust_target }} + override: true + profile: minimal + + - uses: Swatinem/rust-cache@v2 + with: + prefix-key: ${{ inputs.os }} + workspaces: | + frontend/rust-lib + cache-all-crates: true + + - uses: taiki-e/install-action@v2 + if: steps.cache-appflowy-core.outputs.cache-hit != 'true' + with: + tool: cargo-make@${{ inputs.cargo_make_version }}, duckscript_cli + - name: Install prerequisites working-directory: frontend shell: bash @@ -79,16 +100,6 @@ runs: path: frontend/appflowy_backend key: ${{ runner.os }}-appflowy-core-${{ steps.hash_rust_files.outputs.combined_hash }} - - name: Install Rust toolchain - if: steps.cache-appflowy-core.outputs.cache-hit != 'true' - id: rust_toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ inputs.rust_toolchain }} - target: ${{ inputs.rust_target }} - override: true - profile: minimal - - uses: Swatinem/rust-cache@v2 if: steps.cache-appflowy-core.outputs.cache-hit != 'true' with: @@ -97,11 +108,6 @@ runs: frontend/rust-lib cache-all-crates: true - - uses: taiki-e/install-action@v2 - if: steps.cache-appflowy-core.outputs.cache-hit != 'true' - with: - tool: cargo-make@${{ inputs.cargo_make_version }}, duckscript_cli - - name: Build AppFlowy Core if: steps.cache-appflowy-core.outputs.cache-hit != 'true' working-directory: frontend