@@ -43,17 +43,34 @@ jobs:
4343 with :
4444 cache-encryption-key : ${{ secrets.GRADLE_ENCRYPTION_KEY }}
4545
46- - name : Setup KVM
47- shell : bash
46+ - name : Enable KVM
4847 run : |
49- # check if virtualization is supported...
50- sudo apt install -y --no-install-recommends cpu-checker coreutils && echo "CPUs=$(nproc --all)" && kvm-ok
51- # allow access to KVM to run the emulator
52- echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
53- | sudo tee /etc/udev/rules.d/99-kvm4all.rules
48+ echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
5449 sudo udevadm control --reload-rules
5550 sudo udevadm trigger --name-match=kvm
5651
52+ - name : AVD cache
53+ uses : actions/cache@v4
54+ id : avd-cache
55+ with :
56+ path : |
57+ ~/.android/avd/*
58+ ~/.android/adb*
59+ key : avd-api-30
60+
61+ - name : Create AVD and generate snapshot for caching
62+ if : steps.avd-cache.outputs.cache-hit != 'true'
63+ uses : reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # pin@v2
64+ with :
65+ api-level : 30
66+ force-avd-creation : false
67+ emulator-options : -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
68+ disable-animations : true
69+ disable-spellchecker : true
70+ arch : x86_64
71+ disk-size : 4096M
72+ script : echo "Generated AVD snapshot for caching."
73+
5774 # Clean, build and release a test apk
5875 - name : Make assembleUiTests
5976 run : make assembleUiTests
6784 emulator-options : -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
6885 disable-animations : true
6986 disable-spellchecker : true
70- target : ' aosp_atd'
71- arch : x86
72- channel : canary # Necessary for ATDs
87+ arch : x86_64
7388 disk-size : 4096M
7489 script : ./gradlew sentry-android-integration-tests:sentry-uitest-android:connectedReleaseAndroidTest -DtestBuildType=release -Denvironment=github --daemon
7590
0 commit comments