ci: fetch the aarch64 musl toolchain from GitHub instead of musl.cc - #1913
Merged
Conversation
The `aarch64-unknown-linux-musl` release job pulled its cross toolchain with `curl -sSL https://musl.cc/... | tar -xz`. musl.cc is a single volunteer-run host with no CDN, and it has stopped answering — every release run now dies at that step with curl: (28) Failed to connect to musl.cc port 443 after 136096 ms gzip: stdin: unexpected end of file before reaching `cargo build`, taking the whole release with it. Switched to the cross-tools/musl-cross GitHub release, which publishes `aarch64-unknown-linux-musl.tar.xz` from the same musl-cross-make recipe. GitHub Releases are already a hard dependency of this workflow, so this adds no new point of failure. The tool prefix differs between the two builds (`aarch64-unknown-linux-musl-gcc` rather than `aarch64-linux-musl-gcc`), so CC/CXX/AR, the `$GITHUB_PATH` entry and the `linker` in `.cargo/config.toml` are updated to match. Hardened the fetch while touching it: `-f` so an HTTP error page can never be mistaken for the archive, `--retry 5 --retry-all-errors --connect-timeout 30` to ride out a transient blip, download-to-file so a failed fetch reports as a curl error rather than a puzzling gzip one, and a pinned sha256 — this toolchain compiles and links a published release binary, so it is worth verifying rather than trusting an unpinned URL. Also set `fail-fast: false` on the upload matrix. This failure cancelled the other eight targets mid-build; since `upload-all-platforms` needs them all, a cancelled matrix means re-running everything just to learn whether the rest were fine. Verified against the real artifact: the pinned sha256 matches the published `.sha256`, and extracting it yields `$HOME/aarch64-unknown-linux-musl/bin/aarch64-unknown-linux-musl-{gcc,g++,ar}` exactly as the step now references. The toolchain binaries are x86_64-hosted (correct for `ubuntu-latest`), so the cross-build itself can only be exercised on the runner. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
YamatoSecurity
self-requested a review
July 29, 2026 00:16
YamatoSecurity
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The release workflow cannot complete right now.
upload (ubuntu-latest, aarch64-unknown-linux-musl)dies before it reachescargo build:musl.ccis a single volunteer-run host with no CDN or SLA, and it has stopped answering — this is not a one-off blip; the step fails the same way on re-run. Because the matrix is fail-fast, that one job also cancels the other eight targets, andupload-all-platforms/all-packages-zipare then skipped, so the whole release is blocked.Change
Fetch the toolchain from the cross-tools/musl-cross GitHub release instead. It publishes
aarch64-unknown-linux-musl.tar.xzbuilt from the samemusl-cross-makerecipe, and GitHub Releases are already a hard dependency of this workflow — so this adds no new point of failure rather than trading one flaky host for another.The tool prefix differs between the two builds (
aarch64-unknown-linux-musl-gccvs. musl.cc'saarch64-linux-musl-gcc), soCC/CXX/AR, the$GITHUB_PATHentry and thelinkerin.cargo/config.tomlare updated to match. The reasoning in the existing comment is kept: this still has to be a real musl cross toolchain, because linking with the glibcgcc-aarch64-linux-gnuproduces a binary killed at startup (#1332).Hardened the fetch while touching it:
-fso an HTTP error page can never be piped in as if it were the archive (the old-sSLhad no-f).--retry 5 --retry-all-errors --retry-delay 5 --connect-timeout 30to ride out a transient blip instead of failing a release on one bad request.curl | tarturned a network failure intogzip: stdin: unexpected end of file, which reads like archive corruption rather than "the host is down".Also set
fail-fast: falseon the upload matrix.upload-all-platformsneeds every target anyway, so cancelling the survivors buys nothing and costs a full re-run just to learn whether the other eight were fine.Verification
Checked against the real artifact rather than assumed:
90282c46…) matches the publishedaarch64-unknown-linux-musl.tar.xz.sha256;$HOME/aarch64-unknown-linux-musl/bin/aarch64-unknown-linux-musl-{gcc,g++,ar,ranlib,strip}, exactly the paths and names the step now references;The toolchain binaries are x86_64-hosted, which is right for
ubuntu-latestbut means the cross-build itself can only be exercised on the runner — worth watching that job on the next release run.