diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a2a810c7..4c52bac65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -248,23 +248,23 @@ jobs: cargo check --all-features msrv: - name: MSRV ${{ matrix.rust }} + name: MSRV needs: [style] runs-on: ubuntu-latest - strategy: - matrix: - rust: [1.57.0] - steps: - name: Checkout uses: actions/checkout@v3 - - name: Install rust + - name: Get MSRV package metadata + id: metadata + run: cargo metadata --no-deps --format-version 1 | jq -r '"msrv=" + .packages[0].rust_version' >> $GITHUB_OUTPUT + + - name: Install rust (${{ steps.metadata.outputs.msrv }}) uses: dtolnay/rust-toolchain@master with: - toolchain: ${{ matrix.rust }} + toolchain: ${{ steps.metadata.outputs.msrv }} - name: Check run: cargo check diff --git a/Cargo.toml b/Cargo.toml index 69f5a3107..c2d674fab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ authors = ["Sean McArthur "] readme = "README.md" license = "MIT OR Apache-2.0" edition = "2018" +rust-version = "1.57.0" autotests = true [package.metadata.docs.rs]