fix(ci): limit debug APK to arm64-v8a so apksigner has disk to write
Android Build / build-apk (push) Failing after 9m10s
Build and Deploy / build-and-push (push) Successful in 52s

The previous run got all the way through compile + link + zipalign and
then died inside apksigner with `IOException: No space left on device`.
Cross-compiling all three Android ABIs (arm64-v8a, armeabi-v7a, x86_64)
in debug mode blows target/ past 25 GB, and by the time apksigner is
streaming the signed APK to disk the runner has nothing left.

Two changes:

  1. build_android_apk.sh now reads `ABIS` from the environment (defaults
     to all three for backwards compat) and uses it to assemble the
     cargo-ndk `-t` flags.
  2. android-build.yml passes ABIS=arm64-v8a, since the debug artifact
     is consumed by adb-installing to a single arm64 device and the
     other two ABIs were dead weight.

Also frees \$STAGING/app-unsigned.apk right after zipalign so it's not
sitting next to the aligned APK and the output APK during signing.

Release workflow is untouched — release APKs still ship all three ABIs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
funman300
2026-05-14 12:51:04 -07:00
parent ba786f5a09
commit 533bcec2d8
2 changed files with 18 additions and 8 deletions
+5
View File
@@ -104,6 +104,10 @@ jobs:
run: cargo install cargo-ndk --locked
# ── Build APK ──────────────────────────────────────────────────────
# Debug CI only builds arm64-v8a — full three-ABI debug builds blow
# past the runner's disk budget (~25 GB of target/ + intermediate
# APKs caused apksigner to OOM-on-disk in the previous run). Release
# CI still ships all three ABIs from android-release.yml.
- name: Build debug APK
env:
ANDROID_HOME: ${{ env.ANDROID_SDK }}
@@ -111,6 +115,7 @@ jobs:
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOLS_VERSION }}
PLATFORM: ${{ env.PLATFORM }}
PROFILE: debug
ABIS: arm64-v8a
run: ./scripts/build_android_apk.sh
# ── Artifact ───────────────────────────────────────────────────────