Skip to content

Commit

Permalink
Enable ci emulator hardware acceleration with KVM
Browse files Browse the repository at this point in the history
  • Loading branch information
yasinkacmaz committed Sep 8, 2024
1 parent ae3e6cb commit 20ebced
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ui-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,21 @@ jobs:
path: |
~/.android/avd/*
~/.android/adb*
${{ env.ANDROID_HOME }}/platforms
${{ env.ANDROID_HOME }}/system-images
${{ env.ANDROID_HOME }}/emulator
${{ env.ANDROID_HOME }}/platform-tools
key: ${{ runner.os }}-avd-${{ env.androidApiVersion }}
- name: Enable KVM group permissions for emulator hardware acceleration
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: Setup Android Sdk
if: steps.avd-cache.outputs.cache-hit == 'true'
run: |
sudo chown $USER:$USER /usr/local/lib/android/sdk -R
yes | sdkmanager --licenses
- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
Expand Down

0 comments on commit 20ebced

Please sign in to comment.