Skip to content

ci: reduce Rust cache size and duplicate keys - #3150

Closed
fengmk2 wants to merge 1 commit into
mainfrom
fix/reduce-main-rust-caches
Closed

fengmk2 wants to merge 1 commit into
mainfrom
fix/reduce-main-rust-caches

Conversation

@fengmk2

@fengmk2 fengmk2 commented Oct 20, 2026

Copy link
Copy Markdown
Member

Large Rust caches contain useful compiled dependencies. Default compression and unused toolchains from runner images increase storage.

Use Zstandard level 9 for Rust caches. Keep the active workspace toolchain and remove unused toolchains before caching. Normalize default CARGO_HOME and RUSTUP_HOME values, and preserve custom paths.

The recorded measurements show these reductions for the same Cargo registry, Git, and target payloads:

Payload Before After Reduction
Linux lint 490 MiB 436 MiB 11%
Linux tests 807 MiB 673 MiB 17%
macOS tests 1,075 MiB 883 MiB 18%

These three payloads save about 380 MiB. Compression adds 4–16 seconds when saving a new archive. The restored files stay unchanged.

Key normalization should also prevent the observed 748 MiB duplicate Windows CLI dependency archive across GitHub and Namespace runners. Existing archives remain until cleanup or eviction.

@fengmk2
fengmk2 force-pushed the fix/reduce-main-rust-caches branch from a53245a to d9bbadb Compare October 20, 2026 16:08
@fengmk2 fengmk2 closed this Oct 20, 2026
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