From 5768e89a56ce1627041ed5adc45738b63c6dbabb Mon Sep 17 00:00:00 2001 From: Techassi Date: Wed, 2 Apr 2025 16:28:15 +0200 Subject: [PATCH] ci(template): Use nightly toolchain for rustfmt job --- template/.github/workflows/build.yml.j2 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/template/.github/workflows/build.yml.j2 b/template/.github/workflows/build.yml.j2 index 9f508dd1..e249ba33 100644 --- a/template/.github/workflows/build.yml.j2 +++ b/template/.github/workflows/build.yml.j2 @@ -27,6 +27,7 @@ env: CARGO_INCREMENTAL: '0' CARGO_PROFILE_DEV_DEBUG: '0' RUST_TOOLCHAIN_VERSION: "{[ rust_version }]" + RUST_NIGHTLY_TOOLCHAIN_VERSION: "{[ rust_nightly_version }]" PYTHON_VERSION: "{[ python_version }]" RUSTFLAGS: "-D warnings" RUSTDOCFLAGS: "-D warnings" @@ -136,9 +137,11 @@ jobs: submodules: recursive - uses: dtolnay/rust-toolchain@c5a29ddb4d9d194e7c84ec8c3fba61b1c31fee8c with: - toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }} + toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN_VERSION }} components: rustfmt - - run: cargo fmt --all -- --check + - env: + RUST_TOOLCHAIN_VERSION: ${{ env.RUST_NIGHTLY_TOOLCHAIN_VERSION }} + run: cargo "+$RUST_TOOLCHAIN_VERSION" fmt --all -- --check run_clippy: name: Run Clippy