ci: clean workspace artifacts before cache upload#385
Merged
Conversation
Run `cargo clean --workspace` at the end of each cached job so that only compiled dependencies are cached, not the workspace's own build artifacts. This reduces cache size and upload/download time while keeping the expensive dependency compilation cached. https://claude.ai/code/session_014NgdhJMEQSguQ8yXAuTfnq
Remove the `if: matrix.os != 'macos-latest'` condition from the clean steps in test.yaml and clippy.yaml since it's unnecessary, and add `continue-on-error: true` to all clean steps so a failure doesn't fail the CI. https://claude.ai/code/session_014NgdhJMEQSguQ8yXAuTfnq
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a final CI step intended to reduce cache size by cleaning Cargo workspace build artifacts before GitHub Actions cache upload.
Changes:
- Add
cargo clean --workspaceas a final step in the Test workflow. - Add
cargo clean --workspaceas a final step in the Clippy workflow. - Add
cargo clean --workspaceas a final step in the Benchmark and Deploy workflows.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .github/workflows/test.yaml | Adds a trailing cargo clean --workspace step after tests complete. |
| .github/workflows/clippy.yaml | Adds a trailing cargo clean --workspace step after clippy runs. |
| .github/workflows/benchmark.yaml | Adds a trailing cargo clean --workspace step after benchmark/report steps. |
| .github/workflows/deploy.yaml | Adds a trailing cargo clean --workspace step at the end of the benchmark job. |
Performance Regression Reportscommit: a9c1b07 There are no regressions. |
Add `if: always()` to the clean steps so workspace artifacts are trimmed before cache upload even when a prior step fails. https://claude.ai/code/session_014NgdhJMEQSguQ8yXAuTfnq
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.
Adds a
cargo clean --workspacestep to CI workflow files to clean up build artifacts before caching. This helps reduce cache size and ensures cleaner builds in subsequent runs.https://claude.ai/code/session_014NgdhJMEQSguQ8yXAuTfnq