From 5f54b049eb525ea9eeb40d6c8dc5e3ea0e2a242d Mon Sep 17 00:00:00 2001 From: Vittorio Distefano Date: Thu, 5 Nov 2026 02:57:39 +0100 Subject: [PATCH] ci: install toolchains without a rustup self-update `rustup toolchain install` also updates rustup itself, so every CI job depended on a self-update download it does not need; on Forgejo that download timed out after the toolchain had installed and failed the job. Every toolchain install in the Forgejo and GitHub workflows now passes `--no-self-update`. Closes #194. --- .forgejo/workflows/ci.yml | 4 ++-- .github/workflows/ci.yml | 8 ++++---- .github/workflows/release.yml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index ec9cb456..a7b85724 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: - name: Install Rust toolchain run: | channel=$(sed -n 's/^channel = "\(.*\)"$/\1/p' rust-toolchain.toml) - rustup toolchain install "$channel" --profile minimal + rustup toolchain install "$channel" --profile minimal --no-self-update rustup show active-toolchain # Runner environment overrides workflow-level CARGO_TARGET_DIR. Set it on @@ -49,7 +49,7 @@ jobs: - name: Check with the declared minimum Rust version run: | msrv=$(sed -n 's/^rust-version = "\(.*\)"$/\1/p' Cargo.toml) - rustup toolchain install "$msrv" --profile minimal + rustup toolchain install "$msrv" --profile minimal --no-self-update CARGO_TARGET_DIR="$PWD/target/msrv" cargo +"$msrv" check --workspace --all-targets --all-features --locked - name: Build API docs with warnings denied diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 098277bf..b5f4d11a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: # rust-toolchain.toml names the toolchain and its components. - name: Install Rust - run: rustup toolchain install + run: rustup toolchain install --no-self-update - name: Cache cargo uses: actions/cache@v5 @@ -69,7 +69,7 @@ jobs: - name: Check with the declared minimum Rust version run: | msrv=$(sed -n 's/^rust-version = "\(.*\)"$/\1/p' Cargo.toml) - rustup toolchain install "$msrv" --profile minimal + rustup toolchain install "$msrv" --profile minimal --no-self-update cargo +"$msrv" check --workspace --all-targets --all-features --locked docs: @@ -83,7 +83,7 @@ jobs: - uses: actions/checkout@v6 - name: Install Rust - run: rustup toolchain install + run: rustup toolchain install --no-self-update - name: Build API docs with warnings denied run: cargo doc --workspace --no-deps --all-features --locked @@ -122,7 +122,7 @@ jobs: - uses: actions/checkout@v6 - name: Install Rust - run: rustup toolchain install + run: rustup toolchain install --no-self-update # The same packaging the Release workflow runs before it publishes. - name: Package every publishable crate diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c309a21a..60251a08 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: - uses: actions/checkout@v6 - name: Install Rust - run: rustup toolchain install + run: rustup toolchain install --no-self-update - name: Check the tag against the workspace version id: version @@ -66,7 +66,7 @@ jobs: - uses: actions/checkout@v6 - name: Install Rust - run: rustup toolchain install + run: rustup toolchain install --no-self-update # Re-running a partially published release uploads only what is missing. # cargo publishes the set in dependency order and waits for each crate to