Skip to content

Commit

Permalink
chore: Use Cargo metadata for the MSRV build job
Browse files Browse the repository at this point in the history
  • Loading branch information
nickelc authored and seanmonstar committed Apr 12, 2023
1 parent d3d50ef commit 481c31d
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,24 @@ jobs:
if: matrix.rust == 'nightly'

msrv:
name: Check MSRV (${{ matrix.rust }})
name: Check MSRV
needs: [style]
strategy:
matrix:
rust:
- 1.56 # never go past Hyper's own MSRV

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: metadata
run: |
cargo metadata --no-deps --format-version 1 |
jq -r '"msrv=" + (.packages[] | select(.name == "h2")).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 }}

- run: cargo check

0 comments on commit 481c31d

Please sign in to comment.