ci: drive CI with rust-toolchain.yml, add MSRV adjustment automation #2228
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.
On top of #2229. This is essentially a port of 0xMiden/crypto#547 on this repo.
Copying the PR description from there.
This adds a CI job (locally runnable) that will check the MSRV of a PR is set correctly on a crate-by-crate basis. If the MSRV is set incorrectly, due to e.g. some feature being used, it will compute the correct MSRV for that crate and indicate it in its error.
The script's error message can be emulated by manually changing the MSRV to an incorrect version (e.g. "1.87") and running it (
./scripts/check-msrv.sh
).Sample output (click to unfold)
This further adds a rust-toolchain file that will make CI tooling (and local rustup dev envs) follow the latest stable as it updates.
As a consequence, the following behaviors can change from being proactive to being on-demand:
As a side effect, we can expect the MSRV setting to (over time) accurately reflect what we can compile with. Right now, the project or any of its dependents cannot be compiled with Rust 1.88 (and there is not technical reason to impose this restriction).
The local difference is this project has an MSRV of 1.90 (and the current PR does not modify it). The toolchain file bumps CI to 1.90.