From 403aaa8cf3a738647e973fdd0c67d5a6813ed20c Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Tue, 3 Dec 2024 10:01:40 -0500 Subject: [PATCH] CI: Use an env var for MSRV This just reduces duplication in the build workflow - no functional change - to make updating the MSRV easier in the future. --- .github/workflows/build.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1ef53bdf..21bb51b2e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,9 @@ on: schedule: - cron: "00 01 * * *" +env: + MSRV: "1.76" + jobs: check: name: Check (msrv) @@ -18,7 +21,9 @@ jobs: uses: actions/checkout@v4 - name: Install MSRV toolchain - uses: dtolnay/rust-toolchain@1.76 + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.MSRV }} - uses: Swatinem/rust-cache@v2 with: @@ -39,7 +44,9 @@ jobs: uses: actions/checkout@v4 - name: Install MSRV toolchain - uses: dtolnay/rust-toolchain@1.76 + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.MSRV }} - uses: Swatinem/rust-cache@v2 with: @@ -71,8 +78,9 @@ jobs: uses: actions/checkout@v4 - name: Install MSRV toolchain - uses: dtolnay/rust-toolchain@1.76 + uses: dtolnay/rust-toolchain@master with: + toolchain: ${{ env.MSRV }} components: rustfmt, clippy - uses: Swatinem/rust-cache@v2 @@ -99,7 +107,9 @@ jobs: uses: actions/checkout@v4 - name: Install MSRV toolchain - uses: dtolnay/rust-toolchain@1.76 + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.MSRV }} - uses: Swatinem/rust-cache@v2 with: