From c0fbb8832d9a531cffed82cfc76cae80e486933d Mon Sep 17 00:00:00 2001 From: Ashish Bhatia Date: Sun, 7 Apr 2024 15:33:18 -0700 Subject: [PATCH] ci: add KVM on a missing test (#242) --- .github/workflows/adbe-unittests.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/adbe-unittests.yml b/.github/workflows/adbe-unittests.yml index f50c3e0..f33a4ee 100644 --- a/.github/workflows/adbe-unittests.yml +++ b/.github/workflows/adbe-unittests.yml @@ -36,6 +36,16 @@ 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 + # For some weird reason, if KVM is enabled then emulator times out on API 26! + # Ref: https://github.com/ashishb/adb-enhanced/actions/runs/8591215419/job/23539714583?pr=242 + if: matrix.api-level != 26 + 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