ci: cache Rust deps and enable sccache for Tauri release builds - #33
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
release.yml's 4-platform Tauri matrix (macOS-arm, macOS-intel, Linux, Windows) had no Rust/Cargo cache — everypull_requestrebuilt all Rust dependencies from scratch. The macOS-intel and Windows legs cost ~1200-1500s median per run inBuild unsigned Tauri appalone (see CI speed report, item ci: update all GitHub Actions to latest and pin to commit SHAs #1).Swatinem/rust-cache@v2.9.2keyed onmatrix.target, scoped tosrc-tauri -> target.mozilla-actions/sccache-action@v0.0.11on top viaRUSTC_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