fix(ci): free disk space + drop x86_64 from release build to fix OOM
Android Build / build-apk (push) Successful in 16m44s
Build and Deploy / build-and-push (push) Failing after 30s
Android Release / build-release-apk (push) Failing after 12m5s

Run 181 (v0.25.0 tag) failed at "Build signed release APK" after ~7 min —
same disk-exhaustion pattern that hit the debug build. The debug workflow
was already fixed to arm64-v8a only; the release workflow still built all 3
ABIs and exceeded the runner's disk budget.

Changes:
- Add "Free disk space" step before system deps: removes /usr/local/lib/android,
  /usr/share/dotnet, /opt/ghc, /usr/local/share/boost (~10 GB reclaimed).
- Limit ABIS to arm64-v8a + armeabi-v7a (drops x86_64, which is emulator-only).
- Remove x86_64 from rustup target add to match.

arm64-v8a covers all modern Android devices; armeabi-v7a covers legacy ARM.
x86_64 can be re-added later if a simulator-targeted test build is needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-05-14 13:53:48 -07:00
parent 32991301dd
commit ab35fcf906
+17 -2
View File
@@ -25,6 +25,18 @@ jobs:
id: meta
run: echo "tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
# ── Free disk space ────────────────────────────────────────────────
# A 2-ABI release build (arm64 + armv7) generates ~15 GB of target/
# output. Remove pre-installed runner tooling that is never used
# during an Android build to reclaim ~10 GB before we start.
- name: Free disk space
run: |
sudo rm -rf /usr/local/lib/android # runner pre-installed SDK
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
df -h /
# ── System dependencies ────────────────────────────────────────────
- name: Install system dependencies
run: |
@@ -67,8 +79,7 @@ jobs:
run: |
rustup target add \
aarch64-linux-android \
armv7-linux-androideabi \
x86_64-linux-android
armv7-linux-androideabi
# ── Cargo caches ───────────────────────────────────────────────────
- name: Cache Cargo registry
@@ -110,6 +121,10 @@ jobs:
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOLS_VERSION }}
PLATFORM: ${{ env.PLATFORM }}
PROFILE: release
# arm64-v8a covers all modern Android phones; armeabi-v7a covers
# legacy ARM devices. x86_64 is emulator-only and dropped to
# stay within the runner's ~25 GB disk budget.
ABIS: arm64-v8a armeabi-v7a
KEYSTORE: /tmp/solitaire-release.jks
KEYSTORE_PASS: ${{ secrets.KEYSTORE_PASS }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}