-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an Android workflow, for Swift packages to build the Android SDK and test against #83
Comments
We might want to base this on https://github.com/marketplace/actions/swift-android-action, which supports building and testing on both Linux and macOS (Intel) hosts, as well as caching the SDK, host toolchain, and emulator. The SDK is currently downloaded from a mirror of https://github.com/finagolfin/swift-android-sdk/releases, but adding a step to optionally build it from source would be a possibility, at least for Linux. |
Fine by me, if you've done the work already and want to submit it here. |
Well, I wouldn't quite say that, yet :). Getting this working would essentially require mashing your SDK build step (sdks.yml#L109) into a pre-build step of swift-android-action's action.yml#L154. This could be optimized somewhat, since the SDK bundle that is produced could just contain the host architecture (rather than each of aarch64, x86_64, and armv7, as your general SDK release includes). I'm wondering a few things:
|
More than that, it wouldn't have to be a bundle, but just an Android SDK with a destination config file for this workflow.
In this repo? Or directly in the workflow script if external patch files won't work somehow. I just checked and my current SDK build only has to patch 8-9 lines in 6.1/6.2 for Android, and I'm about to upstream those too.
Cutting down the dependency tree further, that's all.
Um, libicu's already been removed as an external dependency, 😃 so I'd just use the swift-foundation-icu package instead.
Both shouldn't be hard.
That's been working for awhile: I think you had it working through llbuild too, which is more than the SDK needs. Of course, there may have been regressions since, but I expect to look into and figure that out soon. |
I've had requests for an Android workflow, both using my unofficial SDK, finagolfin/swift-android-sdk#127, and for whenever an official Android SDK is available. Rather than waiting for an official Android SDK first, I thought I could put together an Android workflow here that builds the Android SDK from source on first use, then uses it to cross-compile that Swift package that invoked this workflow on its CI and run its tests in the Android emulator, before finally caching the freshly-built Android SDK on that Swift package's CI for subsequent test runs.
Here are some further details:
posix_spawn()
wrapper to Android API 24 and libcurl/libxml2 for Foundation. I'd simply require Android API 28, whenposix_spawn()
was added to Android, and removeFoundationNetworking
andFoundationXML
support for this workflow, looking into ways to add those back later, so no such external libraries would be required for this workflow.@FranzBusch or @shahmishal, let me know if you'd be okay with adding such an Android workflow here, will put together a pull if so.
The text was updated successfully, but these errors were encountered: