Skip to content

Change default Android SDK build command#269

Open
jakepetroules wants to merge 1 commit intoswiftlang:mainfrom
jakepetroules:patch-1
Open

Change default Android SDK build command#269
jakepetroules wants to merge 1 commit intoswiftlang: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?

- 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>
@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.

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.

3 participants