Skip to content

Commit 4af6ef9

Browse files
committed
Make the check-msrv jobs more robust and documented
- Split into more steps, logically related. - Identify both toolchains in the step name. - Name the `just` step so it's clear what it does. - Add a TODO for switching to `--minimal-versions`. - Check that `cargo` didn't have to further modify `Cargo.toml`. - Capitalize `RUST_VERSION`, as it is an environment variable.
1 parent 510847b commit 4af6ef9

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/msrv.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
env:
3232
# dictated by `firefox` to support the `helix` editor, but now probably effectively be controlled by `jiff`, which also aligns with `regex`.
3333
# IMPORTANT: adjust etc/msrv-badge.svg as well
34-
rust_version: 1.75.0
34+
RUST_VERSION: 1.75.0
3535

3636
defaults:
3737
run:
@@ -41,8 +41,15 @@ jobs:
4141
steps:
4242
- uses: actions/checkout@v4
4343
- uses: extractions/setup-just@v3
44-
- run: |
45-
rustup toolchain install ${{ env.rust_version }} nightly --profile minimal --no-self-update
46-
rustup default ${{ env.rust_version }}
47-
cargo +nightly update -Zminimal-versions
48-
- run: just ci-check-msrv
44+
- name: Set up ${{ env.RUST_VERSION }} (MSRV) and nightly toolchains
45+
run: |
46+
rustup toolchain install ${{ env.RUST_VERSION }} nightly --profile minimal --no-self-update
47+
rustup default ${{ env.RUST_VERSION }}
48+
- name: Downgrade locked dependencies to lowest allowed versions
49+
run: |
50+
cargo +nightly update -Zminimal-versions # TODO(msrv): Use non-`-Z` way when available.
51+
git add Cargo.lock # Stage for a later `git diff` check.
52+
- name: Run some `cargo check` commands on `gix`
53+
run: just ci-check-msrv
54+
- name: Check `cargo` didn't have to change the versions
55+
run: git diff --exit-code -- Cargo.lock

0 commit comments

Comments
 (0)