From 258e2fac3b2f07f3a1a7490e91b9bc72da41746d Mon Sep 17 00:00:00 2001 From: Mark Xue Date: Mon, 17 Aug 2026 23:48:44 -0700 Subject: [PATCH] Stabilise the Android emulator: no snapshot, more RAM, reclaim disk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Android leg has failed twice in a row on a PR whose tests pass on every other platform, and in both cases the emulator died rather than a test failing: once as `adb: device offline` immediately after "Successfully loaded snapshot", once as the adb daemon becoming unreachable mid-run (exit 137, SIGKILL). When the emulator survives, all 119 tests pass. -no-snapshot removes the snapshot save/restore step implicated in the first mode, trading a slower boot for determinism — there is room inside the existing 30-minute budget, since a full run is currently under six. -memory 4096 gives the AVD headroom for test binaries that statically link C libraries, and freeing disk first keeps the Swift toolchain and Android SDK from crowding out the emulator image. Note that android-emulator-options replaces the action's default rather than appending, so the three existing flags are repeated here. --- .github/workflows/ci-android.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci-android.yml b/.github/workflows/ci-android.yml index 9ca6ea8..ceeb34e 100644 --- a/.github/workflows/ci-android.yml +++ b/.github/workflows/ci-android.yml @@ -26,3 +26,13 @@ jobs: uses: skiptools/swift-android-action@v2 with: swift-version: "6.3" + # The emulator, not the tests, is what fails here: seen twice as + # `adb: device offline` right after "Successfully loaded snapshot", + # and as the adb daemon dying mid-run (exit 137) — never as a failing + # assertion. `-no-snapshot` takes the snapshot save/restore step out + # of the picture at the cost of a slower boot, and the extra memory + # gives the AVD headroom now that the test binary statically links + # libsecp256k1. Reclaiming disk first keeps the Swift toolchain and + # Android SDK from crowding the emulator's own image out. + android-emulator-options: "-no-window -noaudio -no-boot-anim -no-snapshot -memory 4096" + free-disk-space: "true"