Skip to content

Commit 6f1f5b3

Browse files
committed
ci(ci): cache Rust artifacts in backend-tests and build jobs
Add Swatinem/rust-cache@v2.8.1 (SHA-pinned) after the Rust toolchain install step in both macOS jobs that actually compile the Tauri crate: backend-tests (cargo test via pnpm run health:repo:backend) and build (pnpm tauri build). Skipped security-audit since cargo audit only fetches the advisory DB — no compile benefit. Configuration: - workspaces: src-tauri — cache src-tauri/target not repo root - shared-key: macos-rust — both jobs reuse registry/git caches - cache-on-failure: true — keep cache when a single test regresses Expected impact: ~2-3 min saved per CI run on each of the two macOS jobs after first warm cache, by avoiding full src-tauri/target/ recompile from scratch.
1 parent 25d6f83 commit 6f1f5b3

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,13 @@ jobs:
148148
with:
149149
toolchain: stable
150150

151+
- name: Cache Rust build artifacts
152+
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
153+
with:
154+
workspaces: src-tauri
155+
shared-key: macos-rust
156+
cache-on-failure: true
157+
151158
- name: Run backend health lane
152159
run: pnpm run health:repo:backend
153160

@@ -307,6 +314,13 @@ jobs:
307314
with:
308315
toolchain: stable
309316

317+
- name: Cache Rust build artifacts
318+
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
319+
with:
320+
workspaces: src-tauri
321+
shared-key: macos-rust
322+
cache-on-failure: true
323+
310324
- name: Install dependencies
311325
run: pnpm install --frozen-lockfile
312326

0 commit comments

Comments
 (0)