File tree Expand file tree Collapse file tree 5 files changed +26
-14
lines changed Expand file tree Collapse file tree 5 files changed +26
-14
lines changed Original file line number Diff line number Diff line change @@ -433,7 +433,8 @@ jobs:
433433
434434 defaults :
435435 run :
436- shell : bash # Use bash even on Windows, if we ever reenable windows-latest for testing.
436+ # Use `bash` even on Windows, if we ever reenable `windows-latest` for testing.
437+ shell : bash
437438
438439 steps :
439440 - uses : actions/checkout@v4
Original file line number Diff line number Diff line change @@ -29,15 +29,21 @@ jobs:
2929 runs-on : ${{ matrix.os }}
3030
3131 env :
32- # dictated by `firefox` to support the `helix` editor, but now probably effectively be controlled by `jiff`, which also aligns with `regex`.
33- # IMPORTANT: adjust etc/msrv-badge.svg as well
34- rust_version : 1.75.0
32+ # This is dictated by `firefox` to support the `helix` editor, but now probably effectively
33+ # be controlled by `jiff`, which also aligns with `regex`.
34+ # IMPORTANT: When adjusting, change all occurrences in `etc/msrv-badge.svg` as well.
35+ RUST_VERSION : 1.75.0
3536
3637 steps :
3738 - uses : actions/checkout@v4
3839 - uses : extractions/setup-just@v3
39- - run : |
40- rustup toolchain install ${{ env.rust_version }} nightly --profile minimal --no-self-update
41- rustup default ${{ env.rust_version }}
40+ - name : Set up ${{ env.RUST_VERSION }} (MSRV) and nightly toolchains
41+ run : rustup toolchain install ${{ env.RUST_VERSION }} nightly --profile minimal --no-self-update
42+ - name : Set ${{ env.RUST_VERSION }} (MSRV) as default
43+ run : rustup default ${{ env.RUST_VERSION }}
44+ - name : Downgrade locked dependencies to lowest allowed versions
45+ run : |
46+ # TODO(msrv): Use `cargo update --minimal-versions` when `--minimal-versions` is available.
4247 cargo +nightly update -Zminimal-versions
43- - run : just ci-check-msrv
48+ - name : Run some `cargo build` commands on `gix`
49+ run : just ci-check-msrv
Original file line number Diff line number Diff line change @@ -126,8 +126,8 @@ bench-gix-config:
126126
127127check-msrv-on-ci : # # Check the minimal support rust version for currently installed Rust version
128128 rustc --version
129- cargo check --package gix
130- cargo check --package gix --no-default-features --features async-network-client,max-performance
129+ cargo build --locked --package gix
130+ cargo build --locked --package gix --no-default-features --features async-network-client,max-performance
131131
132132# #@ Maintenance
133133
Original file line number Diff line number Diff line change @@ -238,11 +238,16 @@ cross-test-android: (cross-test 'armv7-linux-androideabi' '--no-default-features
238238check-size :
239239 etc/ check-package-size.sh
240240
241- # Check the minimal support Rust version, with the currently installed Rust version
241+ # This assumes the current default toolchain is the Minimal Supported Rust Version and checks
242+ # against it. This is run on CI in `msrv.yml`, after the MSRV toolchain is installed and set as
243+ # default, and after dependencies in `Cargo.lock` are downgraded to the latest MSRV-compatible
244+ # versions. Only if those or similar steps are done first does this work to validate the MSRV.
245+ #
246+ # Check the MSRV, *if* the toolchain is set and `Cargo.lock` is downgraded (used on CI)
242247ci-check-msrv :
243248 rustc --version
244- cargo check -p gix
245- cargo check -p gix --no-default-features --features async-network-client,max-performance
249+ cargo build --locked -p gix
250+ cargo build --locked -p gix --no-default-features --features async-network-client,max-performance
246251
247252# Enter a nix-shell able to build on macOS
248253nix-shell-macos :
You can’t perform that action at this time.
0 commit comments