Skip to content

Commit 10fa446

Browse files
committed
Harden Android emulator boot against intermittent exit 137
The GitHub-hosted x86_64 emulator was dying with SIGKILL (exit 137) right after reporting boot, failing the unit-test job non-deterministically. Force a cold boot with software rendering and a longer boot timeout so the emulator starts deterministically instead of restoring a crash-prone snapshot.
1 parent 5ecc937 commit 10fa446

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎.github/workflows/swift-android.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,15 @@ jobs:
1515
uses: skiptools/swift-android-action@v2
1616
with:
1717
swift-version: 6.3.3
18-
# Free disk space before launching the emulator; without the headroom
19-
# the emulator has been getting OOM-killed (adb exit 137) right after boot.
18+
# Free disk space before launching the emulator for extra headroom.
2019
free-disk-space: true
20+
# The GitHub-hosted x86_64 emulator intermittently dies with exit 137
21+
# right after "Emulator booted" (adb: device offline). Force a cold boot
22+
# (-no-snapshot, avoiding a crash-prone snapshot restore) with software
23+
# rendering (-gpu swiftshader_indirect) and a generous boot timeout to
24+
# make the boot deterministic.
25+
android-emulator-options: -no-snapshot -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -camera-front none
26+
android-emulator-boot-timeout: 900
2127

2228
android-armv7:
2329
name: Android (armv7 cross-compile)

0 commit comments

Comments
 (0)