[CI] Build Nitro CLI musl binary in an Alpine container - #9959
Merged
Conversation
The linux-musl-x64 leg of the Nitro CLI release built a NativeAOT binary on a glibc ubuntu-22.04 host. The native link step failed with "undefined reference to 'strlcpy'" because the musl runtime pack must be linked against musl libc, which is not present on a glibc host, so the musl build never produced a working binary. Run the musl leg inside an alpine:3.21 container (host libc == target libc) and install the clang/lld/build-base toolchain plus github-cli via apk so both the AOT link and the release upload succeed. Also add a temporary nitro-musl-build-test job to ci.yml that reproduces the Alpine musl build on every PR and runs the produced binary, so the release change can be verified before merging.
This was referenced Jun 22, 2026
This was referenced Jul 2, 2026
Open
This was referenced Jul 14, 2026
This was referenced Jul 23, 2026
chore(deps): Bump HotChocolate.Subscriptions.InMemory from 15.1.14 to 16.5.1
Kuestenlogik/Bowire#506
Merged
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.
Problem
The
linux-musl-x64leg of the Build and Publish Nitro CLI job (release.yml) ran a NativeAOT publish (-p:PublishAot=true) on a glibcubuntu-22.04host. NativeAOT links a real native executable, and the link failed:strlcpyis provided by musl libc, not glibc. The musl runtime pack must be linked against musl, which isn't present on a glibc host. That's why the Alpine/musl build never produced a working binary. Thelinux-x64leg works because there host libc == target libc.Fix
Run the musl leg inside an
alpine:3.21container so host libc == target libc, and install the AOT toolchain (clang,lld,build-base,zlib-dev,musl-dev,icu-libs, ...) plusgithub-cli(needed for the release-upload step, which isn't preinstalled in Alpine) viaapk. The job-levelcontaineris driven from the matrix, so only the musl leg gets the container; all other legs still run directly on their host.