Skip to content

Commit 879d7a2

Browse files
Fix github worklow for Android tests (#11014)
- The github workflow fails when running android tests. - The workflow is trying to launch an x86 emulator on aarch-64 (macos-latest) host. - The macos-latest system seem to be used originally as it supports hardware acceleration. - This is no longer recomended, and ubuntu-latest host can handle the same and be faster than macos-latest. Doc: https://github.com/marketplace/actions/android-emulator-runner#running-hardware-accelerated-emulators-on-linux-runners
1 parent 9e4ac2e commit 879d7a2

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ jobs:
6363
path: app/build/outputs/apk/debug/*.apk
6464

6565
test-android:
66-
# macos has hardware acceleration. See android-emulator-runner action
67-
runs-on: macos-latest
66+
runs-on: ubuntu-latest
6867
timeout-minutes: 20
6968
strategy:
7069
matrix:
@@ -82,6 +81,12 @@ jobs:
8281
steps:
8382
- uses: actions/checkout@v4
8483

84+
- name: Enable KVM
85+
run: |
86+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
87+
sudo udevadm control --reload-rules
88+
sudo udevadm trigger --name-match=kvm
89+
8590
- name: set up JDK 17
8691
uses: actions/setup-java@v4
8792
with:

0 commit comments

Comments
 (0)