-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
Use a standard Cargo caching action #17169
Conversation
I cargo-culted this from Toolchain's internal repo, so let me know if this is plain wrong. |
985c0c6
to
ae5e5af
Compare
@@ -227,28 +227,6 @@ def install_rustup() -> Step: | |||
} | |||
|
|||
|
|||
def rust_caches() -> Sequence[Step]: |
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 was unused, a relic from before we moved it under Helper.
So I don't think this is right - that just installs the cargo-trim package, but doesn't invoke |
Yeah, I don't think this is the right way to go about this at all. Will retool. |
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 migrating to an existing action for this? Maybe https://github.com/marketplace/actions/rust-cache or https://github.com/marketplace/actions/rust-cargo ?
Probably? I'll give it a shot |
3e2f42d
to
6f8457b
Compare
922c006
to
a23fba6
Compare
OK, this is now ready for re-review, thanks! |
PS I have verified that it did not nuke rustup from the self-hosted runners... |
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!
}, | ||
}, | ||
{ | ||
"name": "Cache Cargo", | ||
"uses": "actions/cache@v3", | ||
"uses": "benjyw/rust-cache@461b9f8eee66b575bce78977bf649b8b7a8d53f1", |
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.
Should probably fork this to the pantsbuild
org and tag it.
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.
My hope is to upstream it, but that is the fallback.
It will automatically use correct keys and take care of trimming the cache entries. However, we first had to patch that action to not wipe ~/.cargo/bin, see Swatinem/rust-cache@master...benjyw:rust-cache:master I will send that patch, or similar, upstream for consideration, so that in the future we can use the standard action instead of the forked one.
Cherrypicks of #17218, #17169, #17194, #17172, #16806, #16796. Since this branch is still being released from, we want it to benefit from recent and upcoming CI improvements. Cherry-picking them all in one PR saves on CI resources and time. And since no Pants source code is modified, only CI config, it seems fine to not cherry-pick separately.
It will automatically use correct keys and take care of trimming the cache entries.
However, we first had to patch that action to not wipe ~/.cargo/bin, see
Swatinem/rust-cache@master...benjyw:rust-cache:master
I will send that patch, or similar, upstream for consideration, so that in the future we can
use the standard action instead of the forked one.