Skip to content

Commit

Permalink
CI: Use an env var for MSRV
Browse files Browse the repository at this point in the history
This just reduces duplication in the build workflow - no functional
change - to make updating the MSRV easier in the future.
  • Loading branch information
the-mikedavis committed Dec 3, 2024
1 parent cf81e15 commit 403aaa8
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
schedule:
- cron: "00 01 * * *"

env:
MSRV: "1.76"

jobs:
check:
name: Check (msrv)
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 403aaa8

Please sign in to comment.