Repository navigation
ci: keep the rust caches lean and stop rebuilding for the example - #90
Merged
Merged
Conversation
Save rust-cache entries from main only, so pull request copies don't push main's cache out of the 10 GB limit. Turn off setup-rust-toolchain's own cache where rust-cache already runs or nothing compiles. Build with line tables only to shrink the cache. Run the example binary the test build already made instead of recompiling lance-csr with cargo run.
Deploying lance-csr with
|
| Latest commit: |
52e1ea5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fa9a8a56.lance-csr.pages.dev |
| Branch Preview URL: | https://ci-rust-cache.lance-csr.pages.dev |
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.
Why
A Rust test run takes about 4.5 minutes even when the cache works. Some of that time is avoidable, and the cache setup puts the warm cache itself at risk. The repository has used 9.8 GB of GitHub's 10 GB cache limit. When it's full, GitHub deletes the least recently used caches, and if
main's 1.8 GB Rust cache goes, every run builds from scratch.Where a typical run spent its time on
main:lance-csrWhat changed
cargo test --workspaceandcargo run -p lance-csrturn on different sets of crate features, so the old step compiledlance-csra second time.mainsaves caches. Every rust-cache step now setssave-if: ${{ github.ref == 'refs/heads/main' }}. Pull requests still restoremain's cache, but they no longer save their own copies (about 4 GB for PRs 82 and 83).setup-rust-toolchainsaves a cache of its own by default. Theformatjob stored 130 MB per branch that nothing used, and the Python test job was caching twice. Both now setcache: false.-C debuginfo=line-tables-onlyinstead of-C debuginfo=1. Backtraces keep file and line numbers. The clippy job is unchanged because it doesn't generate code.The flag change gives these jobs a new cache key. This PR's run and the first run on
mainafter merging will build from scratch, and later runs restore the new, smaller cache.Validation
actionlintpasses on the three edited workflows.cargo test --workspace --no-runcreatestarget/debug/examples/embedded_query, which the new step runs.mainrun after merging. This PR's CI will confirm the example step no longer printsCompiling.sccacheentries from thev0.4.0tag build (about 1 GB) can be deleted by hand.🤖 Generated with Claude Code