Skip to content

Commit a4e378d

Browse files
committed
ci: mipsel-softfloat — fix rustup upgrade-in-place error
The messense/rust-musl-cross:mipsel-musl image ships a pre-installed nightly Rust in a state rustup can't cleanly upgrade over — the in-place upgrade errors with error: failure removing component 'clippy-preview-x86_64-unknown-linux-gnu', directory does not exist: 'share/doc/clippy/README.md' because the prior install is missing files rustup expects to delete. Workaround: uninstall nightly first, then install fresh with the minimal profile, then add rust-src as a separate step. continue-on-error keeps this experimental target from blocking the release — landing the fix on main so the NEXT tag attempt gets a working mipsel artifact, without spinning up yet another retag dance for v1.1.0.
1 parent 6541eb0 commit a4e378d

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,16 @@ jobs:
166166
docker run --rm -v "$PWD":/src -w /src \
167167
-e RUSTFLAGS='-C target-feature=+soft-float' \
168168
messense/rust-musl-cross:mipsel-musl \
169-
sh -c "rustup toolchain install nightly --profile minimal --component rust-src && \
169+
sh -c "set -eux; \
170+
# The image ships with a pre-installed nightly that rustup \
171+
# can't cleanly upgrade — the expected \`clippy-preview/share/doc/clippy/README.md\` \
172+
# is missing, which fails the in-place upgrade \
173+
# (error: failure removing component 'clippy-preview...'). \
174+
# Nuke it first, then install fresh with only the profile \
175+
# bits we actually use. \
176+
rustup toolchain uninstall nightly 2>/dev/null || true; \
177+
rustup toolchain install nightly --profile minimal; \
178+
rustup component add rust-src --toolchain nightly; \
170179
cargo +nightly build --release \
171180
-Z build-std=std,panic_abort \
172181
--target mipsel-unknown-linux-musl \

0 commit comments

Comments
 (0)