Skip to content

Commit d58ac87

Browse files
committed
Enable KVM for Android emulator CI
1 parent f9f5318 commit d58ac87

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/android-kotlin.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ jobs:
2222

2323
- uses: android-actions/setup-android@v3
2424

25+
- name: Enable KVM
26+
run: |
27+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
28+
sudo udevadm control --reload-rules
29+
sudo udevadm trigger --name-match=kvm
30+
2531
- name: Install Android SDK packages
2632
run: sdkmanager "platforms;android-36" "build-tools;36.0.0"
2733

@@ -42,4 +48,5 @@ jobs:
4248
target: google_apis
4349
arch: x86_64
4450
profile: pixel_6
51+
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
4552
script: ./gradlew -p examples/android-kotlin :app:connectedDebugAndroidTest -PlbugJar="$LBUG_JAR"

examples/android-kotlin/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ dependencies {
2424
implementation files(lbugJar.get())
2525
androidTestImplementation 'androidx.test:core-ktx:1.6.1'
2626
androidTestImplementation 'androidx.test.ext:junit-ktx:1.2.1'
27+
androidTestImplementation 'androidx.test:runner:1.6.2'
2728
}

0 commit comments

Comments
 (0)