Use rust-cache for CI Rust dependency caching#73
Conversation
|
Welcome, new contributor! Please make sure you've read our contributing guide, as well as our policy regarding AI usage, and we look forward to reviewing your pull request shortly |
97f227a to
8a160e5
Compare
|
Independent opinion: it might not be worth taking in a third party dependency to replace 40 explicit cache lines, especially for a critical system. |
|
That’s a fair concern. As I mentioned in the PR description, this does more than replace the existing cache steps. It caches So the value is not just fewer lines. It provides a Rust-specific caching strategy through an action already used by projects such as tokio, ruff, and uv. Since this workflow already relies on other third-party actions, I thought adding this one would be consistent with the existing configuration. |
This replaces the hand-written
actions/cachesteps withSwatinem/rust-cache@v2.The previous workflow cached
~/.cargo/registry,~/.cargo/git, andtargetseparately.rust-cachehandles those Rust cache paths directly, while also taking care of Rust-specific cache keys, pruning stale build artifacts, and settingCARGO_INCREMENTAL=0for CI builds.ref: https://github.com/swatinem/rust-cache