From 879d7a24f05ab06510be249f2f3b5109f7c89dcc Mon Sep 17 00:00:00 2001 From: Siddhesh Naik <87667048+snaik20@users.noreply.github.com> Date: Mon, 29 Apr 2024 02:45:18 +0530 Subject: [PATCH] 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 --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d76e1645..0c750157c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,8 +63,7 @@ jobs: path: app/build/outputs/apk/debug/*.apk test-android: - # macos has hardware acceleration. See android-emulator-runner action - runs-on: macos-latest + runs-on: ubuntu-latest timeout-minutes: 20 strategy: matrix: @@ -82,6 +81,12 @@ jobs: steps: - uses: actions/checkout@v4 + - 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: set up JDK 17 uses: actions/setup-java@v4 with: