From 40dd4dca4d718374b60cf91d119946e98e1446aa Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Sat, 24 Jan 2026 23:44:39 +0900 Subject: [PATCH] Use preinstalled rust & CARGO_INCREMENTAL=0 --- .github/workflows/ci.yml | 43 +++++++++++------------------------- .github/workflows/compat.yml | 12 ++-------- 2 files changed, 15 insertions(+), 40 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff86fe94..d0f1dae7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,12 +11,6 @@ jobs: os: [ubuntu-latest, macOS-latest, windows-latest] steps: - uses: actions/checkout@v6 - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rustup toolchain install stable --no-self-update -c rustfmt --profile minimal - rustup default stable - # For bindgen: https://github.com/rust-lang/rust-bindgen/issues/1797 - uses: KyleMayes/install-llvm-action@v2 if: matrix.os == 'windows-latest' @@ -27,6 +21,8 @@ jobs: if: matrix.os == 'windows-latest' - name: Check + env: + CARGO_INCREMENTAL: 0 run: | cargo check --all --all-features @@ -38,12 +34,6 @@ jobs: os: [ubuntu-latest, macOS-latest, windows-latest] steps: - uses: actions/checkout@v6 - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rustup toolchain install stable --no-self-update -c rustfmt --profile minimal - rustup default stable - # For bindgen: https://github.com/rust-lang/rust-bindgen/issues/1797 - uses: KyleMayes/install-llvm-action@v2 if: matrix.os == 'windows-latest' @@ -54,6 +44,8 @@ jobs: if: matrix.os == 'windows-latest' - name: Test + env: + CARGO_INCREMENTAL: 0 run: | cargo test @@ -62,14 +54,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rustup toolchain install stable --no-self-update -c rustfmt --profile minimal - rustup default stable - - run: rustup component add rustfmt - name: cargo fmt + env: + CARGO_INCREMENTAL: 0 run: | cargo fmt --all -- --check @@ -78,13 +66,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rustup toolchain install stable --no-self-update -c rustfmt --profile minimal - rustup default stable - run: rustup component add clippy - name: cargo clippy + env: + CARGO_INCREMENTAL: 0 run: | cargo clippy --all-targets -- -D warnings @@ -102,16 +87,14 @@ jobs: steps: - name: Checkout source code uses: actions/checkout@v6 - - - name: Install `rust` toolchain - run: | - rustup toolchain install nightly --no-self-update -c rustfmt --profile minimal - rustup default nightly - - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov - name: Generate code coverage - run: cargo llvm-cov --all-features --lcov --branch --output-path lcov.info + env: + CARGO_INCREMENTAL: 0 + RUSTC_BOOTSTRAP: 1 + run: | + cargo llvm-cov --all-features --lcov --branch --output-path lcov.info - name: Upload coverage as artifact uses: actions/upload-artifact@v6 diff --git a/.github/workflows/compat.yml b/.github/workflows/compat.yml index 8f26a5b0..9eceb7f6 100644 --- a/.github/workflows/compat.yml +++ b/.github/workflows/compat.yml @@ -29,11 +29,6 @@ jobs: git config submodule.gnulib.url https://github.com/coreutils/gnulib.git git submodule update --init --recursive --depth 1 working-directory: findutils.gnu - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rustup toolchain install stable --no-self-update -c rustfmt --profile minimal - rustup default stable - name: Install dependencies shell: bash run: | @@ -45,6 +40,7 @@ jobs: shell: bash run: | cd findutils + export CARGO_INCREMENTAL=0 bash util/build-gnu.sh ||: - name: Extract testing info shell: bash @@ -126,11 +122,6 @@ jobs: repository: tavianator/bfs path: bfs ref: "4.0" - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rustup toolchain install stable --no-self-update -c rustfmt --profile minimal - rustup default stable - name: Install dependencies shell: bash run: | @@ -142,6 +133,7 @@ jobs: shell: bash run: | cd findutils + export CARGO_INCREMENTAL=0 bash util/build-bfs.sh ||: - name: Upload bfs-test-report uses: actions/upload-artifact@v6