Skip to content

Commit df815ed

Browse files
committed
Fix Android CI: correct armv7 triple and emulator OOM
The Swift Android SDK names its armv7 target triples armv7-unknown-linux-android<api> (not androideabi), so build against armv7-unknown-linux-android28 directly. Also free disk space before the emulator job, which was getting OOM-killed (adb exit 137) right after boot.
1 parent 5422493 commit df815ed

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ 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.
20+
free-disk-space: true
1821

1922
android-armv7:
2023
name: Android (armv7 cross-compile)
@@ -38,12 +41,8 @@ jobs:
3841
swift sdk list
3942
# armv7 can't run on the x86_64 emulator, so this is a cross-compile check
4043
# only. The bundle installs as a single multi-arch SDK; the architecture is
41-
# selected by target triple. Read the exact armv7 triple (with its
42-
# API-level suffix) from the installed SDK metadata rather than pinning it.
44+
# selected by target triple. The SDK's armv7 triples are named
45+
# `armv7-unknown-linux-android<api>` (not `...androideabi<api>`), one per
46+
# Android API level 28-36.
4347
- name: Build (armv7)
44-
run: |
45-
set -eux
46-
TRIPLE=$(grep -rhoE 'armv7-unknown-linux-androideabi[0-9]*' ~/.swiftpm | sort -u | head -1)
47-
test -n "$TRIPLE"
48-
echo "Using target triple: $TRIPLE"
49-
swift build --swift-sdk "$TRIPLE"
48+
run: swift build --swift-sdk armv7-unknown-linux-android28

0 commit comments

Comments
 (0)