Skip to content

Commit

Permalink
chore(ci): Get the MSRV for the build job from the package metadata (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
nickelc authored Mar 13, 2023
1 parent 9ed175d commit 47f614f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ authors = ["Sean McArthur <[email protected]>"]
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",
Expand Down

0 comments on commit 47f614f

Please sign in to comment.