Skip to content

Install the cross-compile Swift SDK matching the container toolchain - #72

Merged
ctreffs merged 2 commits into
masterfrom
ci/sdk-matches-toolchain
Oct 17, 2026
Merged

ctreffs merged 2 commits into
masterfrom
ci/sdk-matches-toolchain

Conversation

@ctreffs

@ctreffs ctreffs commented Oct 17, 2026

Copy link
Copy Markdown
Member

Problem

Renovate's #71 bumped the Cross-Compile containers to swift:6.4.1, but the workflow still installed the pinned 6.3.3 Swift SDKs. An SDK must match the compiler version exactly, so Musl, WASI and Android all fail on master and on #69.

Change

Scripts/install-swift-sdk.sh <static|wasm|android>:

  • reads the release tag from swift --version. It handles swift-6.4-RELEASE, which the API lists as 6.4.0.
  • looks up the SDK URL and checksum in the official swift.org release API (/api/v1/install/releases.json), the same source the pinned checksums came from;
  • runs swift sdk install <url> --checksum <sha256>.

The wasm and Android build steps discover their SDK IDs via swift sdk list instead of hard-coding them. Renovate can keep bumping the container tags, and the SDKs follow.

Trade-off: checksums are no longer pinned in the repo. They come over HTTPS from swift.org at install time, from the same host that serves the bundles.

Tests

  • Dry run with a stubbed swift binary for 6.4.1, 6.4 (→ 6.4.0) and 6.3.3. The URLs it builds exist, and for 6.3.3 it produces exactly the checksums that were pinned before.
  • This PR's own Cross-Compile run on swift:6.4.1 is the real test.

https://claude.ai/code/session_011WSUtoLptjea3s3iC5wTNC

Renovate bumped the Cross-Compile containers to swift:6.4.1 (#71) while
the workflow still installed the pinned 6.3.3 SDKs. A Swift SDK must
match the compiler exactly, so all three jobs failed.

Scripts/install-swift-sdk.sh reads the toolchain release tag from
`swift --version` and looks up the SDK URL and checksum in the official
swift.org release API, so future Renovate bumps keep working. The wasm
and Android SDK IDs are discovered via `swift sdk list`.

Claude-Session: https://claude.ai/code/session_011WSUtoLptjea3s3iC5wTNC
With 6.4.1, `swift sdk list` prints bundle names instead of target
triples, so the Android SDK lookup came back empty.

Claude-Session: https://claude.ai/code/session_011WSUtoLptjea3s3iC5wTNC
@ctreffs
ctreffs merged commit 0609574 into master Oct 17, 2026
15 checks passed
@ctreffs
ctreffs deleted the ci/sdk-matches-toolchain branch October 17, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant