Skip to content

Commit

Permalink
Switch Emulator CI to Ubuntu (#7140)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ByteHamster committed Apr 27, 2024
1 parent 4cf3623 commit dbbb21b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/checks.yml
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/runEmulatorTests.sh
@@ -1,4 +1,4 @@
#!/bin/zsh
#!/bin/bash

set -o pipefail

Expand Down

0 comments on commit dbbb21b

Please sign in to comment.