Add official Swift SDK cross-build for Android#18
Merged
Conversation
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.
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
android-sdkCI job that cross-compilesCoreModelfor Android using the officialswift-6.3.2-RELEASE_androidSwift SDK (swift build --swift-sdk <triple> --static-swift-stdlib), foraarch64-unknown-linux-android28andx86_64-unknown-linux-android28.androidjob, which builds via the Skip toolchain.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 locallyswift build --swift-sdk x86_64-unknown-linux-android28 --static-swift-stdlib— passes locally