diff --git a/CHANGELOG.md b/CHANGELOG.md index f28079cb9..eaa0d1ae4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## v2.9.0 + +* Updated to SDK command-line tools `2.0`. + ## v2.8.0 * Added support for specifying a custom name used for creating the **AVD** - [#59](https://github.com/ReactiveCircus/android-emulator-runner/issues/59). diff --git a/README.md b/README.md index 529568a0f..b16058a2b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ GitHub Actions status

-A GitHub Action for installing, configuring and running hardware-accelerated Android Emulators on macOS virtual machines (or Linux virtual machines but without hardware accleration). +A GitHub Action for installing, configuring and running hardware-accelerated Android Emulators on macOS virtual machines. 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). @@ -24,8 +24,6 @@ This action automates the process by doing the following: 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**: ``` @@ -88,8 +86,6 @@ jobs: ## Configurations -| | **Required** | **Default** | **Description** | -|----------------------|--------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | | **Required** | **Default** | **Description** | |----------------------|--------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `api-level` | Required | N/A | API level of the platform system image - e.g. 23 for Android Marshmallow, 29 for Android 10. **Minimum API level supported is 15**. | @@ -107,7 +103,12 @@ jobs: 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._ +## Can I use this action on Linux VMs? + +The short answer is yes but it's expected to be a much worse experience (on some newer API levels it might not work at all) than running it on macOS. + +For a longer answer please refer to [this issue](https://github.com/ReactiveCircus/android-emulator-runner/issues/46). + ## Who is using Android Emulator Runner? @@ -126,5 +127,6 @@ These are some of the open-source projects using (or used) **Android Emulator Ru - [ReactiveCircus/FlowBinding](https://github.com/ReactiveCircus/FlowBinding) - [vinaygaba/Learn-Jetpack-Compose-By-Example](https://github.com/vinaygaba/Learn-Jetpack-Compose-By-Example/) - [ashishb/adb-enhanced](https://github.com/ashishb/adb-enhanced/tree/master/.github/workflows) +- [vgaidarji/ci-matters](https://github.com/vgaidarji/ci-matters/blob/master/.github/workflows/main.yaml) If you are using **Android Emulator Runner** and want your project included in the list, please feel free to create an issue or open a pull request. diff --git a/lib/sdk-installer.js b/lib/sdk-installer.js index 112cfdca8..ef6a64647 100644 --- a/lib/sdk-installer.js +++ b/lib/sdk-installer.js @@ -18,8 +18,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); const core = __importStar(require("@actions/core")); const exec = __importStar(require("@actions/exec")); const BUILD_TOOLS_VERSION = '29.0.3'; -const CMDLINE_TOOLS_URL_MAC = 'https://dl.google.com/android/repository/commandlinetools-mac-6200805_latest.zip'; -const CMDLINE_TOOLS_URL_LINUX = 'https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip'; +const CMDLINE_TOOLS_URL_MAC = 'https://dl.google.com/android/repository/commandlinetools-mac-6514223_latest.zip'; +const CMDLINE_TOOLS_URL_LINUX = 'https://dl.google.com/android/repository/commandlinetools-linux-6514223_latest.zip'; /** * Installs & updates the Android SDK for the macOS platform, including SDK platform for the chosen API level, latest build tools, platform tools, Android Emulator, * and the system image for the chosen API level, CPU arch, and target. diff --git a/src/sdk-installer.ts b/src/sdk-installer.ts index d39e9c33f..a84efa59d 100644 --- a/src/sdk-installer.ts +++ b/src/sdk-installer.ts @@ -2,8 +2,8 @@ import * as core from '@actions/core'; import * as exec from '@actions/exec'; const BUILD_TOOLS_VERSION = '29.0.3'; -const CMDLINE_TOOLS_URL_MAC = 'https://dl.google.com/android/repository/commandlinetools-mac-6200805_latest.zip'; -const CMDLINE_TOOLS_URL_LINUX = 'https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip'; +const CMDLINE_TOOLS_URL_MAC = 'https://dl.google.com/android/repository/commandlinetools-mac-6514223_latest.zip'; +const CMDLINE_TOOLS_URL_LINUX = 'https://dl.google.com/android/repository/commandlinetools-linux-6514223_latest.zip'; /** * Installs & updates the Android SDK for the macOS platform, including SDK platform for the chosen API level, latest build tools, platform tools, Android Emulator, diff --git a/test-fixture/app/build.gradle b/test-fixture/app/build.gradle index 20a46a05e..ef2159e29 100644 --- a/test-fixture/app/build.gradle +++ b/test-fixture/app/build.gradle @@ -28,7 +28,7 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'androidx.core:core-ktx:1.2.0' + implementation 'androidx.core:core-ktx:1.3.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.13' androidTestImplementation 'androidx.test.ext:junit:1.1.1' diff --git a/test-fixture/build.gradle b/test-fixture/build.gradle index d613bdc1a..06a3a6e92 100644 --- a/test-fixture/build.gradle +++ b/test-fixture/build.gradle @@ -7,7 +7,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.6.2' + classpath 'com.android.tools.build:gradle:4.0.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong