-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Cache lintcheck binary in ci #12986
Cache lintcheck binary in ci #12986
Conversation
uses: actions/cache@v4 | ||
with: | ||
path: target/debug/lintcheck | ||
key: lintcheck-bin-${{ hashfiles('lintcheck/**') }} |
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 might fail, when we update our toolchain. Can you push a commit, where you update the rust-toolchain
file by a day (this hopefully doesn't break anything else due to rustc changes)? If that breaks this caching action, we might also need to put the rust version in this hash.
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.
https://github.com/rust-lang/rust-clippy/actions/runs/9645498686
The lintcheck part worked, it should be fine for the lintcheck bin to be built by whatever toolchain as it doesn't use any rustc internals
Diagnostics pointing to std source changing makes sense, might be able to trim those paths also though I'm not sure why it's in /rustc/HASH
instead of the toolchains dir
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.
Thanks for checking!
Trimming those paths would be good I think. Otherwise, this might be shown in every PR that is not based on the most recent sync.
Changes LGTM overall, except for #12986 (comment). Thanks for in-cooperating the artifacts suggestion! |
31b9755
to
2194304
Compare
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.
Trimming the rustc/HASH
path isn't a blocker for this PR. But if you want you can also address this in this PR. r=me if you want to push this to a different PR.
Since I don't know where it's coming from yet @bors r=flip1995 |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Always trims ~40s off the
diff
job as it no longer needs to install the rust toolchain or compile lintcheck. Saves a further ~20s for thebase
/head
jobs when the cache is warmIt now uses artifacts for restoring the JSON between jobs as per #10398 (comment), cc @flip1995
The lintcheck changes are to make
./target/debug/lintcheck
work, runningcargo-clippy
/clippy-driver
directly doesn't work withoutLD_LIBRARY_PATH
/etc being set which is currently being done bycargo run
. By merging the--recursive
and normal cases to both go via regularcargo check
we can have Cargo set up the environment for usr? @xFrednet
changelog: none