Skip to content

Commit

Permalink
#9: using reactivecircus emulated runner for API 33 only
Browse files Browse the repository at this point in the history
  • Loading branch information
arburk committed Feb 4, 2024
1 parent 45c4ddd commit 03ab2fd
Showing 1 changed file with 14 additions and 27 deletions.
41 changes: 14 additions & 27 deletions .github/workflows/android_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,6 @@ jobs:
echo "pr_exists_or_main_branch=$pr_exists_or_main_branch"
echo "pr_exists_or_main_branch=$pr_exists_or_main_branch" >> "$GITHUB_OUTPUT"
- name: AVD cache
uses: actions/cache@v4
id: avd-cache
if: steps.check_pr.outputs.pr_exists_or_main_branch != 0
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-33

- name: Create AVD and generate snapshot for caching
if: steps.check_pr.outputs.pr_exists_or_main_branch != 0
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 33
target: aosp_atd
arch: x86_64
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: echo "Generated AVD snapshot with API Level 33."

- name: checkout source
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -77,10 +56,6 @@ jobs:
- name: Build with Gradle
run: ./gradlew clean build

- name: SDKs - accept licenses
if: steps.check_pr.outputs.pr_exists_or_main_branch != 0
run: /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"

- name: Enable KVM group perms
if: steps.check_pr.outputs.pr_exists_or_main_branch != 0
# https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/
Expand All @@ -90,16 +65,28 @@ jobs:
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
# - name: AVD cache
# uses: actions/cache@v4
# id: avd-cache
# if: steps.check_pr.outputs.pr_exists_or_main_branch != 0
# with:
# path: |
# ~/.android/avd/*
# ~/.android/adb*
# key: avd-33-aosp_atd-x86_64

- name: Perfom instrumented tests
uses: reactivecircus/android-emulator-runner@v2
id: perform-it
continue-on-error: true
if: steps.check_pr.outputs.pr_exists_or_main_branch != 0
with:
with: # run ``sdkmanager --list`` to see available images
api-level: 33
target: aosp_atd
arch: x86_64
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
name: avd-33-aosp_atd-x86_64
channel: canary
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -showKernelLogging true
disable-animations: true
script: ./gradlew connectedCheck

Expand Down

0 comments on commit 03ab2fd

Please sign in to comment.