From 0ac3f3449358c538ec73d9d73db6d45854730443 Mon Sep 17 00:00:00 2001 From: Yang Chen Date: Sat, 28 Mar 2020 13:41:36 +1100 Subject: [PATCH] Add information re. hardware acceleration for linux support. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d6956766..43bce09f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ GitHub Actions status

-A GitHub Action for installing, configuring and running Android Emulators on macOS virtual machines. +A GitHub Action for installing, configuring and running hardware-accelerated Android Emulators on macOS virtual machines (or Linux virtual machines but without hardware accleration). The old ARM-based emulators were slow and are no longer supported by Google. The modern Intel Atom (x86 and x86_64) emulators require hardware acceleration (HAXM on Mac & Windows, QEMU on Linux) from the host to run fast. This presents a challenge on CI as to be able to run hardware accelerated emulators within a docker container, **KVM** must be supported by the host VM which isn't the case for cloud-based CI providers due to infrastructural limits. If you want to learn more about this, here's an article I wrote: [Running Android Instrumented Tests on CI](https://dev.to/ychescale9/running-android-emulators-on-ci-from-bitrise-io-to-github-actions-3j76). @@ -22,7 +22,9 @@ This action automates the process by doing the following: ## Usage -Note that this action must be run on a **macOS** VM, e.g. `macos-latest` or `macos-10.15`. +It is recommended to run this action on a **macOS** VM, e.g. `macos-latest` or `macos-10.15` to take advantage of hardware accleration support provided by **HAXM**. + +Please note that while Linux VMs (e.g. `ubuntu-latest` or `ubuntu-18.04`) are also supported, hardware acceleration will **not** be available. A workflow that uses **android-emulator-runner** to run your instrumented tests on **API 29**: @@ -80,3 +82,5 @@ jobs: | `script` | Required | N/A | Custom script to run - e.g. to run Android instrumented tests on the emulator: `./gradlew connectedCheck` | Default `emulator-options`: `-no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim`. + +_Please note that if you are running on a Linux VM, `-no-accel` will be added to the `emulator-options` to make sure hardware acceleration is turned off._