Skip to content

Commit

Permalink
ci: fix test failure on API 26 (#246)
Browse files Browse the repository at this point in the history
* ci: fix test failure on API 26

The emulator hangs forever on `ubuntu-latest`
  • Loading branch information
ashishb committed Jul 21, 2024
1 parent aacfd07 commit 173e1a5
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/adbe-unittests-api26.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ concurrency:

jobs:
testOnApi26:
runs-on: ubuntu-latest
# This hangs on ubuntu-latest
# Ref: https://github.com/ashishb/adb-enhanced/pull/239
# Ref: https://github.com/ReactiveCircus/android-emulator-runner/issues/385
runs-on: macos-13 # X86-based as macOS 14 onwards is ARM-based
timeout-minutes: 15

strategy:
Expand All @@ -26,13 +29,6 @@ jobs:
- name: checkout
uses: actions/checkout@v4

# Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Gradle cache
uses: gradle/gradle-build-action@v3

Expand All @@ -43,7 +39,7 @@ jobs:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}
key: avd-${{ runner.os }}-${{ matrix.api-level }}

- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
Expand All @@ -57,10 +53,13 @@ jobs:

- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
env:
# Ref: https://github.com/ReactiveCircus/android-emulator-runner/issues/385
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 60
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-metrics -camera-back none
disable-animations: true
target: ${{ matrix.target }}
script: |
Expand Down

0 comments on commit 173e1a5

Please sign in to comment.