Skip to content

Your phone, on your command. Gotcha is world's first fully on-device AI copilot for Android that turns natural language into real device actions — safely.

ci: free runner disk space before booting the emulator

Durganshu Mishrade6baadd581a
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c89a3c7..7b8fd63 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -49,12 +49,14 @@ jobs:
app/build/test-results/testDebugUnitTest/
retention-days: 14
- # GMD's own emulator handling never booted on these runners: the emulator
- # process died instantly with empty stderr on all 5 GMD retries, with KVM
- # confirmed working (kvm_amd loaded, /dev/kvm rw). emulator-runner creates,
- # boots, and waits for the AVD itself — TESTING_PLAN.md lists it as the CI
- # fallback to GMD. GMD stays the local workflow; device configs below mirror
- # the GMD definitions in app/build.gradle.kts.
+ # GMD's own emulator handling never booted on these runners and swallowed
+ # the emulator's stderr; running the same emulator via emulator-runner
+ # surfaced the real error: "FATAL | Not enough space to create userdata
+ # partition. Available: 6508 MB, need 7372 MB" — the runner disk is nearly
+ # full, hence the "Free disk space" step. emulator-runner stays because it
+ # boots/waits for the AVD itself and actually reports emulator output;
+ # GMD remains the local workflow. Device configs mirror the GMD definitions
+ # in app/build.gradle.kts.
instrumented-smoke:
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
@@ -62,6 +64,19 @@ jobs:
steps:
- uses: actions/checkout@v4
+ # The emulator needs ~7.4 GB free for the userdata partition alone, plus
+ # the system image and AVD cache. Drop preinstalled toolchains we never
+ # use (~15-25 GB). Do NOT delete /opt/hostedtoolcache wholesale — that's
+ # where setup-java installs the JDK.
+ - name: Free disk space
+ run: |
+ df -h /
+ sudo rm -rf /usr/share/dotnet /usr/share/swift /opt/ghc \
+ /usr/local/.ghcup /usr/local/share/powershell \
+ /usr/local/share/boost /opt/hostedtoolcache/CodeQL
+ sudo docker image prune --all --force > /dev/null
+ df -h /
+
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
@@ -152,6 +167,16 @@ jobs:
steps:
- uses: actions/checkout@v4
+ # See the note on the same step in instrumented-smoke.
+ - name: Free disk space
+ run: |
+ df -h /
+ sudo rm -rf /usr/share/dotnet /usr/share/swift /opt/ghc \
+ /usr/local/.ghcup /usr/local/share/powershell \
+ /usr/local/share/boost /opt/hostedtoolcache/CodeQL
+ sudo docker image prune --all --force > /dev/null
+ df -h /
+
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
diff --git a/docs/RUNNING_TESTS.md b/docs/RUNNING_TESTS.md
index 1ffb137..3a0ad9d 100644
--- a/docs/RUNNING_TESTS.md
+++ b/docs/RUNNING_TESTS.md
@@ -143,9 +143,13 @@ making a visible AVD from it):
- **CI** (`.github/workflows/ci.yml`) — `instrumented-smoke` runs on every
push/PR (API 34 only); `instrumented-full` runs nightly and on manual
`workflow_dispatch` (API 27/30/33/34 as a job matrix). CI does **not** use
- GMD: GMD's emulator handling never booted on the GitHub runners (the
- emulator process died instantly with empty stderr on all 5 GMD retries,
- KVM confirmed working), so CI uses `reactivecircus/android-emulator-runner`
- to boot the AVD and then runs plain `:app:connectedDebugAndroidTest`
- against it. GMD remains the local workflow; the CI matrix mirrors the GMD
- device definitions in `app/build.gradle.kts`.
+ GMD: the emulator failed to boot on the GitHub runners and GMD swallowed
+ its stderr, reporting only "Error message from emulator process = []".
+ Switching to `reactivecircus/android-emulator-runner` surfaced the real
+ error — `FATAL | Not enough space to create userdata partition` (the
+ emulator needs ~7.4 GB free; the runner had ~6.5 GB) — fixed by the
+ "Free disk space" step that removes unused preinstalled toolchains.
+ emulator-runner stays because it reports emulator output and manages
+ boot/wait itself; CI runs plain `:app:connectedDebugAndroidTest`. GMD
+ remains the local workflow; the CI matrix mirrors the GMD device
+ definitions in `app/build.gradle.kts`.