diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 37f902fc3be..c750ef191c2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -140,6 +140,9 @@ jobs: - name: Cache cargo registry uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7 + - name: Setup sccache + uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 + - name: Run cargo fmt working-directory: ./apps/desktop/desktop_native run: cargo +nightly fmt --check @@ -149,6 +152,7 @@ jobs: run: cargo clippy --all-features --tests env: RUSTFLAGS: "-D warnings" + RUSTC_WRAPPER: sccache - name: Cache cargo-sort id: cache-cargo-sort diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bb91dcba227..2f876fd5da3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -117,9 +117,14 @@ jobs: with: workspaces: "apps/desktop/desktop_native -> target" + - name: Setup sccache + uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 + - name: Build working-directory: ./apps/desktop/desktop_native run: cargo build + env: + RUSTC_WRAPPER: sccache - name: Test Ubuntu if: ${{ matrix.os=='ubuntu-22.04' }} @@ -131,16 +136,22 @@ jobs: eval "$(printf '\n' | gnome-keyring-daemon --unlock)" eval "$(printf '\n' | /usr/bin/gnome-keyring-daemon --start)" cargo test -- --test-threads=1 + env: + RUSTC_WRAPPER: sccache - name: Test macOS if: ${{ matrix.os=='macos-14' }} working-directory: ./apps/desktop/desktop_native run: cargo test -- --test-threads=1 + env: + RUSTC_WRAPPER: sccache - name: Test Windows if: ${{ matrix.os=='windows-2022'}} working-directory: ./apps/desktop/desktop_native run: cargo test --workspace --exclude=desktop_napi -- --test-threads=1 + env: + RUSTC_WRAPPER: sccache rust-coverage: name: Rust Coverage