From e7012382a59092ab30e16d2be552182241afdfb9 Mon Sep 17 00:00:00 2001 From: Moe Date: Tue, 27 Jan 2026 21:18:35 +0200 Subject: [PATCH] yarab --- .github/workflows/Build.yaml | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml index 439d6c65e..54297abc1 100644 --- a/.github/workflows/Build.yaml +++ b/.github/workflows/Build.yaml @@ -13,20 +13,20 @@ jobs: api-level: [35] steps: - - name: Checkout + - name: Checkout code uses: actions/checkout@v4 - - name: Enable KVM + - name: Enable KVM for emulator 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 + - name: Install emulator system dependencies run: | sudo apt-get update - sudo apt-get install -y libpulse0 + sudo apt-get install -y libpulse0 libvulkan1 mesa-utils libgl1-mesa-glx libgl1-mesa-dri - name: Set up JDK 17 uses: actions/setup-java@v5 @@ -35,13 +35,12 @@ jobs: java-version: 17 cache: gradle - - name: Build benchmark variants + - name: Build benchmark APKs run: | - ./gradlew \ - :app:assembleDemoBenchmark \ - :benchmark:assembleDemoBenchmark + ./gradlew :app:assembleDemoBenchmark \ + :benchmark:assembleDemoBenchmark - - name: AVD cache + - name: Cache AVD uses: actions/cache@v4 id: avd-cache with: @@ -50,7 +49,7 @@ jobs: ~/.android/adb* key: avd-${{ matrix.api-level }} - - name: Create AVD snapshot (only on cache miss) + - name: Create emulator snapshot (only if not cached) if: steps.avd-cache.outputs.cache-hit != 'true' uses: reactivecircus/android-emulator-runner@v2 with: @@ -60,7 +59,7 @@ jobs: force-avd-creation: false emulator-options: -no-window -gpu host disable-animations: true - script: echo "Snapshot created" + script: echo "Snapshot created." - name: Run macrobenchmark + screen record uses: reactivecircus/android-emulator-runner@v2 @@ -72,10 +71,10 @@ jobs: emulator-options: -no-snapshot-save -no-window -gpu host disable-animations: true script: | - echo "Start screen recording" + echo "Starting screen recording" adb shell screenrecord /sdcard/benchmark.mp4 & - # Run macrobenchmarks (suppress emulator error, non-blocking) + # Run macrobenchmark tests (suppress emulator error, non-blocking) ./gradlew :benchmark:connectedDemoBenchmarkAndroidTest \ -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.suppressErrors=EMULATOR \ || true @@ -84,7 +83,7 @@ jobs: sleep 3 adb pull /sdcard/benchmark.mp4 benchmark.mp4 - - name: Upload benchmark reports + - name: Upload macrobenchmark reports uses: actions/upload-artifact@v4 with: name: macrobenchmark-reports