Skip to content

Add official Swift SDK cross-build for Android#18

Merged
colemancda merged 2 commits into
masterfrom
feature/android
Jul 14, 2026
Merged

Add official Swift SDK cross-build for Android#18
colemancda merged 2 commits into
masterfrom
feature/android

Conversation

@colemancda

@colemancda colemancda commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds a new android-sdk CI job that cross-compiles CoreModel for Android using the official swift-6.3.2-RELEASE_android Swift SDK (swift build --swift-sdk <triple> --static-swift-stdlib), for aarch64-unknown-linux-android28 and x86_64-unknown-linux-android28.
  • Complements the existing android job, which builds via the Skip toolchain.
  • Follows the setup documented at https://www.swift.org/documentation/articles/swift-sdk-for-android-getting-started.html: install the SDK artifact bundle, download & link Android NDK r27d via the bundle's setup-android-sdk.sh, then cross-compile with --swift-sdk <triple>.

Verified locally (after installing the NDK and running the setup script) that both triples build cleanly with macros enabled and disabled.

Test plan

  • swift build --swift-sdk aarch64-unknown-linux-android28 --static-swift-stdlib — passes locally
  • swift build --swift-sdk x86_64-unknown-linux-android28 --static-swift-stdlib — passes locally
  • CI job passes on a clean runner

Adds a Linux-container job that installs the official
swift-6.3.2-RELEASE_android Swift SDK, sets up the Android NDK
(r27d) via the SDK's setup-android-sdk.sh script, and cross-compiles
for aarch64-unknown-linux-android28 and x86_64-unknown-linux-android28
using swift build --swift-sdk <triple> --static-swift-stdlib, as
documented at swift.org/documentation/articles/swift-sdk-for-android-getting-started.html.
This complements the existing Skip-toolchain-based Android job.
…ng path

The doc-recommended ~/.swiftpm/swift-sdks/... path didn't match where
swift sdk install placed the bundle inside the swift:6.3.2 container
(actual HOME differed from what the docs assume). Locate the
swift-android directory with find instead of hardcoding the path.
@colemancda colemancda merged commit 2559564 into master Jul 14, 2026
30 checks passed
@colemancda colemancda deleted the feature/android branch July 14, 2026 04:57
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