@@ -107,9 +107,17 @@ jobs:
107107 with :
108108 ref : ${{ needs.check-and-release.outputs.tag_name }}
109109
110- - name : Install Rust stable
111- uses : dtolnay/rust-toolchain@stable
110+ - name : Get MSRV from Cargo.toml
111+ id : msrv
112+ run : |
113+ MSRV=$(grep '^rust-version' Cargo.toml | sed 's/.*"\(.*\)".*/\1/')
114+ echo "MSRV is $MSRV"
115+ echo "version=$MSRV" >> $GITHUB_OUTPUT
116+
117+ - name : Install Rust MSRV
118+ uses : dtolnay/rust-toolchain@master
112119 with :
120+ toolchain : ${{ steps.msrv.outputs.version }}
113121 components : rustfmt
114122
115123 - name : Cache cargo registry
@@ -121,12 +129,11 @@ jobs:
121129 target
122130 key : ${{ runner.os }}-quality-checks-cargo-${{ hashFiles('Cargo.lock') }}
123131
124- - name : Check MSRV
132+ - name : Verify Rust version
125133 run : |
126- MSRV=$(grep '^rust-version' Cargo.toml | sed 's/.*"\(.*\)".*/\1/')
127- echo "MSRV is $MSRV"
134+ echo "Expected MSRV: ${{ steps.msrv.outputs.version }}"
128135 rustc --version
129- rustc --version | grep -q "$MSRV " || (echo "Rust version mismatch"; exit 1)
136+ rustc --version | grep -q "${{ steps.msrv.outputs.version }} " || (echo "Rust version mismatch"; exit 1)
130137
131138 - name : Build and test (including doctests)
132139 run : .github/scripts/build_and_test.sh
@@ -183,7 +190,7 @@ jobs:
183190 target : x86_64-pc-windows-msvc
184191 artifact_name : rsdo.exe
185192 asset_name : rsdo-windows-x86_64.exe
186- - os : macos-latest
193+ - os : macos-13
187194 target : x86_64-apple-darwin
188195 artifact_name : rsdo
189196 asset_name : rsdo-macos-x86_64
0 commit comments