From 30cb4ceae00511b580f3f893e67cefd27fa934f7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 20 Aug 2025 23:58:18 +0000 Subject: [PATCH] Use variable for Rust version in CI workflow Replace hardcoded "1.85.0" references with RUST_VERSION environment variable for better maintainability. Now the Rust version only needs to be updated in one place. Co-authored-by: nitnelave <796633+nitnelave@users.noreply.github.com> --- .github/workflows/rust.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 83211f3..c162721 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -8,6 +8,7 @@ on: env: CARGO_TERM_COLOR: always + RUST_VERSION: "1.85.0" jobs: pre_job: @@ -34,10 +35,10 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v5.0.0 - - name: Install Rust 1.85.0 + - name: Install Rust ${{ env.RUST_VERSION }} uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.85.0 + toolchain: ${{ env.RUST_VERSION }} - uses: Swatinem/rust-cache@v2 - name: Build run: cargo build --verbose --workspace @@ -58,10 +59,10 @@ jobs: - name: Checkout sources uses: actions/checkout@v5.0.0 - - name: Install Rust 1.85.0 + - name: Install Rust ${{ env.RUST_VERSION }} uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.85.0 + toolchain: ${{ env.RUST_VERSION }} - uses: Swatinem/rust-cache@v2 @@ -80,10 +81,10 @@ jobs: - name: Checkout sources uses: actions/checkout@v5.0.0 - - name: Install Rust 1.85.0 + - name: Install Rust ${{ env.RUST_VERSION }} uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.85.0 + toolchain: ${{ env.RUST_VERSION }} - uses: Swatinem/rust-cache@v2 @@ -104,11 +105,11 @@ jobs: - name: Checkout sources uses: actions/checkout@v5.0.0 - - name: Install Rust 1.85.0 and nightly + - name: Install Rust ${{ env.RUST_VERSION }} and nightly run: | - rustup toolchain install 1.85.0 --component llvm-tools-preview + rustup toolchain install ${{ env.RUST_VERSION }} --component llvm-tools-preview rustup toolchain install nightly --component llvm-tools-preview - rustup default 1.85.0 + rustup default ${{ env.RUST_VERSION }} - uses: taiki-e/install-action@cargo-llvm-cov