deno
f1ac91ee - ci: pin rustup-init to 1.28.2 to work around broken 1.29.0 (#34024)

Commit
152 days ago
ci: pin rustup-init to 1.28.2 to work around broken 1.29.0 (#34024) `sh.rustup.rs` recently flipped its default to rustup 1.29.0, which has a regression in the proxy multi-call dispatch: `cargo`, `rustc`, etc. identify themselves as `rustup-init`, so `cargo test` is parsed as `rustup-init test` and fails with `error: unexpected argument 'test' found / Usage: rustup-init[EXE] [OPTIONS]`. `main` has been failing on macOS aarch64 jobs (and any other runner that doesn't have rustup pre-installed and falls through to the curl-pipe-sh fallback inside `dsherret/rust-toolchain-file@v1`). Clearing the GitHub Actions cache does not help because the broken binary is re-downloaded on every run. This adds a pre-install step that downloads rustup-init 1.28.2 from `static.rust-lang.org/rustup/archive/1.28.2/<triple>/rustup-init` and runs it with `--default-toolchain none --no-modify-path`, then prepends `$CARGO_HOME/bin` to `$GITHUB_PATH`. The subsequent `dsherret/rust-toolchain-file@v1` then sees `command -v rustup` succeed and skips its broken curl install; its later `rustup toolchain install` picks up the toolchain from `rust-toolchain.toml` as usual. The new step is a no-op on runners that already have a non-1.29.0 rustup, so it shouldn't affect cached/preinstalled paths. If a runner shows up with rustup 1.29.0 (e.g. a future image bump), the step replaces it. Once upstream rustup ships 1.29.1 (or `sh.rustup.rs` reverts), we can unpin.
Author
Parents
Loading