Unify CI caches (reduce total cache size by 75% ±)#7610
Unify CI caches (reduce total cache size by 75% ±)#7610youknowone merged 3 commits intoRustPython:mainfrom
Conversation
5ce6622 to
50f42b6
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughReplaces the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yaml:
- Around line 578-583: Restore keys use the wrong target triple string; replace
occurrences of "wasm-wasip1" with the correct "wasm32-wasip1" in the restore key
templates (specifically the entries like ${{ runner.os }}-stable-wasm-wasip1-${{
hashFiles('**/Cargo.toml') }}- and ${{ runner.os }}-stable-wasm-wasip1-) so the
key matches the installed target "wasm32-wasip1" and can be restored correctly.
- Around line 177-183: The cargo_check job's restore-keys don't match the cache
save key so caches never restore; update either the save key or the restore-keys
so they share the same prefix: locate the cargo_check job and its restore-keys
and change the restore patterns to include the "cargo-check-" prefix (e.g. start
with cargo-check-${{ runner.os }}-...) to match the save key used when caching,
or alternatively change the save key to use the shared `${{ runner.os
}}-stable-...` family; ensure the restore-keys and the key used in the save step
(the save block) are consistent for the same cache family.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: df8e8056-50c5-4dca-99c6-fc911fe5a66f
📒 Files selected for processing (2)
.github/workflows/ci.yaml.github/workflows/update-caches.yml
50f42b6 to
4bef86e
Compare
ATM we have separate cache for a matrix of
operating systems * job number(the actual number is less, but not by that much). And the cache of all those jobs is 99% the same.This PR makes it so we have a single cache for an
${{ runner.os }}-${{ matrix.target }}-${{ matrix.toolchain }}, which is 3 in total for now. each of them weight 820-900MB.The issue with the large number of cache size is that once we reach our limit GH starts to purge old caches, so sometimes some
cargo checkjobs didn't have a cache hit:/Caches on main

Caches after change (there will be more entries with more invocations):
more targets & toolchains can be easily added if needed
Summary by CodeRabbit