Switch Emulator CI to Ubuntu (#7140)
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.
This commit is contained in:
parent
4cf362393a
commit
dbbb21bd3b
|
@ -102,7 +102,7 @@ jobs:
|
||||||
emulator-test:
|
emulator-test:
|
||||||
name: "Emulator Test"
|
name: "Emulator Test"
|
||||||
needs: static-analysis
|
needs: static-analysis
|
||||||
runs-on: macOS-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
env:
|
env:
|
||||||
api-level: 30
|
api-level: 30
|
||||||
|
@ -124,6 +124,11 @@ jobs:
|
||||||
run: echo "org.gradle.parallel=true" >> local.properties
|
run: echo "org.gradle.parallel=true" >> local.properties
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew assemblePlayDebugAndroidTest
|
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
|
- name: Android Emulator test
|
||||||
uses: reactivecircus/android-emulator-runner@v2
|
uses: reactivecircus/android-emulator-runner@v2
|
||||||
with:
|
with:
|
||||||
|
@ -133,7 +138,7 @@ jobs:
|
||||||
force-avd-creation: false
|
force-avd-creation: false
|
||||||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||||
disable-animations: true
|
disable-animations: true
|
||||||
script: zsh .github/workflows/runEmulatorTests.sh
|
script: bash .github/workflows/runEmulatorTests.sh
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/zsh
|
#!/bin/bash
|
||||||
|
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue