diff --git a/.github/workflows/adbe-unittests-api26.yml b/.github/workflows/adbe-unittests-api26.yml index c6d3f3a..ea5a22e 100644 --- a/.github/workflows/adbe-unittests-api26.yml +++ b/.github/workflows/adbe-unittests-api26.yml @@ -29,6 +29,14 @@ 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 + if: runner.os == 'Linux' + 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 diff --git a/.github/workflows/adbe-unittests-api29.yml b/.github/workflows/adbe-unittests-api29.yml index a1f12b0..e02cc21 100644 --- a/.github/workflows/adbe-unittests-api29.yml +++ b/.github/workflows/adbe-unittests-api29.yml @@ -14,7 +14,10 @@ concurrency: jobs: testOnApi29: - 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: @@ -28,6 +31,7 @@ jobs: # Ref: https://github.com/ReactiveCircus/android-emulator-runner?tab=readme-ov-file#running-hardware-accelerated-emulators-on-linux-runners - name: Enable KVM + if: runner.os == 'Linux' 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 @@ -43,7 +47,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'