Skip to content

Commit 62cf7a6

Browse files
tottotoseanmonstar
authored andcommitted
Check minimal versions more precisely
1 parent da38b1c commit 62cf7a6

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

.github/workflows/CI.yml

+10-9
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ jobs:
6161
run: ./ci/h2spec.sh
6262
if: matrix.rust == 'stable'
6363

64-
- name: Check minimal versions
65-
run: cargo clean; cargo update -Zminimal-versions; cargo check
66-
if: matrix.rust == 'nightly'
67-
6864
clippy_check:
6965
runs-on: ubuntu-latest
7066
steps:
@@ -83,14 +79,19 @@ jobs:
8379
uses: actions/checkout@v3
8480

8581
- name: Get MSRV from package metadata
86-
id: metadata
87-
run: |
88-
cargo metadata --no-deps --format-version 1 |
89-
jq -r '"msrv=" + (.packages[] | select(.name == "h2")).rust_version' >> $GITHUB_OUTPUT
82+
id: msrv
83+
run: grep rust-version Cargo.toml | cut -d '"' -f2 | sed 's/^/version=/' >> $GITHUB_OUTPUT
9084

9185
- name: Install Rust (${{ steps.metadata.outputs.msrv }})
86+
id: msrv-toolchain
9287
uses: dtolnay/rust-toolchain@master
9388
with:
94-
toolchain: ${{ steps.metadata.outputs.msrv }}
89+
toolchain: ${{ steps.msrv.outputs.version }}
9590

9691
- run: cargo check -p h2
92+
93+
- uses: dtolnay/rust-toolchain@nightly
94+
- uses: taiki-e/install-action@cargo-hack
95+
- uses: taiki-e/install-action@cargo-minimal-versions
96+
97+
- run: cargo +${{ steps.msrv-toolchain.outputs.name }} minimal-versions check

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ tokio-util = { version = "0.7.1", features = ["codec"] }
4848
tokio = { version = "1", features = ["io-util"] }
4949
bytes = "1"
5050
http = "0.2"
51-
tracing = { version = "0.1.21", default-features = false, features = ["std"] }
51+
tracing = { version = "0.1.32", default-features = false, features = ["std"] }
5252
fnv = "1.0.5"
5353
slab = "0.4.2"
5454
indexmap = { version = "1.5.2", features = ["std"] }

0 commit comments

Comments
 (0)