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.
This commit is contained in:
Michael Davis 2024-12-03 10:01:40 -05:00
parent cf81e15315
commit 403aaa8cf3
No known key found for this signature in database

View File

@ -8,6 +8,9 @@ on:
schedule: schedule:
- cron: "00 01 * * *" - cron: "00 01 * * *"
env:
MSRV: "1.76"
jobs: jobs:
check: check:
name: Check (msrv) name: Check (msrv)
@ -18,7 +21,9 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install MSRV toolchain - name: Install MSRV toolchain
uses: dtolnay/rust-toolchain@1.76 uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: with:
@ -39,7 +44,9 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install MSRV toolchain - name: Install MSRV toolchain
uses: dtolnay/rust-toolchain@1.76 uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: with:
@ -71,8 +78,9 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install MSRV toolchain - name: Install MSRV toolchain
uses: dtolnay/rust-toolchain@1.76 uses: dtolnay/rust-toolchain@master
with: with:
toolchain: ${{ env.MSRV }}
components: rustfmt, clippy components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
@ -99,7 +107,9 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install MSRV toolchain - name: Install MSRV toolchain
uses: dtolnay/rust-toolchain@1.76 uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
with: with: