From 01d73fa62dcf88b89c1b54c761ec60f425438cd8 Mon Sep 17 00:00:00 2001 From: Tpt Date: Sun, 25 Feb 2024 17:55:16 +0100 Subject: [PATCH] CI: Read MSRV from Cargo.toml Co-authored-by: Yuri Astrakhan --- .github/workflows/tests.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9e392ac2..d838159b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -173,9 +173,12 @@ jobs: - uses: actions/checkout@v3 with: submodules: true + - name: Read MSRV from Cargo.toml + id: metadata + run: echo "rust-version=$(sed -ne 's/rust-version *= *\"\(.*\)\"/\1/p' Cargo.toml)" >> $GITHUB_OUTPUT - uses: ./.github/actions/setup-rust with: - version: 1.70.0 + version: ${{ steps.metadata.outputs.rust-version }} - run: rustup toolchain install nightly - run: rm Cargo.lock && cargo +nightly update -Z direct-minimal-versions && cargo update -p bumpalo@3.15.3 --precise 3.14.0 - run: cargo test @@ -310,9 +313,12 @@ jobs: - uses: actions/checkout@v3 with: submodules: true + - name: Read MSRV from Cargo.toml + id: metadata + run: echo "rust-version=$(sed -ne 's/rust-version *= *\"\(.*\)\"/\1/p' Cargo.toml)" >> $GITHUB_OUTPUT - uses: ./.github/actions/setup-rust with: - version: 1.70.0 + version: ${{ steps.metadata.outputs.rust-version }} - run: rustup toolchain install nightly - uses: actions/setup-python@v4 with: