From c2af44b986778aa76957c989328458215c8edbc1 Mon Sep 17 00:00:00 2001 From: Ruben Nijveld Date: Mon, 20 Nov 2023 12:11:41 +0100 Subject: [PATCH] Generalize the MSRV checks in the github actions workflow --- .github/workflows/checks.yaml | 10 ++++++---- Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index ad76bc358..5da701611 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -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" @@ -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" @@ -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 diff --git a/Cargo.toml b/Cargo.toml index ecb66550a..f487b79fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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