Repository navigation
Use 4-core Linux for Android device tests - #2139
Conversation
|
This blog post from GitHub has the additional detail needed to enable KVM nested virtualization, which the Android emulator requires: |
|
It works! Had to change the cache key to not use the AVDs created from the macOS runner. Other than that, was pretty straightforward. Also tested if hardware GPU acceleration ( |
|
Seems to be working well now. This is a representative run (uses cached avds from prior run): May be possible to optimize further, but this is pretty good. Seems to be stable so far also. |
|
Holding temporarily for internal review, but it does all work. |
That compares to: |
|
When they work, the perf is about the same. It does vary somewhat between runs though. The problem is that they often don't work. If the emulator fails to boot, the test eventually times out. Then we have to re-run the failed jobs. The hope is that running on Linux will be more stable. Either way, they're definitely cheaper. |
The emulator jobs ran on the ubuntu-latest-4-cores larger runner. #2139 moved them there in 2023 because the 2-core standard runners couldn't run a hardware-accelerated emulator. Since April 2024 they can, with the same KVM udev rule this workflow already sets, and on public repositories ubuntu-latest now has 4 CPUs and 16 GB of RAM. The standard runner has less disk, so the jobs print the free space before and after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The emulator jobs ran on the ubuntu-latest-4-cores larger runner. #2139 moved them there in 2023 because the 2-core standard runners couldn't run a hardware-accelerated emulator. Since April 2024 they can, with the same KVM udev rule this workflow already sets, and on public repositories ubuntu-latest now has 4 CPUs and 16 GB of RAM. Both the device test and the integration test jobs move. On the first runs the device tests took 2.5 to 4.5 minutes, against 2.3 to 4.4 on the larger runner, with the same 2,921 tests. The standard runner listed less disk, but had 88 GB free at the start and 67 at the end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The emulator jobs ran on the ubuntu-latest-4-cores larger runner. #2139 moved them there in 2023 because the 2-core standard runners couldn't run a hardware-accelerated emulator. Since April 2024 they can, with the same KVM udev rule this workflow already sets, and on public repositories ubuntu-latest now has 4 CPUs and 16 GB of RAM. Both the device test and the integration test jobs move. On the first runs the device tests took 2.5 to 4.5 minutes, against 2.3 to 4.4 on the larger runner, with the same 2,921 tests. The standard runner listed less disk, but had 88 GB free at the start and 67 at the end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The emulator jobs ran on the ubuntu-latest-4-cores larger runner. #2139 moved them there in 2023 because the 2-core standard runners couldn't run a hardware-accelerated emulator. Since April 2024 they can, with the same KVM udev rule this workflow already sets, and on public repositories ubuntu-latest now has 4 CPUs and 16 GB of RAM. Both the device test and the integration test jobs move. On the first runs the device tests took 2.5 to 4.5 minutes, against 2.3 to 4.4 on the larger runner, with the same 2,921 tests. The standard runner listed less disk, but had 88 GB free at the start and 67 at the end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The emulator jobs ran on the ubuntu-latest-4-cores larger runner. #2139 moved them there in 2023 because the 2-core standard runners couldn't run a hardware-accelerated emulator. Since April 2024 they can, with the same KVM udev rule this workflow already sets, and on public repositories ubuntu-latest now has 4 CPUs and 16 GB of RAM. Both the device test and the integration test jobs move. On the first runs the device tests took 2.5 to 4.5 minutes, against 2.3 to 4.4 on the larger runner, with the same 2,921 tests. The standard runner listed less disk, but had 88 GB free at the start and 67 at the end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The emulator jobs ran on the ubuntu-latest-4-cores larger runner. #2139 moved them there in 2023 because the 2-core standard runners couldn't run a hardware-accelerated emulator. Since April 2024 they can, with the same KVM udev rule this workflow already sets, and on public repositories ubuntu-latest now has 4 CPUs and 16 GB of RAM. Both the device test and the integration test jobs move. On the first runs the device tests took 2.5 to 4.5 minutes, against 2.3 to 4.4 on the larger runner, with the same 2,921 tests. The standard runner listed less disk, but had 88 GB free at the start and 67 at the end. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>


When running the Android device tests, lets run the Android emulator on a 4-core Linux "larger runner" instead of the macOS runner.
For Linux, this only works on larger runners, because the 2-core default Linux runners are on hardware that does not support nested virtualization. We were running them previously on macOS, which do support nested virtualization but for some reason are still flaky when trying to use it.
This is in hopes that we have fewer intermittent test failures related to the emulator failing to boot.
It also happens to be cheaper.
#skip-changelog