ci: fix the cargo-public-api double install#2793
Merged
Merged
Conversation
blackmwk
approved these changes
Jul 10, 2026
blackmwk
left a comment
Contributor
There was a problem hiding this comment.
Thanks @abnobdoss for this fix!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
What changes are included in this PR?
The job installs cargo-public-api twice per run.
taiki-e/install-actionhas no prebuilt binary for it, so that step falls back to cargo-binstall and compiles the latest release from source (currently v0.52.0, ~76s).make check-public-apithen compiles the pinned v0.51.0 from source again (~72s) because the installed version doesn't match the pin. And since the binary on disk never matches the pin at cache-save time, rust-cache never shortcuts either install.This deletes the install-action step. The Makefile's
cargo install --locked cargo-public-api@0.51.0becomes the only install; on warm runs rust-cache restores the pinned binary and the install is a no-op. 0.51.0 is the version the checked-inpublic-api.txtfiles were generated with, so the check itself is unchanged.The Makefile also stops computing
PUBLIC_API_CRATESwith$(shell cargo metadata ...)at parse time, which made everymakeinvocation pay a cargo metadata call. The list is now evaluated inside the two recipes that use it, with identical command and output.Warm Public API job time on a fork: 4:03 to 1:36.
Are these changes tested?
make check-public-apiandmake generate-public-apiexpand to the same commands as before.