-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[CI] Use rust-cache@v2 when building on CI #13033
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
Comments
Can I suggest Even if that's decided against, I'm still interested in working on this issue as a whole. Just give me a 👍 to get started :) |
If you think that |
Btw, if you open a PR, remember to assign it to me by writing "r? @blyxyas" as the last line of the PR description. |
Please keep me in the loop with CI changes. I'm usually auto-assigned to PRs touching those files, if you don't add an explicit |
It's been a few months since I said this, and I no longer believe As a side note, when building in CI, I highly recommend setting |
Note that since Clippy uses GitHub merge queues, any caching will be mostly useless, because only multiple pushes to the same PR will be cached. To apply caching in the merge queue itself, or on first pushes to PRs, you would need to run duplicated CI on the |
Good to know! The repos I maintain run CI on |
We din't really need to update it in each PR, just in dependency changes (which are pretty rare). Dependencies like askama or toml (and potentially clippy_dev) really could be optimized because we are downloading and building the same 500Kb of code again and again for each PR. I wasn't talking about caching the clippy project itself, I don't think that that's worth it. |
We're using GitHub merge queue. There the commit is tested on CI while on the temporary merge-queue branch. When this commit is then merged into master, it will have the same commit hash, so there won't be a CI run for it on Caching merge-queue CI runs can also be problematic, should another workflow fail, the PR not get merged and the cache of a faster workflow uploaded. |
I don't think that there are issues with updating the cache on failed builds, by default the cache isn't even written on failure I think.
There's no need to do it, but if you want to get caching working with merge queues, clippy could run CI on master. It would kind of needlessly duplicate everything though. |
Description
We're currently only using cache on the
lintcheck.yml
workflow. This means that we're downloading and building the same crates a lot. We currently use about 50s on that Build step. About a third of the CI time.We should use the
rust-cache
Action for this purpose.Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: