diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index d00a1ba2..1e679b8f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -297,11 +297,26 @@ jobs: uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1 with: toolchain: stable + # Disable this action's built-in rust-cache so the explicit + # Swatinem/rust-cache below is the single cache (it's the one + # configured with cache-workspace-crates for the vendored tauri fork). + cache: false - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 with: - key: tauri-cargo + # cache-workspace-crates caches the path/workspace crates too: the + # vendored tauri fork (packages/tauri, packages/tauri-plugins, wired + # via [patch.crates-io]) and the local src-tauri/plugins/*. These are + # workspace members that rust-cache prunes by default, so the whole + # tauri stack — plus every crates.io plugin that depends on the + # patched `tauri` — rebuilt on every run. They change only + # sporadically (pinned submodules), so caching them is a big win. + # The key is bumped (-ws) so the old workspace-crate-less cache is + # invalidated and the next run repopulates it with the workspace + # crates included. + key: tauri-cargo-ws cache-all-crates: 'true' + cache-workspace-crates: 'true' - name: Cache apt packages uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5