Skip to content

ci(android-llmservice): always build the APK; split off the emulator test as an optional non-gating check#321

Merged
bernardladenthin merged 1 commit into
mainfrom
claude/android-llmservice-emulator-disk-fix
Jul 10, 2026
Merged

ci(android-llmservice): always build the APK; split off the emulator test as an optional non-gating check#321
bernardladenthin merged 1 commit into
mainfrom
claude/android-llmservice-emulator-disk-fix

Conversation

@bernardladenthin

@bernardladenthin bernardladenthin commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

Two related CI fixes for the LLM Service Android app so a flaky/slow emulator never blocks getting the installable APK.

1. Free disk space before the emulator. The emulator FATALed with Not enough space to create userdata partition. Available: 3892 MB, need 7372 MB → never booted → the boot-poll loop ran to timeout (looked like a hang). Root cause: the full ~10 GB GGUF cache restore left too little free, but only the tiny draft model is pushed to the device. Added a cleanup step (both emulator jobs) that deletes every restored model except DRAFT_MODEL_NAME (generic find … ! -name) + large unused preinstalled toolchains + docker images → frees ~15 GB. Verified in the last run: "Disk space requirements … are met", emulator booted, connectedDebugAndroidTest started.

2. Split build ⟂ emulator test. Previously one job built the AAB/APK and ran the emulator test, with the artifact-upload steps after the test — so a red emulator meant no APK. Now split into two jobs:

  • build-android-llmservice — builds the release AAB + installable APK and uploads them. No emulator, no model cache. A flaky emulator can never block the APK. (Also dropped verify-model-cache from its needs and assembleDebug from the build.)
  • test-android-llmservice (new) — a separate, non-gating check that boots the emulator and runs connectedDebugAndroidTest. It can go red on its own without stopping the build/artifacts. Keep it non-required in branch protection to make the emulator test optional (visible-but-non-blocking) — exactly the "sim test more optional but still can be red" ask.

CLAUDE.md's CI-wiring section updated to describe the split.

Split out of #320 (already merged); this is CI-only, on top of current main.

Test plan

  • YAML validated (yaml.safe_load); both jobs parse with correct needs
  • Disk fix already proven in the prior run (emulator boots)
  • Build job no longer depends on the emulator → APK/AAB always uploaded

Checklist

  • Conventional Commits
  • No security-sensitive changes

🤖 Generated with Claude Code

https://claude.ai/code/session_01HTS5FpMtBLJENTGoRUrp5m

…data OOM)

The build-android-llmservice emulator step FATALed with 'Not enough space
to create userdata partition. Available: 3892 MB, need 7372 MB' — the AVD
userdata partition couldn't be created, so the emulator never booted and
the boot-poll loop ran until timeout (looked like a hang).

Root cause is disk pressure, not the app change: the job does the release
R8 build (AAB+APK) AND restores the full ~10 GB GGUF cache, but only
adb-pushes the tiny draft model to the emulator. Add a cleanup step right
before the emulator (both emulator jobs) that deletes every restored model
except DRAFT_MODEL_NAME plus large unused preinstalled toolchains
(dotnet/ghc/powershell/CodeQL) and prunes docker images — freeing ~15 GB
so the userdata partition fits.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HTS5FpMtBLJENTGoRUrp5m
@bernardladenthin bernardladenthin merged commit dce53e7 into main Jul 10, 2026
10 of 14 checks passed
@bernardladenthin bernardladenthin deleted the claude/android-llmservice-emulator-disk-fix branch July 10, 2026 18:07
@sonarqubecloud

Copy link
Copy Markdown

@bernardladenthin bernardladenthin changed the title ci(android-llmservice): free disk space before the emulator (fix userdata OOM) ci(android-llmservice): always build the APK; split off the emulator test as an optional non-gating check Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants