diff --git a/.github/workflows/gradle_connected-tests.yml b/.github/workflows/gradle_connected-tests.yml index d3f26c06..ce8ca5f3 100644 --- a/.github/workflows/gradle_connected-tests.yml +++ b/.github/workflows/gradle_connected-tests.yml @@ -14,7 +14,7 @@ on: - main jobs: - build: + androidTest: # Faster, but MacOS costs 8 ct/min instead of 0.8 ct/min of on Linux. # Unfortunately, `DataCapturingServiceTest.testDisconnectReconnect` fails on linux stack. # But as this is a public repository, Github Actions are currently free of charge. @@ -23,7 +23,7 @@ jobs: # But we had to add `free-disk-space` to fix emulator flakiness. It only runs on ubuntu. runs-on: ubuntu-latest - # To test against multiple APIs + timeout-minutes: 55 strategy: matrix: api-level: [ 28 ] @@ -42,6 +42,15 @@ jobs: docker-images: false # Takes 16s (`nowinandroid`), enable if needed in the future large-packages: false # includes google-cloud-sdk and it's slow + # Set up KVM permissions to enable efficient Android emulator runs by modifying udev rules for universal access. + # From https://github.com/android/nowinandroid/blob/main/.github/workflows/Build.yaml#L142 + - 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 + - name: Checkout commit uses: actions/checkout@v3