From 47f614fd99bf9e937efc874880e3276caf4c34b1 Mon Sep 17 00:00:00 2001 From: nickelc Date: Mon, 13 Mar 2023 21:52:54 +0100 Subject: [PATCH] chore(ci): Get the MSRV for the build job from the package metadata (#3171) --- .github/workflows/CI.yml | 19 ++++++++----------- Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f08af14d75..befef9b50a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -94,26 +94,23 @@ jobs: args: --benches ${{ matrix.features }} msrv: - name: Check MSRV (${{ matrix.rust }}) + name: Check MSRV needs: [style] - strategy: - matrix: - rust: - - 1.56 # keep in sync with MSRV.md dev doc - - os: - - ubuntu-latest - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - - name: Install Rust (${{ matrix.rust }}) + - name: Get MSRV from package metadata + id: msrv + run: grep rust-version Cargo.toml | cut -d'"' -f2 | sed 's/^/version=/' >> $GITHUB_OUTPUT + + - name: Install Rust (${{ steps.msrv.outputs.version }}) uses: dtolnay/rust-toolchain@master with: - toolchain: ${{ matrix.rust }} + toolchain: ${{ steps.msrv.outputs.version }} - name: Check uses: actions-rs/cargo@v1 diff --git a/Cargo.toml b/Cargo.toml index 16d8e585be..f65806c831 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ authors = ["Sean McArthur "] keywords = ["http", "hyper", "hyperium"] categories = ["network-programming", "web-programming::http-client", "web-programming::http-server"] edition = "2018" -rust-version = "1.56" +rust-version = "1.56" # keep in sync with MSRV.md dev doc include = [ "Cargo.toml",