Coder Social home page Coder Social logo

malinskiy / action-android Goto Github PK

View Code? Open in Web Editor NEW
181.0 9.0 23.0 7.54 MB

Collection of Android-related GitHub Actions

License: MIT License

TypeScript 97.80% JavaScript 1.46% Shell 0.74%
github actions githubactions android ci emulator sdk install action-android android-sdk

action-android's People

Contributors

benhenning avatar dependabot[bot] avatar hannesa2 avatar malinskiy avatar vacxe avatar yukilabo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

action-android's Issues

Espresso test and error

I run this sucessful

      - name: Run instrumentation tests
        uses: malinskiy/action-android/emulator-run-cmd@release/0.0.3
        with:
          cmd: ./gradlew connectedAndroidTest --stacktrace
          api: 25
          tag: default
          abi: x86

and when some Espresso test are unsuccessful, the action is still successful

How to break build on failed Espresso tests ?

getting stuck at license prompts

SDK licenses have changed since version 25 so the hashes being written during installation don't match when trying to use with newer versions (28 in our case).

set-env issue

I have these issues:

Please check the below screenshots for the issue I faced & the .yml code.

Screen Shot 2020-11-17 at 9 07 42 AM

Screen Shot 2020-11-17 at 9 07 21 AM

Allow caching the SDK

Hello,

After few runs, I saw that setup of the Android SDK may takes time. I already saw taking a sdkmanager command taking up to 10 minutes.

In order to improve this timing, one can use an actions/cache:

- name: Store Android SDK
   uses: actions/cache@v2
   with:
     path: {{ env.ANDROID_HOME }}
     key: ${{ runner.os }}-android-${{ hashFiles('**/*.gradle*') }}
     restore-keys: ${{ runner.os }}-android-

But this action always remove every traces of a previously setup SDK (why btw ?)

Would it be possible to add an option to check for an existing SDK that was setup by your action and to keep it instead of erasing it and redownloading everything ?
Also, to ease the caching, and ANDROID_HOME env variable could be published by the action.

Unzip hangs on self-hosted runners

await execWithResult(`unzip -q ${ANDROID_TMP_PATH} -d ${ANDROID_HOME}`)

curl -L https://dl.google.com/android/repository/sdk-tools-darwin-4333796.zip -o /tmp/android-sdk.zip -s
unzip -q /tmp/android-sdk.zip -d /Users/ghrunner/android-sdk
replace /Users/ghrunner/android-sdk/tools/NOTICE.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename: ::error::The process 'unzip' failed with exit code 80

Adding "-o" to the unzip command might fix it.

API=30 fails with `Failed to find package 'system-images;android-30`

When I try to run tests with api30 I run into

Warning: Failed to find package 'system-images;android-30;default;x86_64'
Error: The process 'bash' failed with exit code 1
    at ExecState._setResult (/Users/runner/work/_actions/malinskiy/action-android/release/0.1.2/emulator-run-cmd/node_modules/@actions/exec/lib/toolrunner.js:548:25)
    at ExecState.CheckComplete (/Users/runner/work/_actions/malinskiy/action-android/release/0.1.2/emulator-run-cmd/node_modules/@actions/exec/lib/toolrunner.js:531:18)
Error: The process 'bash' failed with exit code 1
    at ChildProcess.<anonymous> (/Users/runner/work/_actions/malinskiy/action-android/release/0.1.2/emulator-run-cmd/node_modules/@actions/exec/lib/toolrunner.js:431:27)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:210:5)
    at Pipe.<anonymous> (net.js:659:12)

Please see complete job https://github.com/hannesa2/paho.mqtt.android/pull/194/checks?check_run_id=3289979571

Continue after failed job (collect output)

I've a matrix job with Espresso and I want collect the output

  - name: Run instrumentation tests api ${{ matrix.android-api }}
    uses: malinskiy/action-android/emulator-run-cmd@release/0.0.5
    with:
      cmd: ./gradlew cAT --stacktrace
      api: ${{ matrix.android-api }}
      tag: default
      abi: x86
  - name: Archive Espresso results api ${{ matrix.android-api }}
    uses: actions/upload-artifact@v1
    with:
      name: Espresso-report
      path: owncloudApp/build/reports/androidTests/connected 

But when the Espresso job fails, the following jobs (and the result collecting one) are canceled , that's why no output is collected.
image

How to archive such a workflow ?

I could skip the matrix way, but I want to have the test result.

adb command not found error

I am trying to run instrumentation test on Ubuntu 18.

Here is the yml file code:

on:
  push:
    branches:
      - '*'
      - '!master'
      - '!release*'

jobs:
  instrumentationJob:
    name: Run Instrumentation Tests
    runs-on: ubuntu-18.04

    steps:
      - uses: actions/checkout@v1
      - name: set up JDK 1.8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8
      
      - uses: malinskiy/action-android/install-sdk@release/0.0.6
      - run: adb devices
      - run: echo $ANDROID_HOME
      
      - uses: malinskiy/action-android/emulator-run-cmd@release/0.0.6
        with:
          cmd: ./gradlew connectedDebugAndroidTest
          api: 25
          tag: default
          abi: x86
      - name: Save logcat output
        uses: actions/upload-artifact@master
        if: failure()
        with:
          name: logcat
          path: artifacts/logcat.log

Here is the error, I am getting:

adb devices
  shell: /bin/bash -e {0}
  env:
    JAVA_HOME: /opt/hostedtoolcache/jdk/8.0.252/x64
    JAVA_HOME_8.0.252_x64: /opt/hostedtoolcache/jdk/8.0.252/x64
    ANDROID_HOME: /home/runner/android-sdk
    ANDROID_SDK_ROOT: /home/runner/android-sdk
    ANDROID_SDK_HOME: /home/runner/android-sdk/sdk_home
    PATH: :/home/runner/android-sdk/bin:/home/runner/android-sdk/tools:/opt/hostedtoolcache/jdk/8.0.252/x64/bin:/usr/share/rust/.cargo/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin/tools/bin:/opt/hostedtoolcache/jdk/8.0.252/x64/bin:/usr/share/rust/.cargo/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin/platform-tools/bin
/home/runner/work/_temp/f9b044b4-656b-48be-bf0f-d3fa658ce199.sh: line 1: adb: command not found
##[error]Process completed with exit code 127.

What i missed here?

Unable to install an apk

For some reasons I'm not able to install APK. Butler apk is installed, but the apk of the app fails to install using adb. What went wrong?..

image

Avoid polling for started emulator

Currently you do a polling for an emulator start

async waitForBoot(timeout: number): Promise<boolean> {
for (let countdown = timeout; countdown > 0; countdown--) {
if (countdown == 0) {
console.error("Timeout waiting for the emulator")
return false
}
try {
let output = await this.execAdbCommand("shell getprop sys.boot_completed")
if (output.trim() == '1') {
countdown = 0
console.log("Emulator booted")
return true
}
} catch (e) {
if (e instanceof Error) {
console.error(e.message)
} else {
console.error(e)
}
}
console.log("Sleeping for 1s")
await sleep(1000)
countdown--
}
console.log("Timeout waiting for emulator to boot. Exiting")
return false
}

which results in a lot of noise
image

But there is an adb wait-for-device which can do this with one command.
To specify the timeout you could do a timeout <some seconds> adb wait-for-device

It's just a suggestion.

Failing instrumented test doesn't fail build

Failing instrumented tests don't fail our GitHub Actions build. The used workflow can be found in the following. Is it a configuration error?

name: CI

on: push

jobs:
  instrumented:
    name: Instrumented tests
    runs-on: macOS-10.14
    env:
      SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
      SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
    strategy:
      matrix:
        android-api: [21, 24]

    steps:
      - uses: actions/checkout@v1
      - name: Install Android SDK
        uses: malinskiy/action-android/install-sdk@release/0.0.3
      - name: Assemble APK
        run: ./gradlew assembleStagingDebug
      - name: Run instrumented tests
        uses: malinskiy/action-android/emulator-run-cmd@release/0.0.3
        with:
          cmd: ./gradlew connectedStagingDebugAndroidTest
          api: ${{ matrix.android-api }}
          tag: default
          abi: x86

Partly log of step "Run instrumented tests":

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:connectedStagingDebugAndroidTest'.
> There were failing tests. See the report at: file:///Users/runner/runners/2.161.0/work/foo-android-v2/foo-android-v2/app/build/reports/androidTests/connected/flavors/STAGING/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 59s

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings
60 actionable tasks: 39 executed, 21 up-to-date
stopping emulator
bash -c \/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 emu kill
OK: killing emulator, bye bye
OK
emu kill finished
emulator is stopped
emulator: WARNING: Discarding the changed state (command-line flag).

using in a custom Apple M1 runner / node12 node16

On a Apple M1 runner I see

Run malinskiy/action-android/install-sdk@release/0.1.2
  with:
    acceptLicense: yes
The node12 is not supported on macOS ARM64 platform. Use node16 instead.
Android SDK URL is not set. Using default
Installing Android Sdk
curl -L https://dl.google.com/android/repository/commandlinetools-mac-6858069_latest.zip -o /tmp/android-sdk.zip -s
unzip -q /tmp/android-sdk.zip -d /Users/hannes/android-sdk
mv /Users/hannes/android-sdk/cmdline-tools /Users/hannes/android-sdk/cmdline-tools-tmp
mkdir -p /Users/hannes/android-sdk/cmdline-tools
mv /Users/hannes/android-sdk/cmdline-tools-tmp /Users/hannes/android-sdk/cmdline-tools/bootstrap-version
rm /tmp/android-sdk.zip
mkdir -p /Users/hannes/android-sdk/sdk_home
Accepting Android SDK licenses
mkdir -p /Users/hannes/android-sdk/licenses

and after I run into

Failed to install the following SDK components:
build-tools;29.0.2 Android SDK Build-Tools 29.0.2
Install the missing components using the SDK manager in Android Studio.

any idea how to get rid of it ?

Runs endless on Android API 21

Using this GitHub Action with the following setup runs without an end.

- name: Run instrumented tests
  uses: malinskiy/action-android/emulator-run-cmd@release/0.0.5
  with:
    cmd: ./gradlew connectedStagingDebugAndroidTest
    api: 21
    tag: default
    abi: x86

And the log output is the shown in the following.

2020-01-22T08:59:09.0330650Z ##[group]Run malinskiy/action-android/emulator-run-cmd@release/0.0.5
2020-01-22T08:59:09.0330840Z with:
2020-01-22T08:59:09.0330940Z   cmd: ./gradlew connectedStagingDebugAndroidTest
2020-01-22T08:59:09.0331040Z   api: 21
2020-01-22T08:59:09.0331120Z   tag: default
2020-01-22T08:59:09.0331220Z   abi: x86
2020-01-22T08:59:09.0331310Z   disableAnimations: false
2020-01-22T08:59:09.0331410Z   cmdOptions: -no-snapshot-save -noaudio -no-boot-anim
2020-01-22T08:59:09.0331520Z   verbose: false
2020-01-22T08:59:09.0331610Z env:
2020-01-22T08:59:09.0332100Z   SIGNING_KEY_PASSWORD: ***
2020-01-22T08:59:09.0332250Z   SIGNING_STORE_PASSWORD: ***
2020-01-22T08:59:09.0332350Z   ANDROID_HOME: /Users/runner/android-sdk
2020-01-22T08:59:09.0332450Z   ANDROID_SDK_ROOT: /Users/runner/android-sdk
2020-01-22T08:59:09.0332540Z   ANDROID_SDK_HOME: /Users/runner/android-sdk/sdk_home
2020-01-22T08:59:09.0332760Z   PATH: :/Users/runner/android-sdk/bin:/Users/runner/android-sdk/tools:/usr/local/lib/ruby/gems/2.6.0/bin:/usr/local/opt/ruby/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Users/runner/.yarn/bin:/usr/local/go/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Users/runner/Library/Android/sdk/ndk-bundle:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/runner/.azcopy/tools/bin:/usr/local/lib/ruby/gems/2.6.0/bin:/usr/local/opt/ruby/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Users/runner/.yarn/bin:/usr/local/go/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Users/runner/Library/Android/sdk/ndk-bundle:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/runner/.azcopy/platform-tools/bin
2020-01-22T08:59:09.0333320Z ##[endgroup]
2020-01-22T08:59:09.2111440Z Starting emulator with API=21, TAG=default and ABI=x86...
2020-01-22T08:59:09.2135590Z ANDROID_HOME is /Users/runner/android-sdk
2020-01-22T08:59:09.2153110Z PATH is :/Users/runner/android-sdk/bin:/Users/runner/android-sdk/tools:/usr/local/lib/ruby/gems/2.6.0/bin:/usr/local/opt/ruby/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Users/runner/.yarn/bin:/usr/local/go/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Users/runner/Library/Android/sdk/ndk-bundle:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/runner/.azcopy/tools/bin:/usr/local/lib/ruby/gems/2.6.0/bin:/usr/local/opt/ruby/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Users/runner/.yarn/bin:/usr/local/go/bin:/Users/runner/Library/Android/sdk/tools:/Users/runner/Library/Android/sdk/platform-tools:/Users/runner/Library/Android/sdk/ndk-bundle:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/runner/.azcopy/platform-tools/bin
2020-01-22T08:59:09.2154500Z [command]bash -c \/Users/runner/android-sdk/tools/bin/sdkmanager emulator tools platform-tools 'system-images;android-21;default;x86' > /dev/null
2020-01-22T08:59:11.2462140Z Warning: File /Users/runner/android-sdk/sdk_home/.android/repositories.cfg could not be loaded.
2020-01-22T09:00:09.9227930Z [command]bash -c \/Users/runner/android-sdk/tools/bin/sdkmanager 'platforms;android-21' > /dev/null
2020-01-22T09:00:11.2314330Z Warning: File /Users/runner/android-sdk/sdk_home/.android/repositories.cfg could not be loaded.
2020-01-22T09:00:19.7250300Z [command]/Users/runner/android-sdk/emulator/emulator -accel-check
2020-01-22T09:00:31.0915730Z accel:
2020-01-22T09:00:31.0916290Z 0
2020-01-22T09:00:31.0916880Z HAXM version 7.5.1 (4) is installed and usable.
2020-01-22T09:00:31.0917070Z accel
2020-01-22T09:00:31.0949900Z [command]bash -c \echo -n no | /Users/runner/android-sdk/tools/bin/avdmanager create avd -n emulator --package "system-images;android-21;default;x86" --tag default
2020-01-22T09:00:31.9927500Z Loading local repository...                                                     
2020-01-22T09:00:32.0015210Z [=========                              ] 25% Loading local repository...       
2020-01-22T09:00:32.0015780Z [=========                              ] 25% Fetch remote repository...        
2020-01-22T09:00:32.0016200Z [=========                              ] 25% Fetch remote repository...        
2020-01-22T09:00:32.0016610Z [=========                              ] 25% Fetch remote repository...        
2020-01-22T09:00:32.1372380Z [=======================================] 100% Fetch remote repository...       
2020-01-22T09:00:32.1374030Z Auto-selecting single ABI x86
2020-01-22T09:00:58.1770970Z Do you wish to create a custom hardware profile? [no] starting adb server
2020-01-22T09:00:58.1774630Z [command]/Users/runner/android-sdk/platform-tools/adb start-server
2020-01-22T09:00:58.3221780Z * daemon not running; starting now at tcp:5037
2020-01-22T09:01:01.6490710Z * daemon started successfully
2020-01-22T09:01:01.6511490Z [command]bash -c \/Users/runner/android-sdk/emulator/emulator @emulator -no-snapshot-save -noaudio -no-boot-anim &
2020-01-22T09:01:11.7526760Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:11.7591650Z error: device 'emulator-5554' not found
2020-01-22T09:01:11.7608530Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:11.7609130Z Sleeping for 1s
2020-01-22T09:01:12.7631280Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:12.7701650Z error: device 'emulator-5554' not found
2020-01-22T09:01:12.7802730Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:12.7803280Z Sleeping for 1s
2020-01-22T09:01:13.7848700Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:13.7976770Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:13.7977430Z error: device 'emulator-5554' not found
2020-01-22T09:01:13.7978550Z Sleeping for 1s
2020-01-22T09:01:14.8113670Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:14.8173150Z error: device 'emulator-5554' not found
2020-01-22T09:01:14.8182850Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:14.8183100Z Sleeping for 1s
2020-01-22T09:01:15.9653750Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:15.9714730Z error: device 'emulator-5554' not found
2020-01-22T09:01:15.9723380Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:15.9723620Z Sleeping for 1s
2020-01-22T09:01:16.9806430Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:16.9866000Z error: device 'emulator-5554' not found
2020-01-22T09:01:16.9875620Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:16.9875810Z Sleeping for 1s
2020-01-22T09:01:18.0612290Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:18.0675940Z error: device 'emulator-5554' not found
2020-01-22T09:01:18.0683120Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:18.0683330Z Sleeping for 1s
2020-01-22T09:01:19.1755550Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:19.2159440Z error: device 'emulator-5554' not found
2020-01-22T09:01:19.2374170Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:19.2374370Z Sleeping for 1s
2020-01-22T09:01:20.2404140Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:20.2595490Z error: device 'emulator-5554' not found
2020-01-22T09:01:20.2619590Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:20.2619790Z Sleeping for 1s
2020-01-22T09:01:21.3711760Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:21.3818310Z error: device 'emulator-5554' not found
2020-01-22T09:01:21.3854210Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:21.3854500Z Sleeping for 1s
2020-01-22T09:01:22.4665690Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:22.4748080Z error: device 'emulator-5554' not found
2020-01-22T09:01:22.4758340Z Sleeping for 1s
2020-01-22T09:01:22.4759270Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:23.4868970Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:23.4991620Z error: device 'emulator-5554' not found
2020-01-22T09:01:23.5070240Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:23.5070500Z Sleeping for 1s
2020-01-22T09:01:24.5201950Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:24.5238170Z error: device 'emulator-5554' not found
2020-01-22T09:01:24.5371970Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:24.5372350Z Sleeping for 1s
2020-01-22T09:01:25.6396690Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:25.6464060Z error: device 'emulator-5554' not found
2020-01-22T09:01:25.6572670Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:25.6572990Z Sleeping for 1s
2020-01-22T09:01:26.6578750Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:26.6643690Z error: device 'emulator-5554' not found
2020-01-22T09:01:26.6675560Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:26.6675850Z Sleeping for 1s
2020-01-22T09:01:27.6689330Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:27.6758260Z error: device 'emulator-5554' not found
2020-01-22T09:01:27.6815010Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:27.6815180Z Sleeping for 1s
2020-01-22T09:01:28.6826120Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:28.6893320Z error: device 'emulator-5554' not found
2020-01-22T09:01:28.6903290Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:28.6903470Z Sleeping for 1s
2020-01-22T09:01:29.8046760Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:29.8130430Z error: device 'emulator-5554' not found
2020-01-22T09:01:29.8167480Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:29.8167730Z Sleeping for 1s
2020-01-22T09:01:30.8205970Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:30.8283500Z error: device 'emulator-5554' not found
2020-01-22T09:01:30.8292540Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:30.8292780Z Sleeping for 1s
2020-01-22T09:01:31.8445810Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:31.8624150Z error: device 'emulator-5554' not found
2020-01-22T09:01:31.9097660Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:31.9098500Z Sleeping for 1s
2020-01-22T09:01:32.9977630Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:33.0042550Z error: device 'emulator-5554' not found
2020-01-22T09:01:33.0274800Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:33.0275090Z Sleeping for 1s
2020-01-22T09:01:34.0477020Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:34.0561020Z error: device 'emulator-5554' not found
2020-01-22T09:01:34.0740300Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:34.0740560Z Sleeping for 1s
2020-01-22T09:01:35.1076620Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:35.1154950Z error: device 'emulator-5554' not found
2020-01-22T09:01:35.1164670Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:35.1164910Z Sleeping for 1s
2020-01-22T09:01:36.1172000Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:36.1262150Z error: device 'emulator-5554' not found
2020-01-22T09:01:36.1267030Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:36.1269870Z Sleeping for 1s
2020-01-22T09:01:37.1949000Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:37.2090090Z error: device 'emulator-5554' not found
2020-01-22T09:01:37.2241530Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:37.2241860Z Sleeping for 1s
2020-01-22T09:01:38.3176970Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:38.3237920Z error: device 'emulator-5554' not found
2020-01-22T09:01:38.3250370Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:38.3250610Z Sleeping for 1s
2020-01-22T09:01:39.4633270Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:39.4691500Z error: device 'emulator-5554' not found
2020-01-22T09:01:39.4783660Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:39.4783960Z Sleeping for 1s
2020-01-22T09:01:40.5153280Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:40.5252290Z error: device 'emulator-5554' not found
2020-01-22T09:01:40.5260780Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:40.5260970Z Sleeping for 1s
2020-01-22T09:01:41.5372770Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:41.5432820Z error: device 'emulator-5554' not found
2020-01-22T09:01:41.5441780Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:41.5442000Z Sleeping for 1s
2020-01-22T09:01:42.5582020Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:42.5650030Z error: device 'emulator-5554' not found
2020-01-22T09:01:42.5663720Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:42.5663920Z Sleeping for 1s
2020-01-22T09:01:43.5707290Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:43.5767000Z error: device 'emulator-5554' not found
2020-01-22T09:01:43.5776010Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:43.5776470Z Sleeping for 1s
2020-01-22T09:01:44.6571360Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:44.6632670Z error: device 'emulator-5554' not found
2020-01-22T09:01:44.6642070Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:44.6642230Z Sleeping for 1s
2020-01-22T09:01:45.6657560Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:45.6720700Z error: device 'emulator-5554' not found
2020-01-22T09:01:45.6731380Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:45.6731530Z Sleeping for 1s
2020-01-22T09:01:46.6758070Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:46.6971040Z error: device 'emulator-5554' not found
2020-01-22T09:01:46.7015190Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:46.7015410Z Sleeping for 1s
2020-01-22T09:01:47.7149130Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:47.7210980Z error: device 'emulator-5554' not found
2020-01-22T09:01:47.7220640Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:47.7220820Z Sleeping for 1s
2020-01-22T09:01:48.7228120Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:48.7287560Z error: device 'emulator-5554' not found
2020-01-22T09:01:48.7360060Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:48.7360290Z Sleeping for 1s
2020-01-22T09:01:49.7414730Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:49.7473430Z error: device 'emulator-5554' not found
2020-01-22T09:01:49.7482670Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:49.7482840Z Sleeping for 1s
2020-01-22T09:01:50.7500620Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:50.7563050Z error: device 'emulator-5554' not found
2020-01-22T09:01:50.7627310Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:50.7627500Z Sleeping for 1s
2020-01-22T09:01:51.7657570Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:51.7720100Z error: device 'emulator-5554' not found
2020-01-22T09:01:51.7731060Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:51.7731230Z Sleeping for 1s
2020-01-22T09:01:52.6301100Z Unable to create basic Accelerated OpenGL renderer.
2020-01-22T09:01:52.6303330Z Unable to create basic Accelerated OpenGL renderer.
2020-01-22T09:01:52.6306440Z Core Image is now using the software OpenGL renderer. This will be slow.
2020-01-22T09:01:52.7847080Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:52.7909380Z error: device 'emulator-5554' not found
2020-01-22T09:01:52.7918420Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:52.7918600Z Sleeping for 1s
2020-01-22T09:01:53.7925920Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:53.8001780Z error: device 'emulator-5554' not found
2020-01-22T09:01:53.8008710Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:53.8008880Z Sleeping for 1s
2020-01-22T09:01:54.8266810Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:54.8441180Z error: device 'emulator-5554' not found
2020-01-22T09:01:54.8446230Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:54.8446980Z Sleeping for 1s
2020-01-22T09:01:55.4075100Z emulator: WARNING: encryption is off
2020-01-22T09:01:55.4075490Z emulator: WARNING: Running on a sytem with less than 8 logical cores. Setting number of virtual cores to 1
2020-01-22T09:01:55.4075910Z emulator: WARNING: Your GPU drivers may have a bug. Switching to software rendering.
2020-01-22T09:01:55.6837650Z emulator: ### WARNING: /etc/localtime does not point to zoneinfo-compatible timezone name
2020-01-22T09:01:55.6837940Z 
2020-01-22T09:01:55.8256050Z Your emulator is out of date, please update by launching Android Studio:
2020-01-22T09:01:55.8257790Z  - Start Android Studio
2020-01-22T09:01:55.8258650Z  - Select menu "Tools > Android > SDK Manager"
2020-01-22T09:01:55.8259140Z  - Click "SDK Tools" tab
2020-01-22T09:01:55.8259620Z  - Check "Android Emulator" checkbox
2020-01-22T09:01:55.8260040Z  - Click "OK"
2020-01-22T09:01:55.8260120Z 
2020-01-22T09:01:55.9727190Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:55.9808150Z error: device offline
2020-01-22T09:01:55.9877280Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:55.9877530Z Sleeping for 1s
2020-01-22T09:01:56.9884260Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:56.9955620Z error: device offline
2020-01-22T09:01:56.9962110Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:56.9962780Z Sleeping for 1s
2020-01-22T09:01:58.0037430Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:58.0129610Z error: device offline
2020-01-22T09:01:58.0137410Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:58.0137660Z Sleeping for 1s
2020-01-22T09:01:59.0147880Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:01:59.0335260Z error: device offline
2020-01-22T09:01:59.0377450Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:01:59.0377690Z Sleeping for 1s
2020-01-22T09:02:00.0413440Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:02:00.0549870Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:02:00.0550180Z error: device offline
2020-01-22T09:02:00.0551510Z Sleeping for 1s
2020-01-22T09:02:01.1917900Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:02:01.2052180Z error: device offline
2020-01-22T09:02:01.2095190Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:02:01.2095360Z Sleeping for 1s
2020-01-22T09:02:02.2101050Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:02:02.2161570Z error: device offline
2020-01-22T09:02:02.2170750Z The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
2020-01-22T09:02:02.2170910Z Sleeping for 1s
2020-01-22T09:02:03.2570170Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:02:03.4761870Z 
2020-01-22T09:02:03.4782530Z Sleeping for 1s
2020-01-22T09:02:04.5255080Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:02:04.5400470Z 
2020-01-22T09:02:04.5421060Z Sleeping for 1s
2020-01-22T09:02:05.0170240Z emulator: ### WARNING: /etc/localtime does not point to zoneinfo-compatible timezone name
2020-01-22T09:02:05.0170980Z 
2020-01-22T09:02:05.6346820Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:02:05.6532230Z 
2020-01-22T09:02:05.6554950Z Sleeping for 1s
2020-01-22T09:02:06.7701300Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:02:06.7948400Z 
2020-01-22T09:02:06.7961850Z Sleeping for 1s
2020-01-22T09:02:07.8016710Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:02:07.8256640Z 
2020-01-22T09:02:07.8267440Z Sleeping for 1s
2020-01-22T09:02:08.8274920Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:02:08.8492180Z 
2020-01-22T09:02:08.8548700Z Sleeping for 1s
2020-01-22T09:02:09.8632260Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:02:09.8798400Z 
2020-01-22T09:02:09.8809880Z Sleeping for 1s
2020-01-22T09:02:10.9673400Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:02:10.9913510Z 
2020-01-22T09:02:10.9976180Z Sleeping for 1s
2020-01-22T09:02:12.1447010Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:02:12.1631740Z 
2020-01-22T09:02:12.1713960Z Sleeping for 1s
2020-01-22T09:02:13.2998300Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:02:13.3175400Z 
2020-01-22T09:02:13.3248820Z Sleeping for 1s
2020-01-22T09:02:14.4123190Z [command]/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
2020-01-22T09:02:14.4342600Z 
2020-01-22T09:02:14.4345770Z Sleeping for 1s
2020-01-22T09:02:15.5113660Z Timeout waiting for emulator to boot. Exiting
2020-01-22T09:02:15.5115590Z booted=false
2020-01-22T09:02:15.5119760Z ##[error]emulator boot failed
2020-01-22T09:02:58.0714540Z emulator: ### WARNING: /etc/localtime does not point to zoneinfo-compatible timezone name
2020-01-22T09:02:58.0721240Z 
2020-01-22T10:30:57.9518710Z ##[error]The operation was canceled.

Emulator action fails with Android API 31 on x86_64 ABI on macos-latest

With the following workflow:

name: Android CI

on:
  push:
    branches: [ "pinch_zoom" ]
  
jobs:
  build:

    runs-on: macos-latest

    steps:
    - uses: actions/checkout@v3
    
    - name: Create directory for jni libs
      run: mkdir app/libs && mkdir app/libs/arm64-v8a      

    - name: set up JDK 17
      uses: actions/setup-java@v3
      with:
        java-version: '17'
        distribution: 'temurin'
        cache: gradle

    - name: Setup gradle
      uses: gradle/gradle-build-action@v2    

    - name: Install Android Sdk
      uses: malinskiy/action-android/install-sdk@release/0.1.0
      
    - name: Copy jar files to app folder
      run: gradle extractLibs

    - name: Instrumentation Tests
      uses: malinskiy/action-android/emulator-run-cmd@release/0.1.0
      with:
        api: 31
        cmd: ./gradlew connectedCheck --stacktrace
        tag: google_apis
        abi: x86_64
          
    - name: Build apk file
      run: gradle assembleRelease

    - name: Upload (unsigned) APK
      uses: actions/[email protected]
      with:
          name: kotlin_demo_apk
          path: ${{github.workspace}}/app/build/outputs/apk/release/app-release-unsigned.apk

I receive the the following error on the "Instrumentation Tests" step:

Run malinskiy/action-android/emulator-run-cmd@release/0.1.0
  with:
    api: 31
    cmd: ./gradlew connectedCheck --stacktrace
    tag: google_apis
    abi: x86_64
    disableAnimations: false
    cmdOptions: -no-snapshot-save -noaudio -no-boot-anim
    verbose: false
  env:
    JAVA_HOME: /Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.4-101/x64/Contents/Home
    JAVA_HOME_17_X64: /Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.4-101/x64/Contents/Home
    GRADLE_BUILD_ACTION_SETUP_COMPLETED: true
    GRADLE_BUILD_ACTION_CACHE_RESTORED: true
    ANDROID_HOME: /Users/runner/android-sdk
    ANDROID_SDK_ROOT: /Users/runner/android-sdk
    ANDROID_SDK_HOME: /Users/runner/android-sdk/sdk_home
    PATH: /Users/runner/android-sdk/cmdline-tools/latest/bin:/Users/runner/android-sdk/cmdline-tools/bootstrap-version/bin:/Users/runner/android-sdk/bin:/Users/runner/android-sdk/platform-tools:/Users/runner/android-sdk/platform-tools/bin:/Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.4-101/x64/Contents/Home/bin:/usr/local/lib/ruby/gems/[2](https://github.com/SensoftInc/kotlin_demo/actions/runs/3061680978/jobs/4941749807#step:8:2).7.0/bin:/usr/local/opt/[email protected]/bin:/usr/local/opt/pipx_bin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Users/runner/.yarn/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/runner/.dotnet/tools:/Users/runner/.ghcup/bin:/Users/runner/hostedtoolcache/stack/2.7.5/x64
Starting emulator with API=[3](https://github.com/SensoftInc/kotlin_demo/actions/runs/3061680978/jobs/4941749807#step:8:3)1, TAG=google_apis and ABI=x86_6[4](https://github.com/SensoftInc/kotlin_demo/actions/runs/3061680978/jobs/4941749807#step:8:4)...
ANDROID_HOME is /Users/runner/android-sdk
PATH is /Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.4-101/x64/Contents/Home/bin:/Users/runner/android-sdk/cmdline-tools/latest/bin:/Users/runner/android-sdk/cmdline-tools/bootstrap-version/bin:/Users/runner/android-sdk/bin:/Users/runner/android-sdk/platform-tools:/Users/runner/android-sdk/platform-tools/bin:/Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.4-101/x64/Contents/Home/bin:/usr/local/lib/ruby/gems/2.7.0/bin:/usr/local/opt/[email protected]/bin:/usr/local/opt/pipx_bin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Users/runner/.yarn/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/runner/.dotnet/tools:/Users/runner/.ghcup/bin:/Users/runner/hostedtoolcache/stack/2.7.[5](https://github.com/SensoftInc/kotlin_demo/actions/runs/3061680978/jobs/4941749807#step:8:5)/x[6](https://github.com/SensoftInc/kotlin_demo/actions/runs/3061680978/jobs/4941749807#step:8:6)4
bash -c \/Users/runner/android-sdk/cmdline-tools/bootstrap-version/bin/sdkmanager emulator 'cmdline-tools;latest' platform-tools 'system-images;android-31;google_apis;x86_64' > /dev/null
Warning: Package "com.android.repository.impl.generated.v1.RemotePackage@863915f1" (emulator) should be installed in 
"/Users/runner/android-sdk/emulator" but 
it already exists.
Installing in "/Users/runner/android-sdk/emulator-2" instead.
bash -c \/Users/runner/android-sdk/cmdline-tools/bootstrap-version/bin/sdkmanager 'platforms;android-31' > /dev/null
Warning: Observed package id 'emulator' in inconsistent location '/Users/runner/android-sdk/emulator-2' (Expected '/Users/runner/android-sdk/emulator')
Warning: Already observed package id 'emulator' in '/Users/runner/android-sdk/emulator'. Skipping duplicate at '/Users/runner/android-sdk/emulator-2'
Warning: Observed package id 'emulator' in inconsistent location '/Users/runner/android-sdk/emulator-2' (Expected '/Users/runner/android-sdk/emulator')
Warning: Already observed package id 'emulator' in '/Users/runner/android-sdk/emulator'. Skipping duplicate at '/Users/runner/android-sdk/emulator-2'
/Users/runner/android-sdk/emulator/emulator -accel-check
accel:
0
Hypervisor.Framework OS X Version 11.[7](https://github.com/SensoftInc/kotlin_demo/actions/runs/3061680978/jobs/4941749807#step:8:7)
accel
bash -c \echo -n no | /Users/runner/android-sdk/cmdline-tools/bootstrap-version/bin/avdmanager create avd -n emulator --package "system-images;android-31;google_apis;x[8](https://github.com/SensoftInc/kotlin_demo/actions/runs/3061680978/jobs/4941749807#step:8:8)6_64" --tag google_apis
Loading local repository...                                                     
Warning: Observed package id 'emulator' in inconsistent location '/Users/runner/android-sdk/emulator-2' (Expected '/Users/runner/android-sdk/emulator')
Warning: Already observed package id 'emulator' in '/Users/runner/android-sdk/emulator'. Skipping duplicate at '/Users/runner/android-sdk/emulator-2'
[=========                              ] 25% Loading local repository...       
[=========                              ] 25% Fetch remote repository...        
[=======================================] 100% Fetch remote repository...       
Auto-selecting single ABI x86_64
Do you wish to create a custom hardware profile? [no] starting adb server
/Users/runner/android-sdk/platform-tools/adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully
bash -c \/Users/runner/android-sdk/emulator/emulator @emulator -no-snapshot-save -noaudio -no-boot-anim &
INFO    | Android emulator version 31.3.10.0 (build_id 8807[9](https://github.com/SensoftInc/kotlin_demo/actions/runs/3061680978/jobs/4941749807#step:8:9)27) (CL:N/A)
emulator: INFO: Found systemPath /Users/runner/android-sdk/system-images/android-31/google_apis/x86_64/
WARNING | unexpected system image feature string, emulator might not function correctly, please try updating the emulator.
WARNING | /etc/localtime does not point to zoneinfo-compatible timezone name
WARNING | Your GPU drivers may have a bug. Switching to software rendering.
WARNING | cannot add library /Users/runner/android-sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed
INFO    | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
INFO    | added library /Users/runner/android-sdk/emulator/lib64/vulkan/libvulkan.dylib
INFO    | configAndStartRenderer: setting vsync to 60 hz
INFO    | Sending adb public key [QAAAAKs8wND9IZYaY3vbiSiGuIygJA56muTduQdd9gVFNJHMd7mE/0CrGUwfxKKy/hlGX6kzhJxOfZpXUmpRyd3Roz8M1++t5uxrRvHLlbzG0kITI0+87asT3Wz4YUJlYYXQfINm3+jzrps1YE0JAav+CWSMMGCivyI6XFj6cKlKg9ISzEJa2ZsBZIp2qMSW7MJ4IV19nX3ik1X0CUEDXmSx0Zvx/inN9mUnqT0aSx3raiDP2ko+6hP8SfbdoJyCtl8WhgIq+BWO6B2eDDMLXqmy7cxpp0yMbIT/c3JTS6KMWp+9GaK4t5rBy+FgnXPUKOnrXATg7/ALQ6TcpVCGWcIs/ealoXDJxHj6efaN1qKwPDKPv48XBAk9HlJ3gjZu5IKF50Up64LHn0nVIZ7TDf6TmkWeRFO1mGQqhvt7o3hrJHqMpuWPDLllZDmGVOp4xkeB5ecPHyQlJZsCiCd2zfwtrQjoycFnS4IViyB5kxeHjUPrdGpfiskgxKucCBX7SsbqL+na/uZtw20ZA476ykal5saipEIDf81CJIkE/XRmTrPwPvu4uMqS9ymT/gBDE1TJ/pC5W18TxRPx1mvYr1ueIa80D2ayiOvYQC3RTdeVEm5ZbijiRL+QvON2qetXC6GTFDvf7Q//odyzvFqKGCrzU4KYmwpwNlemhwCQuLRcxNXSHtnVxgEAAQA= runner@unknown]
INFO    | injectedQemuChannel!
INFO    | Informing listeners of injection.
INFO    | Rootcanal has  been activated.
WARNING | /etc/localtime does not point to zoneinfo-compatible timezone name
WARNING | *** No gRPC protection active, consider launching with the -grpc-use-jwt flag.***
INFO    | Started GRPC server at [12](https://github.com/SensoftInc/kotlin_demo/actions/runs/3061680978/jobs/4941749807#step:8:12)7.0.0.1:8554, security: Local, auth: none
INFO    | Advertising in: /Users/runner/Library/Caches/TemporaryItems/avd/running/pid_7471.ini
INFO    | setDisplayConfigs w 320 h 640 dpiX 160 dpiY 160
WARNING | Failed to process .ini file /Users/runner/android-sdk/sdk_home/.android/emu-update-last-check.ini for reading.
INFO    | Your emulator is out of date, please update by launching Android Studio:
 - Start Android Studio
 - Select menu "Tools > Android > SDK Manager"
 - Click "SDK Tools" tab
 - Check "Android Emulator" checkbox
 - Click "OK"

WARNING | Failed to process .ini file /Users/runner/android-sdk/sdk_home/.android/emu-update-last-check.ini for reading.
/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
adb: device offline
The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
Sleeping for 1s
2022-09-[15](https://github.com/SensoftInc/kotlin_demo/actions/runs/3061680978/jobs/4941749807#step:8:15) 15:29:41.886 qemu-system-x86_64[7471:23388] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-09-15 15:29:41.967 qemu-system-x86_64[7471:23388] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-09-15 15:29:41.994 qemu-system-x86_64[7471:23388] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-09-15 15:29:41.996 qemu-system-x86_64[7471:23388] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-09-15 15:29:42.000 qemu-system-x86_64[7471:23388] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-09-15 15:29:42.001 qemu-system-x86_64[7471:23388] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-09-15 15:29:42.006 qemu-system-x86_64[7471:23388] [CAMetalLayer nextDrawable] returning nil because device is nil.
2022-09-15 15:29:42.0[17](https://github.com/SensoftInc/kotlin_demo/actions/runs/3061680978/jobs/4941749807#step:8:17) qemu-system-x86_64[7471:[23](https://github.com/SensoftInc/kotlin_demo/actions/runs/3061680978/jobs/4941749807#step:8:24)[38](https://github.com/SensoftInc/kotlin_demo/actions/runs/3061680978/jobs/4941749807#step:8:39)8] [CAMetalLayer nextDrawable] returning nil because device is nil.
/Users/runner/android-sdk/platform-tools/adb -s emulator-55[54](https://github.com/SensoftInc/kotlin_demo/actions/runs/3061680978/jobs/4941749807#step:8:55) shell getprop sys.boot_completed
The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
adb: device offline
Sleeping for 1s
/Users/runner/android-sdk/platform-tools/adb -s emulator-[55](https://github.com/SensoftInc/kotlin_demo/actions/runs/3061680978/jobs/4941749807#step:8:56)54 shell getprop sys.boot_completed
The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
adb: device offline
Sleeping for 1s
/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
adb: device offline
Sleeping for 1s
/Users/runner/android-sdk/platform-tools/adb -s emulator-5554 shell getprop sys.boot_completed
The process '/Users/runner/android-sdk/platform-tools/adb' failed with exit code 1
adb: device offline
Sleeping for 1s
...

Failed to run sdkmanager

I've this build that uses instal-sdk action.

There seems to be something wrong with running:

.$ANDROID_HOME/tools/bin/sdkmanager "platforms;android-28" "platform-tools" "build-tools;28.0.3"

I've first tried (note the added slash after the dot):

./$ANDROID_HOME/tools/bin/sdkmanager "platforms;android-28" "platform-tools" "build-tools;28.0.3"

What seems to be the issue here? How do I run this?

New version ?

Hi,
thanks for merging #59 , but what's about to merge my remaining pull requests and all other version bump pull requests and create a new release ?
This would help us all ! Thank you

`tr` command not found on `macOs` builds

When using the following workflow

name: Android CI

on: [push]

jobs:
  build:

    runs-on: macOS-latest

    steps:
    - uses: actions/checkout@v1
      with:
        depth: 1
    - name: set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Install Android SDK
      uses: malinskiy/action-android/install-sdk@release/0.0.2
    - name: Instrumentation Tests
      uses: malinskiy/action-android/emulator-run-cmd@release/0.0.2      
      with:
        cmd: ./team-props/instrumentation.sh
        api: 21
        tag: google_apis
        abi: x86

then in the command line I can see the following error:

/system/bin/sh: tr: not found
Sleeping for 1s
/Users/runner/android-sdk/platform-tools/adb shell getprop sys.boot_completed | tr -d '

it times out at the end and the emulator is correctly booted:

Timeout waiting for emulator to boot. Exiting
booted=false
emulator started and booted

Impossible to install older command-line tools, always `latest` is downloaded

I need to install Command-Line Tools v8, the last version comaptible with Java 8.

I found the right URL, but even when I pass it, I still get command-line tools latest, which require JDK17:

- name: Set up Android SDK
  uses: malinskiy/action-android/install-sdk@release/0.1.7
  with:
    url: https://dl.google.com/android/repository/commandlinetools-linux-9123335_latest.zip
    # Above URL points to Command Line Tools v8.0 - the last version compatible with Java 8
    # Found via https://stackoverflow.com/a/75763391/7009800
    # Another useful website: https://androidsdkmanager.azurewebsites.net/cmdline-tools.html

see workflow run: https://github.com/mobile-dev-inc/maestro/actions/runs/10221637495/job/28284879896?pr=1837

Using macOs-10.14 and macOs-latest still results in software emulator usage

Seeing this in logs when trying both of the mentioned distros

bash -c \/Users/runner/android-sdk/emulator/emulator @emulator -no-snapshot-save -noaudio -no-boot-anim &
Unable to create basic Accelerated OpenGL renderer.
Unable to create basic Accelerated OpenGL renderer.
Core Image is now using the software OpenGL renderer. This will be slow.

RunCMD default tag is not "default"

Emulator Run CMD does not default to "default" tag.
it outputs Unknown tag ${tag}. Using default in line 22 but in the next line sets tag = 'google_apis'

I expected line 23 to be tag = 'default'
Alternately I expected the message in line 22 to inform me that google_apis will be used as tag.

let tag = core.getInput('tag', <InputOptions>{required: false})
if (tag !== "default" && tag !== "google_apis") {
console.log(`Unknown tag ${tag}. Using default`)
tag = 'google_apis'
}

Starting emulator with API=31, TAG=google_apis and ABI=x86...

I did a test with api 31 but I run into

Starting emulator with API=31, TAG=google_apis and ABI=x86...
ANDROID_HOME is /Users/runner/android-sdk
PATH is /Users/runner/hostedtoolcache/Java_Adopt_jdk/11.0.12-7/x64/Contents/Home/bin:/Users/runner/android-sdk/cmdline-tools/latest/bin:/Users/runner/android-sdk/cmdline-tools/bootstrap-version/bin:/Users/runner/android-sdk/bin:/Users/runner/android-sdk/platform-tools:/Users/runner/android-sdk/platform-tools/bin:/Users/runner/hostedtoolcache/Java_Adopt_jdk/11.0.12-7/x64/Contents/Home/bin:/usr/local/lib/ruby/gems/2.7.0/bin:/usr/local/opt/[email protected]/bin:/usr/local/opt/pipx_bin:/Users/runner/.cargo/bin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/Users/runner/.yarn/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/bin:/bin:/usr/sbin:/sbin:/Users/runner/.dotnet/tools:/Users/runner/.ghcup/bin:/Users/runner/hostedtoolcache/stack/2.7.3/x64
bash -c \/Users/runner/android-sdk/cmdline-tools/bootstrap-version/bin/sdkmanager emulator 'cmdline-tools;latest' platform-tools 'system-images;android-31;google_apis;x86' > /dev/null
Warning: Failed to find package 'system-images;android-31;google_apis;x86'
Error: The process 'bash' failed with exit code 1
    at ExecState._setResult (/Users/runner/work/_actions/malinskiy/action-android/release/0.1.2/emulator-run-cmd/node_modules/@actions/exec/lib/toolrunner.js:548:25)
    at ExecState.CheckComplete (/Users/runner/work/_actions/malinskiy/action-android/release/0.1.2/emulator-run-cmd/node_modules/@actions/exec/lib/toolrunner.js:531:18)
    at ChildProcess.<anonymous> (/Users/runner/work/_actions/malinskiy/action-android/release/0.1.2/emulator-run-cmd/node_modules/@actions/exec/lib/toolrunner.js:431:27)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:210:5)
    at Pipe.<anonymous> (net.js:659:12)
Error: The process 'bash' failed with exit code 1

Here is the complete job https://github.com/hannesa2/paho.mqtt.android/pull/215/checks?check_run_id=3802053628

It should work, or ?

image

Gradle Managed Devices

I tried to use Gradle Managed Devices https://developer.android.com/studio/test/gradle-managed-devices


      - name: Run instrumentation tests
        uses: malinskiy/action-android/emulator-run-cmd@release/0.1.4
        with:
          cmd: ./gradlew nexusOneApi30DebugAndroidTest
    testOptions {
        managedDevices {
            devices {
                nexusOneApi30(com.android.build.api.dsl.ManagedVirtualDevice) {
                    // A lower resolution device is used here for better emulator performance
                    device = "Nexus One"
                    apiLevel = 30
                    // Also use the AOSP ATD image for better emulator performance
                    // The androidx.test screenshot APIs will automatically enable hardware rendering to take a screenshot
                    systemImageSource = "aosp-atd"
                }
            }
        }
    }

```but I run into 

Execution failed for task ':sample:nexusOneApi30Setup'.

A failure occurred while executing com.android.build.gradle.internal.tasks.ManagedDeviceSetupTask$ManagedDeviceSetupRunnable
java.lang.IllegalStateException: Gradle was not able to complete device setup for: dev30_aosp_atd_x86_Nexus_One
This could be due to having insufficient resources to provision the number of
devices requested. Try running the test again and request fewer devices or
fewer shards.


Does someone knows, how to use Gradle Managed Devices with Github actions ?

tries to run command even if emulator fails to boot

from workflow logs (./gradlew androidCI is out cmd):

# ...[etc, etc, etc]...
Sleeping for 1s
/Users/runner/android-sdk/platform-tools/adb shell getprop sys.boot_completed

Sleeping for 1s
Timeout waiting for emulator to boot. Exiting
booted=false
emulator started and booted
./gradlew androidCI

Breaks with AGP7

Per Googlers, there is now a package called cmdline-tools that should be used for installing things with AGP7.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.