-
-
Notifications
You must be signed in to change notification settings - Fork 80
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 generated rustdoc for registry baselines #339
Cache generated rustdoc for registry baselines #339
Conversation
5941b3a
to
3bfaf17
Compare
I've tested it locally on the |
@thomaseizinger if I were to release 0.18 with this caching change soon, when would be the best time for you? I'd love to have you onboard to test it in "the real world" as soon as it comes out, in case something doesn't behave quite as well as we had hoped. |
We can test it as soon as there is a binary. Why don't we release |
I am gonna be on NZ timezone for the next two weeks. With a pre-release, I can adjust our CI to create a cache on master and use that on PR workflow runs and play around what happens when we nuke the cache etc. |
@obi1kenobi it would be good to first merge #340 before creating the alpha release, since it touched some of this PR's code. |
The latest release (v0.18) of `cargo semver-checks` includes a [feature](obi1kenobi/cargo-semver-checks#339) where the rustdoc JSON files for registry baselines is cached in `target/semver-checks/cache`. The rustdoc JSON files for released crates never changes as the source code on crates.io cannot be changed once a version is published. Thus, it is unnecessary to generate that JSON on every CI run. We extract a separate action that installs `cargo semver-checks` for us and also sets up a cache. The cache is scoped to released version of the crate, meaning it automatically invalidates once we publish a new version. This speeds up the `cargo semver-checks` step by 50% which is ~ 1 minute per job. Pull-Request: #3469.
This implements the suggestion discussion in #214. It turned out surprisingly simple :)