File tree 5 files changed +26
-14
lines changed
5 files changed +26
-14
lines changed Original file line number Diff line number Diff line change @@ -433,7 +433,8 @@ jobs:
433
433
434
434
defaults :
435
435
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
437
438
438
439
steps :
439
440
- uses : actions/checkout@v4
Original file line number Diff line number Diff line change @@ -29,15 +29,21 @@ jobs:
29
29
runs-on : ${{ matrix.os }}
30
30
31
31
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
35
36
36
37
steps :
37
38
- uses : actions/checkout@v4
38
39
- 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.
42
47
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:
126
126
127
127
check-msrv-on-ci : # # Check the minimal support rust version for currently installed Rust version
128
128
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
131
131
132
132
# #@ Maintenance
133
133
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
238
238
check-size :
239
239
etc/ check-package-size.sh
240
240
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)
242
247
ci-check-msrv :
243
248
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
246
251
247
252
# Enter a nix-shell able to build on macOS
248
253
nix-shell-macos :
You can’t perform that action at this time.
0 commit comments