Skip to content

enable kvm for ubuntu #23

enable kvm for ubuntu

enable kvm for ubuntu #23

Workflow file for this run

name: Pre Merge Checks
on:
push:
branches:
- main
pull_request:
branches:
- '*'
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Cache Gradle Caches
uses: gradle/gradle-build-action@v2
# - name: Run Gradle tasks
# continue-on-error: yes
# run: ./gradlew preMerge --continue
test_android:
runs-on: [ ubuntu-latest ]
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Cache Gradle Caches
uses: gradle/gradle-build-action@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- 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: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd.v2-34
- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
target: google_apis
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
arch: x86_64
disk-size: 3G
ram-size: 3G
heap-size: 1500M
profile: 3.4in WQVGA
channel: canary
script: ./script/check_emulator.sh
- name: Install ffmpeg
uses: FedericoCarboni/setup-ffmpeg@v2
- name: Pregenerate test package
run: ./gradlew :example:packageDebugAndroidTest
- name: Run tests and record video
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
target: google_apis
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot-save -noaudio -no-boot-anim -camera-back none
disable-animations: true
arch: x86_64
disk-size: 3G
ram-size: 3G
heap-size: 1500M
profile: 3.4in WQVGA
channel: canary
script: |
./script/check_emulator.sh
./gradlew example:recordAndroid example:connectedDebugAndroidTest
- name: Upload video
uses: actions/upload-artifact@v4
with:
name: out.mp4
path: example/out.mp4