Skip to content

Commit 9dc9b48

Browse files
committed
The emulator is running very slowly. Try to enable hardware accelerations and use of KVM.
1 parent b11a752 commit 9dc9b48

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/x86_64-unknown-linux-android.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,18 @@ jobs:
6767
echo 'shift' >> run_android.sh
6868
echo 'adb shell "chmod +x /data/local/tmp/$EXE_NAME && /data/local/tmp/$EXE_NAME $@"' >> run_android.sh
6969
chmod +x run_android.sh
70+
- name: Enable KVM
71+
run: |
72+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
73+
sudo udevadm control --reload-rules
74+
sudo udevadm trigger --name-match=kvm
7075
- name: Run Tests on Emulator
7176
uses: reactivecircus/android-emulator-runner@v2
7277
with:
7378
api-level: 34
7479
arch: x86_64
7580
target: google_apis
76-
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -memory 2048
81+
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -memory 8192 -no-metrics
7782
disable-animations: true
7883
script: |
7984
# Wait for emulator to be fully ready

0 commit comments

Comments
 (0)