-
-
Notifications
You must be signed in to change notification settings - Fork 602
Description
I think we should heavily optimize our CI speeds and GitHub Actions storage usage by migrating our manual actions/cache setups exclusively to the industry-standard Swatinem/rust-cache action.
Currently, across our massive .github/workflows/rust.yml workflow, we manually configure actions/cache nearly 15 different times. While this works dynamically, the barebones actions/cache simply zips the massive target/ directory unconditionally. Over time, obsolete compilation garbage accumulates deeply in there, fiercely bloating our GitHub Cache storage quotas towards the 10GB limit before evictions occur.
We should replace all occurrences of actions/cache configured for Cargo with Swatinem/rust-cache@v2. This action is specifically built to maintain Cargo build systems. Not only does it automatically derive robust, granular cache keys, but more importantly, it natively executes cargo-sweep to strip out unused, obsolete compiled artifacts from the target/ directory before zipping and caching it to GitHub.
This guarantees our cache footprint remains incredibly tiny, lightning fast, and strategically ensures we proactively stay clear of GitHub's storage limit!