Skip to content

Run the Android emulator tests in their own jobs - #347

Merged
FranzBusch merged 1 commit into
swiftlang:mainfrom
rnro:android_arch_split
Nov 4, 2026
Merged

FranzBusch merged 1 commit into
swiftlang:mainfrom
rnro:android_arch_split

Conversation

@rnro

@rnro rnro commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Motivation

An Android SDK job with the emulator enabled built every triple one after another before it started the emulator, so the emulator waited on builds of triples it never runs.

image

The script also chose the triple to run by taking the last one in the list, an ordering convention which felt like a footgun.

Changes

Split out build and testing work into different jobs on separate executors, parallelizing the work.

Replaced android_sdk_triples, enable_android_emulator_tests and the choice of emulator triple with two lists: android_sdk_build_triples for triples that are only built, and android_emulator_test_triples for triples that are built and run on an emulator. The defaults build aarch64 only and run x86_64 on the emulator. Each emulator triple builds in its own job, and the build-only triples share one job beside them. Only an emulator job builds the test binaries.

enable_android_sdk_build still turns off all of the Android jobs. To drop only the emulator, empty android_emulator_test_triples, or move its triples to android_sdk_build_triples to keep building them.

The generator fails when a triple appears more than once across the two lists, when one is blank, or, with the SDK build enabled, when both lists are empty.

NOTE: When executing, entry names will change because an entry is named for the triples it builds when they are split, for example

Android SDK Swift current NDK r30

becomes

Android SDK Swift current NDK r30 x86_64-android28
Android SDK Swift current NDK r30 aarch64-android28

Entry names are required status checks in adopting repositories, so they will need updating, and a caller that set android_sdk_triples or enable_android_emulator_tests must switch to the new inputs.

An Android SDK job with the emulator enabled built every triple one after another before it started the emulator, so the emulator waited on builds of triples it never runs. The script chose the triple to run by taking the last one in the list, an ordering convention a caller could not see.

Replaced `android_sdk_triples`, `enable_android_emulator_tests` and the choice of emulator triple with two lists: `android_sdk_build_triples` for triples that are only built, and `android_emulator_test_triples` for triples that are built and run on an emulator. The defaults build `aarch64` only and run `x86_64` on the emulator. Each emulator triple builds in its own job, and the build-only triples share one job beside them. Only an emulator job builds the test binaries.

`enable_android_sdk_build` still turns off all of the Android jobs. To drop only the emulator, empty `android_emulator_test_triples`, or move its triples to `android_sdk_build_triples` to keep building them.

The generator fails when a triple appears more than once across the two lists, when one is blank, or, with the SDK build enabled, when both lists are empty.

Entry names change because an entry is named for the triples it builds when they are split, for example `Android SDK Swift current NDK r30` becomes `Android SDK Swift current NDK r30 x86_64-android28` and `Android SDK Swift current NDK r30 aarch64-android28`. Entry names are required status checks in adopting repositories, so they will need updating, and a caller that set `android_sdk_triples` or `enable_android_emulator_tests` must switch to the new inputs.
@rnro
rnro requested a review from a team as a code owner November 3, 2026 16:55
@rnro

rnro commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

@finagolfin do you have any opinions on this change?

@finagolfin

Copy link
Copy Markdown
Member

Skimmed it, seems fine to me: we discussed adding the multiple test triples portion of this in #226, so we want that feature.

@FranzBusch
FranzBusch merged commit a499273 into swiftlang:main Nov 4, 2026
220 of 224 checks passed
@rnro
rnro deleted the android_arch_split branch November 4, 2026 14:44
FranzBusch pushed a commit to apple/swift-temporal-sdk that referenced this pull request Nov 9, 2026
### Motivation

swiftlang/github-workflows#347 removed the
enable_android_emulator_tests input, but this repo was still using it,
leading to failures like [this
one](https://github.com/apple/swift-temporal-sdk/actions/runs/42518064918).

### Modifications

Removed the `enable_android_emulator_tests` flag, we don't need to turn
off just emulators anyway since `enable_android_sdk_build` is already
set to `false`.

### Result

CI should start working again.

### Test Plan

Will check it on the PR CI.
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