Half GitHub's price
At every size. 4 vCPU is $0.012 a minute on GitHub and $0.006 here.
- APK and AAB
- Lint and unit tests
- Signing
Change one line in your GitHub Actions workflow. Gradle builds, lint, unit tests and emulator tests run in a fresh VM per job, billed by the second.
APK and AAB builds·Emulator tests with KVM·Billed by the second
At every size. 4 vCPU is $0.012 a minute on GitHub and $0.006 here.
runs-on: groundbox picks the size from the job's runs. A build that fills its cores or memory moves up. One that doesn't moves down.
setup-gradle's cache is served from the machine the job runs on. Turn on Gradle's build cache and tasks from earlier builds are reused.
setup-java, setup-android and setup-gradle work as they are. Java 21 is on the runner. setup-android installs the SDK into the job's VM.
name: Android
on: [push, pull_request]
jobs:
build:
runs-on: groundbox
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- uses: android-actions/setup-android@v3
- uses: gradle/actions/setup-gradle@v4
- run: ./gradlew assembleDebug lint testDebugUnitTest
It builds a debug APK, runs lint and runs the unit tests. Use bundleRelease for an AAB. Signing, caches and tips are in the docs.
name: Android emulator tests
on: [push, pull_request]
jobs:
instrumented:
runs-on: groundbox-8vcpu
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 21
- uses: android-actions/setup-android@v4
- uses: gradle/actions/setup-gradle@v6
- uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
arch: x86_64
target: google_apis
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
disable-animations: true
script: ./gradlew connectedDebugAndroidTest
The runners have KVM, so the emulator runs with hardware acceleration. runs-on: groundbox-8vcpu gives Gradle and the emulator the cores they want. More in the docs.
| Task | On Groundbox |
|---|---|
| APK and AAB builds | yes |
| Gradle and the Gradle wrapper | yes |
| Android lint | yes |
| Unit tests | yes |
| Signing with your keystore | yes |
| Emulator and instrumented tests | yes, with KVM |
The runners have KVM, so the Android emulator runs with hardware acceleration.
| Size | GitHub-hosted / Groundbox |
|---|---|
| 2 vCPU · 8 GB | $0.006 / $0.003 a minute |
| 4 vCPU · 16 GB | $0.012 / $0.006 a minute |
| 8 vCPU · 32 GB | $0.022 / $0.011 a minute |
| 16 vCPU · 64 GB | $0.042 / $0.021 a minute |
GitHub's list price for a Linux runner with the same vCPUs. With runs-on: groundbox you pay the price of the size the job ran at. See pricing.
| How do I build an Android app on GitHub Actions? | Check out the code, set up Java with actions/setup-java, the Android SDK with android-actions/setup-android and Gradle with gradle/actions/setup-gradle. Then run ./gradlew assembleDebug, or bundleRelease for an AAB. |
| Why is my Android build slow on GitHub Actions? | Gradle uses every core and a lot of memory, and a cold cache downloads every dependency again. Cache Gradle with setup-gradle, turn on the Gradle build cache with org.gradle.caching=true, and give the job more cores. |
| What does Android CI cost on Groundbox? | Half GitHub's list price at each size: $0.006 a minute for 4 vCPU against $0.012 on GitHub, billed by the second. With runs-on: groundbox you pay for the size each job ran at. |
| Do I need to change my Android workflow? | Change runs-on to groundbox. Java 21 is on the runner already. The Android SDK is not, so keep android-actions/setup-android in the workflow; it installs the SDK into the job's VM. |
| Does Groundbox cache Gradle dependencies? | Yes. setup-gradle and actions/cache keep their caches on the machine the job runs on, with no change to the workflow. Gradle's build cache is set up on the runner too; turn it on with org.gradle.caching=true. |
| Can I run the Android emulator or instrumented tests? | Yes. The runners have KVM, so the emulator runs with hardware acceleration. Use reactivecircus/android-emulator-runner on runs-on: groundbox-8vcpu. |