From a9faf8ff6b31b1867f03e79ad915e09c472bba0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Augustyniak?= Date: Tue, 1 Oct 2024 14:24:35 -0400 Subject: [PATCH] ci: re-enable android emulator tests (#54) --- .github/workflows/android.yaml | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index b65db506..b91b13ff 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -85,7 +85,7 @@ jobs: path: ./bazel-bin/examples/android/android_app.apk gradle_tests: # Requires a "larger runner", for nested virtualization support - runs-on: ubuntu-latest + runs-on: ubuntu-latest-8-cores env: SKIP_PROTO_GEN: 1 if: needs.pre_check.outputs.should_run == 'true' @@ -97,16 +97,16 @@ jobs: # See https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/ - 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 - - name: set up JDK 17 + 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: Set up JDK 17 uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '17' cache: gradle - - name: Setup Rust ARM target + - name: Set up Rust ARM target run: rustup update && rustup target add aarch64-linux-android && rustup target add x86_64-linux-android - name: AVD cache uses: actions/cache@v4 @@ -121,13 +121,13 @@ jobs: timeout-minutes: 30 uses: reactivecircus/android-emulator-runner@f0d1ed2dcad93c7479e8b2f2226c83af54494915 # pin@v2.32 with: - channel: beta + channel: stable force-avd-creation: false api-level: 21 target: default ram-size: 2048M arch: x86_64 - disk-size: 4096M + disk-size: 6144M profile: Nexus 6 disable-animations: true emulator-options: -no-window -accel on -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none @@ -141,13 +141,13 @@ jobs: - name: Instrumentation Tests uses: reactivecircus/android-emulator-runner@f0d1ed2dcad93c7479e8b2f2226c83af54494915 # pin@v2.32 with: - channel: beta + channel: stable force-avd-creation: false api-level: 21 target: default ram-size: 2048M arch: x86_64 - disk-size: 4096M + disk-size: 6144M profile: Nexus 6 disable-animations: true emulator-options: -no-snapshot-save -no-window -accel on -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none @@ -189,12 +189,12 @@ jobs: timeout-minutes: 30 uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # pin@v2 with: - channel: beta + channel: stable api-level: ${{ matrix.api-level }} target: google_apis ram-size: 2048M arch: x86_64 - disk-size: 4096M + disk-size: 6144M profile: Nexus 6 emulator-options: -no-window -accel on -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none script: echo "Generated AVD snapshot for caching." @@ -203,12 +203,12 @@ jobs: timeout-minutes: 15 with: force-avd-creation: false - channel: beta + channel: stable api-level: ${{ matrix.api-level }} target: google_apis ram-size: 2048M arch: x86_64 - disk-size: 4096M + disk-size: 6144M profile: Nexus 6 emulator-options: -no-snapshot-save -no-window -accel on -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none script: ./ci/verify_android.sh @@ -226,6 +226,4 @@ jobs: with: fetch-depth: 1 - name: check result - run: ./ci/check_result.sh ${{ needs.pre_check.result }} && ./ci/check_result.sh ${{ needs.build_apk.result }} - # TODO(snowp): Re-enable these checks once we fix the emulator issues - # && ./ci/check_result.sh ${{ needs.verify_android_hello_world_per_version.result }} && ./ci/check_result.sh ${{ needs.gradle_tests.result }} + run: ./ci/check_result.sh ${{ needs.pre_check.result }} && ./ci/check_result.sh ${{ needs.build_apk.result }} && ./ci/check_result.sh ${{ needs.verify_android_hello_world_per_version.result }} && ./ci/check_result.sh ${{ needs.gradle_tests.result }}