Compile against the Swift Static Linux SDK (musl) in CI - #234
Merged
Conversation
Verifies both x86_64-swift-linux-musl and aarch64-swift-linux-musl build cleanly against the official static SDK, each on a host of the matching architecture. Build-only: the static SDK's swift_static resources don't include a Testing.swiftmodule, so anything importing swift-testing (the whole test suite) cannot compile against it regardless of host/target match.
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.
Summary
Adds a
swift-musl.ymlworkflow that installs the official Swift Static Linux SDK and builds the package against bothx86_64-swift-linux-muslandaarch64-swift-linux-musl, each on a GitHub-hosted runner of the matching CPU architecture (ubuntu-latest/ubuntu-24.04-arm).Build-only, not test: verified locally (in the actual
swift:6.3.3-jammycontainer) that the static SDK'sswift_staticresources don't ship aTesting.swiftmodule, so anything importing swift-testing — the whole test suite — fails to compile against this SDK regardless of host/target architecture match.swift buildalone was verified to succeed for both triples.Note:
swift sdk install --checksumneeds the checksum SwiftPM itself computes for the bundle, which differs from a plainsha256sumof the downloaded file by one trailing hex digit (SwiftPM appears to use its own checksum representation, not a raw SHA256 digest) — confirmed by havingswift sdk installreport its own "Computed archive checksum" and using that value verbatim.Test plan
Linux (musl, x86_64)andLinux (musl, aarch64)jobs and passes