Skip to content

Commit

Permalink
ci: read MSRV from manifest (#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed May 12, 2024
1 parent db79886 commit af8e6cd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ concurrency:
cancel-in-progress: true

jobs:
read_msrv:
name: Read MSRV
uses: actions-rust-lang/msrv/.github/workflows/msrv.yml@main

build_and_test:
needs:
- read_msrv

strategy:
fail-fast: false
matrix:
Expand All @@ -24,7 +31,7 @@ jobs:
- { name: Windows, os: windows-latest, triple: x86_64-pc-windows-msvc }
- { name: Windows (MinGW), os: windows-latest, triple: x86_64-pc-windows-gnu }
version:
- { name: msrv, version: 1.70.0 }
- { name: msrv, version: "${{ needs.read_msrv.outputs.msrv }}" }
- { name: stable, version: stable }

name: ${{ matrix.target.name }} / ${{ matrix.version.name }}
Expand Down
7 changes: 7 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ all_crate_features := if os() == "linux" {
"--features='" + non_linux_all_features_list + "'"
}
m:
cargo metadata --format-version=1 \
| jq -r 'first(.packages[] | select(.source == null)) | .rust_version' \
| sed -E 's/^1\.([0-9]{2})$/1\.\1\.0/' \
| xargs -0 printf "msrv=%s" \
| tee /dev/stderr
# Test workspace code.
test toolchain="":
cargo {{ toolchain }} test --lib --tests --package=actix-macros
Expand Down

0 comments on commit af8e6cd

Please sign in to comment.