-
Notifications
You must be signed in to change notification settings - Fork 47
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
fix: better caching of Rust deps #733
Conversation
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.
Love it
@@ -33,6 +33,13 @@ jobs: | |||
cargo-clippy: | |||
name: Run Clippy checks | |||
runs-on: ubuntu-latest | |||
container: | |||
image: paritytech/ci-unified:bullseye-1.74.0 |
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.
It's out of scope for this PR, but do you think it would be worth changing the image to an environment variable? We have multiple workflow files, and using an environment variable would be less error-prone.
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.
This would need to be a repo-wide variable, which should be updated once we bump our dependencies to a new version, if we want to share it across workflows. I agree it's out of scope, but I cc @ggera to see if there's anything low effort we can do to minimize duplication.
I chored up the CI file by making sure all jobs (minus the
cargo-test
job) use the same approach:docker run
approach only for thecargo-test
job, since the worker still runs out of memory and crashesMain changes
container:
component in all jobs butcargo-test
/usr/local/cargo
path for caching cargo artifacts. This is the path configured by the container itself. Using other paths won't have the expected effect.save-always: true
for the caching of artifacts, since even if, for example a test fails, we still don't want to throw away the compilation work done to run that testtry-runtime
job had a cache configured by it was not caching anything, since we were caching the wrong path. That's fixed by using the same approach all other jobs use.