Skip to content

Change default Android SDK build command#269

Merged
justice-adams-apple merged 1 commit into
swiftlang:mainfrom
jakepetroules:patch-1
May 12, 2026
Merged

Change default Android SDK build command#269
justice-adams-apple merged 1 commit into
swiftlang:mainfrom
jakepetroules:patch-1

Conversation

@jakepetroules
Copy link
Copy Markdown
Contributor

Updated default build command for Android SDK to use 'swift build' instead of 'swift build --build-system native'.

The 4/27 snapshot contains the requisite changes for Android to work.

For Wasm, we want to wait until swiftlang/swift-build#1348 lands before unpinning.

@marcprux
Copy link
Copy Markdown
Contributor

I think the fix in swift-android-sdk#3 should resolve the nightly-main build errors. Do you want to pull those changes into this PR, or should I file a separate PR against swiftlang/github-workflows? (I had filed it against swift-android-sdk/github-workflows because I don't have permission to run the workflows in swiftlang/github-workflows for testing).

@jakepetroules
Copy link
Copy Markdown
Contributor Author

Thanks, I incorporated your changes.

@marcprux
Copy link
Copy Markdown
Contributor

It looks like it is still failing, but the new log message indicates that it is using the right host toolchain:

** Host toolchain for Android build: /home/runner/.swift-toolchains/swift-DEVELOPMENT-SNAPSHOT-2026-04-28-a/usr/bin/swift

That new failure seems to be coming from:

find: ‘/home/runner/work/github-workflows/github-workflows/tests/TestPackage/.build/x86_64-unknown-linux-android28/debug’: No such file or directory

Should we be expecting a different output folder?

@jakepetroules jakepetroules force-pushed the patch-1 branch 2 times, most recently from 89ee068 to 26548d7 Compare May 1, 2026 04:24
@marcprux
Copy link
Copy Markdown
Contributor

marcprux commented May 1, 2026

I think the issue here is that swift-build changed where they are outputting the tests, which is going to break the assumptions we make in the Android testing support here, as well as in skip (skiptools/skipstone#244) and the swift-android-action GitHub workflow (skiptools/swift-android-action#21).

So for example, we need to change the assumption that the test case is built at .build/aarch64-unknown-linux-android28/debug/swift-algorithmsPackageTests.xctest and instead copy it from .build/out/Products/Debug-android/SwiftAlgorithmsTests-test-runner.

@jakepetroules jakepetroules force-pushed the patch-1 branch 4 times, most recently from 4ffd4c5 to 5742b2a Compare May 12, 2026 07:33
description: "Command to use when building the package with the Swift SDK for Android"
# Temporarily use native build system on Android due to https://github.com/swiftlang/swift/issues/88282
default: "swift build --build-system native"
default: "swift build"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Comment thread .github/workflows/scripts/install-and-build-with-sdk.sh Outdated
- Change default build command to use 'swift build' instead of
  'swift build --build-system native' (the 4/27 snapshot contains
  the requisite changes for Android)
- Use the correct host toolchain for Android build/test
- Add mention of the specific host SDK being used to build

For Wasm, we want to wait until
swiftlang/swift-build#1348 lands before
unpinning.

Co-authored-by: Marc Prud'hommeaux <mwp1@cornell.edu>
@justice-adams-apple justice-adams-apple merged commit a3aac61 into swiftlang:main May 12, 2026
154 of 155 checks passed
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.

4 participants