summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2024-04-27 10:37:32 +0200
committerGitHub <noreply@github.com>2024-04-27 10:37:32 +0200
commit4d79419e8ee39ac1897e3387a3f870197643e617 (patch)
treeaf77ac598be03bb443d8a01ef437016a7f3c38c8
parent4bc0b38280f5d1fa3bc1d0988dd6d2607e65314f (diff)
downloadAntennaPod-4d79419e8ee39ac1897e3387a3f870197643e617.zip
Switch Emulator CI to Ubuntu (#7143)
GitHub switched their MacOS runners to ARM, which makes the Android emulator fail to start. Since we introduced the CI workflow, GitHub upgraded the Ubuntu runners as well, now supporting hardware acceleration. This means we no longer need MacOS. The Ubuntu runner is also about 2 times faster.
-rw-r--r--.github/workflows/checks.yml9
-rw-r--r--.github/workflows/runEmulatorTests.sh2
2 files changed, 8 insertions, 3 deletions
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
index 6431f3125..0d8ef46c1 100644
--- a/.github/workflows/checks.yml
+++ b/.github/workflows/checks.yml
@@ -102,7 +102,7 @@ jobs:
emulator-test:
name: "Emulator Test"
needs: static-analysis
- runs-on: macOS-latest
+ runs-on: ubuntu-latest
timeout-minutes: 45
env:
api-level: 30
@@ -124,6 +124,11 @@ jobs:
run: echo "org.gradle.parallel=true" >> local.properties
- name: Build with Gradle
run: ./gradlew assemblePlayDebugAndroidTest
+ - name: Enable KVM group perms
+ 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: Android Emulator test
uses: reactivecircus/android-emulator-runner@v2
with:
@@ -133,7 +138,7 @@ jobs:
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
- script: zsh .github/workflows/runEmulatorTests.sh
+ script: bash .github/workflows/runEmulatorTests.sh
- uses: actions/upload-artifact@v4
if: failure()
with:
diff --git a/.github/workflows/runEmulatorTests.sh b/.github/workflows/runEmulatorTests.sh
index c297932a7..3da5a6592 100644
--- a/.github/workflows/runEmulatorTests.sh
+++ b/.github/workflows/runEmulatorTests.sh
@@ -1,4 +1,4 @@
-#!/bin/zsh
+#!/bin/bash
set -o pipefail