1111 strategy :
1212 matrix :
1313 platform : [ubuntu-latest, macos-latest, windows-latest]
14- # Minumum Supported Rust Version (MSRV) is 1.63.0.
15- toolchain : [1.63.0, stable, beta, nightly]
16- include :
17- - toolchain : 1.63.0
18- msrv : true
14+ toolchain : [stable, beta, nightly]
1915 runs-on : ${{ matrix.platform }}
2016 steps :
2117 - uses : actions/checkout@v3
@@ -25,25 +21,40 @@ jobs:
2521 rustup component add --toolchain ${{ matrix.toolchain }} rustfmt
2622 rustup component add --toolchain ${{ matrix.toolchain }} clippy
2723 rustup update ${{ matrix.toolchain }}
28- # - name: Pin dependencies
29- # if: matrix.msrv
30- # run: cargo update -p allocator-api2 --precise "0.2.9" --verbose
3124 - name : Lint all targets
32- if : ${{ !matrix.msrv }}
3325 run : cargo clippy --all-targets
3426 - name : Format
35- if : ${{ !matrix.msrv }}
3627 run : cargo fmt -- --check
3728 - name : Build with defeault features
3829 run : cargo build --verbose
3930 - name : Check release build on Rust ${{ matrix.toolchain }}
4031 run : cargo check --release --verbose --color always
4132 - name : Unit test
42- if : ${{ !matrix.msrv }}
4333 run : cargo test --verbose --lib
4434 - name : Doc test
45- if : ${{ !matrix.msrv }}
4635 run : cargo test --verbose --doc
36+ # Check that library code can be compiled with MSRV (1.63.0).
37+ msrv :
38+ runs-on : ubuntu-latest
39+ steps :
40+ - uses : actions/checkout@v3
41+ # Modify build tools just for MSRV testing. This avoids us having
42+ # to bump our MSRV just for tooling. Tooling doesn't effect consumers so not a risk.
43+ - name : Prepare environment for MSRV toolchain
44+ run : |
45+ # Remove resolver = "3" line for MSRV compatibility. We use V3 to
46+ # generate an MSRV-compliant lockfile, but this isn't necessary to
47+ # check if library code is MSRV compliant. Any resolver can go
48+ # and grab the versions specified in the committed lockfile.
49+ #
50+ # The V3 resolver is standard in rust 1.85.
51+ sed -i '/resolver = "3"/d' Cargo.toml
52+ - name : Install MSRV toolchain
53+ run : |
54+ rustup toolchain install 1.63.0
55+ rustup default 1.63.0
56+ - name : Build with MSRV compiler
57+ run : cargo build --verbose
4758 signet :
4859 runs-on : ubuntu-latest
4960 steps :
0 commit comments