Skip to content

Commit

Permalink
Merge branch 'main' into release/v2
Browse files Browse the repository at this point in the history
* main:
  Prepare for release 2.29.0.
  SDK command-line tools 11.0. (#356)
  Update npm packages. (#355)
  Check in updated `*.js` file.
  Update test fixture dependencies. (#354)
  Upgrade to latest npm dependencies (#347)
  Fixed emulator download URL (#343)
  Update README.md (Who is using…) (#335)
  • Loading branch information
ychescale9 committed Dec 6, 2023
2 parents d94c3fb + 677db68 commit 99a4aac
Show file tree
Hide file tree
Showing 13 changed files with 2,960 additions and 1,854 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
api-level: [16, 23, 29]
api-level: [23, 29]
target: [default, google_apis]
arch: [x86]
exclude:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## v2.29.0

* Fixed emulator download URL. - [#343](https://github.com/ReactiveCircus/android-emulator-runner/pull/343)
* Upgrade to latest npm dependencies. - [#347](https://github.com/ReactiveCircus/android-emulator-runner/pull/347) [#355](https://github.com/ReactiveCircus/android-emulator-runner/pull/355)
* Update SDK command-line tools to `11.0`. - [#356](https://github.com/ReactiveCircus/android-emulator-runner/pull/356)
* Update SDK build tools to `34.0.0`. - [#356](https://github.com/ReactiveCircus/android-emulator-runner/pull/356)

## v2.28.0

* Add `emulator-boot-timeout` to support configuring maximum time waiting for emulator boot. - [#326](https://github.com/ReactiveCircus/android-emulator-runner/pull/326)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,5 +210,6 @@ These are some of the open-source projects using (or used) **Android Emulator Ru
- [tinylog-org/tinylog](https://github.com/tinylog-org/tinylog/blob/v3.0/.github/workflows/build.yaml)
- [hzi-braunschweig/SORMAS-Project](https://github.com/hzi-braunschweig/SORMAS-Project/blob/development/.github/workflows/sormas_app_ci.yml)
- [ACRA/acra](https://github.com/ACRA/acra/blob/master/.github/workflows/test.yml)
- [bitfireAT/davx5-ose](https://github.com/bitfireAT/davx5-ose/blob/dev-ose/.github/workflows/test-dev.yml)

If you are using **Android Emulator Runner** and want your project included in the list, please feel free to open a pull request.
26 changes: 21 additions & 5 deletions lib/sdk-installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ const exec = __importStar(require("@actions/exec"));
const io = __importStar(require("@actions/io"));
const tc = __importStar(require("@actions/tool-cache"));
const fs = __importStar(require("fs"));
const BUILD_TOOLS_VERSION = '33.0.2';
// SDK command-line tools 9.0
const CMDLINE_TOOLS_URL_MAC = 'https://dl.google.com/android/repository/commandlinetools-mac-9477386_latest.zip';
const CMDLINE_TOOLS_URL_LINUX = 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip';
const BUILD_TOOLS_VERSION = '34.0.0';
// SDK command-line tools 11.0
const CMDLINE_TOOLS_URL_MAC = 'https://dl.google.com/android/repository/commandlinetools-mac-10406996_latest.zip';
const CMDLINE_TOOLS_URL_LINUX = 'https://dl.google.com/android/repository/commandlinetools-linux-10406996_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.
Expand All @@ -51,6 +51,7 @@ function installAndroidSdk(apiLevel, target, arch, channelId, emulatorBuild, ndk
try {
console.log(`::group::Install Android SDK`);
const isOnMac = process.platform === 'darwin';
const isArm = process.arch === 'arm64';
if (!isOnMac) {
yield exec.exec(`sh -c \\"sudo chown $USER:$USER ${process.env.ANDROID_HOME} -R`);
}
Expand All @@ -75,7 +76,22 @@ function installAndroidSdk(apiLevel, target, arch, channelId, emulatorBuild, ndk
if (emulatorBuild) {
console.log(`Installing emulator build ${emulatorBuild}.`);
// TODO find out the correct download URLs for all build ids
const downloadUrlSuffix = Number(emulatorBuild.charAt(0)) > 6 ? `_x64-${emulatorBuild}` : `-${emulatorBuild}`;
var downloadUrlSuffix;
const majorBuildVersion = Number(emulatorBuild);
if (majorBuildVersion >= 8000000) {
if (isArm) {
downloadUrlSuffix = `_aarch64-${emulatorBuild}`;
}
else {
downloadUrlSuffix = `_x64-${emulatorBuild}`;
}
}
else if (majorBuildVersion >= 7000000) {
downloadUrlSuffix = `_x64-${emulatorBuild}`;
}
else {
downloadUrlSuffix = `-${emulatorBuild}`;
}
yield exec.exec(`curl -fo emulator.zip https://dl.google.com/android/repository/emulator-${isOnMac ? 'darwin' : 'linux'}${downloadUrlSuffix}.zip`);
yield exec.exec(`unzip -o -q emulator.zip -d ${process.env.ANDROID_HOME}`);
yield io.rmRF('emulator.zip');
Expand Down
Loading

0 comments on commit 99a4aac

Please sign in to comment.