Skip to content

Commit 47f614f

Browse files
authored
chore(ci): Get the MSRV for the build job from the package metadata (#3171)
1 parent 9ed175d commit 47f614f

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

.github/workflows/CI.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,26 +94,23 @@ jobs:
9494
args: --benches ${{ matrix.features }}
9595

9696
msrv:
97-
name: Check MSRV (${{ matrix.rust }})
97+
name: Check MSRV
9898
needs: [style]
99-
strategy:
100-
matrix:
101-
rust:
102-
- 1.56 # keep in sync with MSRV.md dev doc
103-
104-
os:
105-
- ubuntu-latest
10699

107-
runs-on: ${{ matrix.os }}
100+
runs-on: ubuntu-latest
108101

109102
steps:
110103
- name: Checkout
111104
uses: actions/checkout@v3
112105

113-
- name: Install Rust (${{ matrix.rust }})
106+
- name: Get MSRV from package metadata
107+
id: msrv
108+
run: grep rust-version Cargo.toml | cut -d'"' -f2 | sed 's/^/version=/' >> $GITHUB_OUTPUT
109+
110+
- name: Install Rust (${{ steps.msrv.outputs.version }})
114111
uses: dtolnay/rust-toolchain@master
115112
with:
116-
toolchain: ${{ matrix.rust }}
113+
toolchain: ${{ steps.msrv.outputs.version }}
117114

118115
- name: Check
119116
uses: actions-rs/cargo@v1

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ authors = ["Sean McArthur <[email protected]>"]
1111
keywords = ["http", "hyper", "hyperium"]
1212
categories = ["network-programming", "web-programming::http-client", "web-programming::http-server"]
1313
edition = "2018"
14-
rust-version = "1.56"
14+
rust-version = "1.56" # keep in sync with MSRV.md dev doc
1515

1616
include = [
1717
"Cargo.toml",

0 commit comments

Comments
 (0)