Skip to content

ci: cache Rust deps and enable sccache for Tauri release builds - #33

Merged
tnunamak merged 1 commit into
mainfrom
cifix/item1-item4-rust-cache
Aug 21, 2026
Merged

ci: cache Rust deps and enable sccache for Tauri release builds#33
tnunamak merged 1 commit into
mainfrom
cifix/item1-item4-rust-cache

Conversation

@tnunamak

Copy link
Copy Markdown
Contributor

Summary

  • release.yml's 4-platform Tauri matrix (macOS-arm, macOS-intel, Linux, Windows) had no Rust/Cargo cache — every pull_request rebuilt all Rust dependencies from scratch. The macOS-intel and Windows legs cost ~1200-1500s median per run in Build unsigned Tauri app alone (see CI speed report, item ci: update all GitHub Actions to latest and pin to commit SHAs #1).
  • Adds Swatinem/rust-cache@v2.9.2 keyed on matrix.target, scoped to src-tauri -> target.
  • Layers mozilla-actions/sccache-action@v0.0.11 on top via RUSTC_WRAPPER/SCCACHE_GHA_ENABLED, for compiler-level cache reuse on partial-invalidation builds (e.g. a single crate version bump) that a dependency cache alone wouldn't help (item chore: add Apache-2.0 SPDX license headers #4).

No job/step names changed, no triggers changed, no gate semantics changed — purely additive caching steps. Only required status check on this branch is DCO.

Test plan

  • YAML validated
  • CI green on this PR (first run — cold cache, establishes baseline)
  • Trigger a second run post-merge and confirm a cache HIT for at least one matrix leg

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 <tnunamak@gmail.com>
@tnunamak
tnunamak merged commit 9766c77 into main Aug 21, 2026
7 checks passed
@tnunamak
tnunamak deleted the cifix/item1-item4-rust-cache branch August 21, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant