Skip to content

Commit af8e6cd

Browse files
authored
ci: read MSRV from manifest (#559)
1 parent db79886 commit af8e6cd

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/ci.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16+
read_msrv:
17+
name: Read MSRV
18+
uses: actions-rust-lang/msrv/.github/workflows/msrv.yml@main
19+
1620
build_and_test:
21+
needs:
22+
- read_msrv
23+
1724
strategy:
1825
fail-fast: false
1926
matrix:
@@ -24,7 +31,7 @@ jobs:
2431
- { name: Windows, os: windows-latest, triple: x86_64-pc-windows-msvc }
2532
- { name: Windows (MinGW), os: windows-latest, triple: x86_64-pc-windows-gnu }
2633
version:
27-
- { name: msrv, version: 1.70.0 }
34+
- { name: msrv, version: "${{ needs.read_msrv.outputs.msrv }}" }
2835
- { name: stable, version: stable }
2936

3037
name: ${{ matrix.target.name }} / ${{ matrix.version.name }}

justfile

+7
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ all_crate_features := if os() == "linux" {
2727
"--features='" + non_linux_all_features_list + "'"
2828
}
2929

30+
m:
31+
cargo metadata --format-version=1 \
32+
| jq -r 'first(.packages[] | select(.source == null)) | .rust_version' \
33+
| sed -E 's/^1\.([0-9]{2})$/1\.\1\.0/' \
34+
| xargs -0 printf "msrv=%s" \
35+
| tee /dev/stderr
36+
3037
# Test workspace code.
3138
test toolchain="":
3239
cargo {{ toolchain }} test --lib --tests --package=actix-macros

0 commit comments

Comments
 (0)