Skip to content

Commit

Permalink
Generalize the MSRV checks in the github actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rnijveld committed Nov 22, 2023
1 parent d5aa083 commit 313dd85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
os: ubuntu-latest
features: ""
target: "x86_64-unknown-linux-gnu"
- rust: "1.67.0"
- rust: "msrv"
os: ubuntu-latest
features: ""
target: "x86_64-unknown-linux-gnu"
Expand All @@ -48,7 +48,7 @@ jobs:
os: ubuntu-latest
features: "--all-features"
target: "x86_64-unknown-linux-gnu"
- rust: "1.67.0"
- rust: "msrv"
os: ubuntu-latest
features: "--all-features"
target: "x86_64-unknown-linux-gnu"
Expand All @@ -65,10 +65,12 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
persist-credentials: false
- name: Install ${{ matrix.rust }} toolchain
- name: Set target rust version
run: echo "TARGET_RUST_VERSION=$(if [ "${{matrix.rust}}" = "msrv" ]; then grep rust-version Cargo.toml | grep MSRV | cut -d'"' -f2; else echo "${{matrix.rust}}"; fi)" >> $GITHUB_ENV
- name: Install toolchain
uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7
with:
toolchain: ${{ matrix.rust }}
toolchain: "${TARGET_RUST_VERSION}"
targets: "${{ matrix.target }}"
- name: Install cross-compilation tools
uses: taiki-e/setup-cross-toolchain-action@e0fdbe18d70a8bbed8a44d3319a1842949a63671
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ homepage = "https://github.com/pendulum-project/ntpd-rs"
readme = "./README.md"
description = "Full-featured implementation of NTP with NTS support"
publish = true
rust-version = "1.67.0" # MSRV
rust-version = "1.67" # MSRV

[workspace.metadata.release]
sign-commit = true
Expand Down

0 comments on commit 313dd85

Please sign in to comment.