diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8945ba8db0..4bfe43cf57 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: run: ./gradlew build --stacktrace instrumentation-tests: - runs-on: macos-latest + runs-on: ubuntu-latest timeout-minutes: 30 strategy: # Allow tests to continue on other devices if they fail on one device. @@ -55,20 +55,26 @@ jobs: # target: aosp_atd # channel: canary steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - 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 + ls /dev/kvm + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: java-version: 17 distribution: 'zulu' - uses: gradle/gradle-build-action@v2 - name: AVD cache - uses: actions/cache@v3 + uses: actions/cache@v4 id: avd-cache with: path: | ~/.android/avd/* ~/.android/adb* - key: avd-${{ matrix.api-level }}-${{ matrix.os }}-${{ matrix.target }} + key: avd-cached-${{ matrix.api-level }}-${{ matrix.os }}-${{ matrix.target }} - name: Create AVD and generate snapshot for caching if: steps.avd-cache.outputs.cache-hit != 'true' uses: reactivecircus/android-emulator-runner@v2 @@ -84,6 +90,7 @@ jobs: uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.api-level }} + force-avd-creation: false target: ${{ matrix.target }} arch: ${{ matrix.arch }} emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-snapshot-save