pull/2098/head^2
Moe 4 months ago
parent cfa5434496
commit 37a45906a0

@ -1,4 +1,4 @@
name: Macrobenchmark + Screen Record (Emulator With Display)
name: Macrobenchmark + Screen Record (Emulator API 35)
on:
push:
@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
api-level: [30]
api-level: [35]
steps:
- name: Checkout
@ -18,10 +18,16 @@ jobs:
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
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: Install emulator dependencies
run: |
sudo apt-get update
sudo apt-get install -y libpulse0
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
@ -35,16 +41,16 @@ jobs:
:app:assembleDemoBenchmark \
:benchmark:assembleDemoBenchmark
- name: Restore AVD cache
- name: AVD cache
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd
~/.android/avd/*
~/.android/adb*
key: avd-api-${{ matrix.api-level }}
key: avd-${{ matrix.api-level }}
- name: Create AVD snapshot (cache miss only)
- name: Create AVD snapshot (only on cache miss)
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
@ -52,11 +58,9 @@ jobs:
target: google_apis
arch: x86_64
force-avd-creation: false
emulator-options: >
-gpu host
emulator-options: -no-window -gpu host
disable-animations: true
script: echo "AVD snapshot created"
script: echo "Snapshot created"
- name: Run macrobenchmark + screen record
uses: reactivecircus/android-emulator-runner@v2
@ -65,17 +69,16 @@ jobs:
target: google_apis
arch: x86_64
force-avd-creation: false
emulator-options: >
-gpu host
emulator-options: -no-snapshot-save -no-window -gpu host
disable-animations: true
script: |
echo "Start screen recording"
adb shell screenrecord /sdcard/benchmark.mp4 &
# Run benchmarks (suppress emulator error so it runs completely)
# Run macrobenchmarks (suppress emulator error, non-blocking)
./gradlew :benchmark:connectedDemoBenchmarkAndroidTest \
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.suppressErrors=EMULATOR || true
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.suppressErrors=EMULATOR \
|| true
adb shell pkill -INT screenrecord || true
sleep 3

Loading…
Cancel
Save