-
Notifications
You must be signed in to change notification settings - Fork 261
ci: add cargo caching to pre-commit workflow #2351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-Authored-By: Jayant Krishnamurthy <jayant@dourolabs.xyz>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth using something like https://github.com/Swatinem/rust-cache which may be able to do more sophisticated caching for us without us having to manage it?
.github/workflows/ci-pre-commit.yml
Outdated
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('.pre-commit-config.yaml') }}-1.82.0-1.73.0-1.66.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any risk if we bump versions of stuff and forget to update here?
- Replace manual cargo caching with Swatinem/rust-cache - Eliminates version management risk - Provides more sophisticated caching behavior Co-Authored-By: Jayant Krishnamurthy <jayant@dourolabs.xyz>
Switching to rust-cache action as suggested. This:
The action automatically uses rustc version and Cargo.lock/Cargo.toml hashes for cache keys, so we don't need to manually maintain version numbers in the cache key. |
Add Rust caching to pre-commit workflow
This PR adds caching for Rust dependencies and build artifacts to speed up pre-commit CI checks. The cache:
Link to Devin run: https://app.devin.ai/sessions/659feaadc2d24d07854347f7ab39d3d5
Requested by: Jayant