1515
1616env :
1717 CARGO_TERM_COLOR : always
18- # When updating this, also update:
19- # - src/lib.rs
20- # - Cargo.toml
21- # - README.md
22- rust_minver : 1.66.1
2318 ci_targets : " ['x86_64-unknown-linux-gnu', 'x86_64-pc-windows-msvc', 'aarch64-apple-darwin', 'x86_64-apple-ios', 'x86_64-unknown-freebsd', 'x86_64-unknown-illumos', 'aarch64-linux-android']"
2419
2520defaults :
@@ -208,12 +203,17 @@ jobs:
208203 run : sudo bash ./.github/workflows/install-deps.sh
209204 - name : Install Rust nightly
210205 run : rustup toolchain install nightly
211- - name : Install Rust ${{ env.rust_minver }}
212- run : rustup toolchain install ${{ env.rust_minver }}
206+ - name : Read rust-version from Cargo.toml
207+ run : |
208+ MSRV=$(yq '.workspace.package.rust-version' ./Cargo.toml)
209+ echo $MSRV
210+ echo "MSRV=$MSRV" >> $GITHUB_ENV
211+ - name : Install Rust ${{ env.MSRV }}
212+ run : rustup toolchain install ${{ env.MSRV }}
213213 - name : Install Rust target
214214 run : |
215215 rustup target add ${{ matrix.target }} --toolchain nightly
216- rustup target add ${{ matrix.target }} --toolchain ${{ env.rust_minver }}
216+ rustup target add ${{ matrix.target }} --toolchain ${{ env.MSRV }}
217217 echo 'CARGO_BUILD_TARGET=${{ matrix.target }}' >> $GITHUB_ENV
218218 - name : Restore cargo caches
219219 uses : Swatinem/rust-cache@v2
@@ -224,8 +224,8 @@ jobs:
224224 perl -pi -e 's/\[dev-dependencies]/[workaround-avoid-dev-deps]/g' ./spdlog/Cargo.toml
225225 - name : Downgrade dependencies to minimal versions
226226 run : cargo +nightly update -Z minimal-versions
227- - name : Check MSRV for core with Rust ${{ env.rust_minver }}
228- run : cargo +${{ env.rust_minver }} check --locked --all-features --verbose
227+ - name : Check MSRV for core with Rust ${{ env.MSRV }}
228+ run : cargo +${{ env.MSRV }} check --locked --all-features --verbose
229229
230230 test-native-linux :
231231 strategy :
0 commit comments