Skip to content

Commit 99c8941

Browse files
committed
ci(template): Use pinned rustup version in build workflow
1 parent 2d2a461 commit 99c8941

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

template/.github/workflows/build.yml.j2

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ env:
2828
CARGO_PROFILE_DEV_DEBUG: '0'
2929
RUST_TOOLCHAIN_VERSION: "{[ rust_version }]"
3030
RUST_NIGHTLY_TOOLCHAIN_VERSION: "{[ rust_nightly_version }]"
31+
RUSTUP_VERSION: "{[ rustup_version }]"
3132
PYTHON_VERSION: "{[ python_version }]"
3233
RUSTFLAGS: "-D warnings"
3334
RUSTDOCFLAGS: "-D warnings"
@@ -53,6 +54,7 @@ jobs:
5354
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0
5455
with:
5556
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
57+
rustup-version: ${{ env.RUSTUP_VERSION }}
5658
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
5759
with:
5860
key: udeps
@@ -129,6 +131,7 @@ jobs:
129131
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0
130132
with:
131133
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN_VERSION }}
134+
rustup-version: ${{ env.RUSTUP_VERSION }}
132135
components: rustfmt
133136
- env:
134137
RUST_TOOLCHAIN_VERSION: ${{ env.RUST_NIGHTLY_TOOLCHAIN_VERSION }}
@@ -150,6 +153,7 @@ jobs:
150153
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0
151154
with:
152155
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
156+
rustup-version: ${{ env.RUSTUP_VERSION }}
153157
components: clippy
154158
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
155159
with:
@@ -188,6 +192,7 @@ jobs:
188192
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0
189193
with:
190194
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
195+
rustup-version: ${{ env.RUSTUP_VERSION }}
191196
components: rustfmt
192197
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
193198
with:
@@ -212,6 +217,7 @@ jobs:
212217
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0
213218
with:
214219
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
220+
rustup-version: ${{ env.RUSTUP_VERSION }}
215221
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
216222
with:
217223
key: test
@@ -277,6 +283,7 @@ jobs:
277283
uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0
278284
with:
279285
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
286+
rustup-version: ${{ env.RUSTUP_VERSION }}
280287
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
281288
with:
282289
key: charts
@@ -344,6 +351,7 @@ jobs:
344351
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0
345352
with:
346353
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
354+
rustup-version: ${{ env.RUSTUP_VERSION }}
347355
components: rustfmt
348356
# This step checks if the current run was triggered by a push to a pr (or a pr being created).
349357
# If this is the case it changes the version of this project in all Cargo.toml files to include the suffix

0 commit comments

Comments
 (0)