From 6d13ba4958381ea9cc325f034805a3fc63a403b6 Mon Sep 17 00:00:00 2001 From: Tim Nunamaker Date: Fri, 21 Aug 2026 16:23:20 -0500 Subject: [PATCH] ci: cache Rust deps and enable sccache for Tauri release builds release.yml's 4-platform Tauri matrix rebuilt every Rust dependency from scratch on every pull_request, with no actions/cache or Swatinem/rust-cache step present. The macOS-intel and Windows legs alone cost ~1200-1500s median per run. Add Swatinem/rust-cache keyed on matrix.target to cache ~/.cargo and src-tauri/target, and layer sccache on top via RUSTC_WRAPPER + SCCACHE_GHA_ENABLED so partial-invalidation builds (e.g. a single crate bump) also get compiler-level cache reuse. Signed-off-by: Tim Nunamaker --- .github/workflows/release.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2538515..8343e7f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,8 @@ jobs: env: APPLE_CERTIFICATE_AVAILABLE: ${{ github.event_name == 'release' && secrets.APPLE_BUILD_CERTIFICATE_BASE64 != '' }} APPLE_SIGNING_AVAILABLE: ${{ github.event_name == 'release' && secrets.APPLE_BUILD_CERTIFICATE_BASE64 != '' && secrets.APPLE_SIGNING_IDENTITY != '' }} + RUSTC_WRAPPER: sccache + SCCACHE_GHA_ENABLED: "true" strategy: fail-fast: false matrix: @@ -97,6 +99,15 @@ jobs: toolchain: stable targets: ${{ matrix.target }} + - name: Cache Rust dependencies and build output + uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 + with: + workspaces: src-tauri -> target + key: ${{ matrix.target }} + + - name: Setup sccache + uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11 + - name: Stage Node.js runtime sidecar shell: bash run: node scripts/stage-pdpp-node.mjs --target "${{ matrix.target }}" --expected-platform "${{ matrix.node_platform }}" --expected-arch "${{ matrix.node_arch }}"