From 02572bdf452989843325b98b19154bcecd8378fa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 21 Aug 2025 00:01:39 +0000 Subject: [PATCH] Switch to action-rs/toolchain for Rust installation in CI Co-authored-by: nitnelave <796633+nitnelave@users.noreply.github.com> --- .github/workflows/rust.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c162721..c0bb568 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -36,9 +36,10 @@ jobs: - name: Checkout sources uses: actions/checkout@v5.0.0 - name: Install Rust ${{ env.RUST_VERSION }} - uses: dtolnay/rust-toolchain@stable + uses: actions-rs/toolchain@v1 with: toolchain: ${{ env.RUST_VERSION }} + override: true - uses: Swatinem/rust-cache@v2 - name: Build run: cargo build --verbose --workspace @@ -60,9 +61,11 @@ jobs: uses: actions/checkout@v5.0.0 - name: Install Rust ${{ env.RUST_VERSION }} - uses: dtolnay/rust-toolchain@stable + uses: actions-rs/toolchain@v1 with: toolchain: ${{ env.RUST_VERSION }} + override: true + components: clippy - uses: Swatinem/rust-cache@v2 @@ -82,9 +85,11 @@ jobs: uses: actions/checkout@v5.0.0 - name: Install Rust ${{ env.RUST_VERSION }} - uses: dtolnay/rust-toolchain@stable + uses: actions-rs/toolchain@v1 with: toolchain: ${{ env.RUST_VERSION }} + override: true + components: rustfmt - uses: Swatinem/rust-cache@v2 @@ -106,10 +111,16 @@ jobs: uses: actions/checkout@v5.0.0 - name: Install Rust ${{ env.RUST_VERSION }} and nightly - run: | - rustup toolchain install ${{ env.RUST_VERSION }} --component llvm-tools-preview - rustup toolchain install nightly --component llvm-tools-preview - rustup default ${{ env.RUST_VERSION }} + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.RUST_VERSION }} + override: true + components: llvm-tools-preview + - name: Install nightly toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + components: llvm-tools-preview - uses: taiki-e/install-action@cargo-llvm-cov