Skip to content

Commit

Permalink
Update SDKs tested by CI/CD
Browse files Browse the repository at this point in the history
34 is latest public, 33 is iNat target version. 23 continues to be iNat min version.
Also fixed install to use x86 or x86_64 arch based on what emulator images are actually available
Updated emulator build - we were running an emulator from mid-2021 to work around
emulator boot issues (see ReactiveCircus/android-emulator-runner#160
for details). Newest emulator boots fine with all SDK versions
  • Loading branch information
hamiltont committed Dec 27, 2023
1 parent b960e36 commit 5a27492
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ on:
jobs:
test:
name: Instrumented Tests, SDK ${{ matrix.api-level }}
runs-on: macos-11
runs-on: macos-12
strategy:
matrix:
api-level:
- 23 # Android 5, minSdkVersion
- 27 # Android 8, has caused problems in the past
# SDK 29 causes frequent problems with the emulator, not sure why.
# Hoping SDK 30 is close enough
# - 29 # Android 10, targetSdkVersion
- 30 # Android 11, latest public release
- 33 # Android 10, targetSdkVersion
- 34 # Android 14, latest public release
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -40,22 +38,29 @@ jobs:
~/.android/adb*
key: avd-${{ matrix.api-level }}-20220105-1

# You can use sdkmanager --list to locate available packages.
# In our case, API=27 with google_apis is only available with x86, but
# later APIs (33,34) do not have x86
- name: Set Architecture Based on API Level
run: echo "ARCH=$(if [ ${{ matrix.api-level }} -eq 27 ]; then echo 'x86'; else echo 'x86_64'; fi)" >> $GITHUB_ENV

- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ env.ARCH }}
force-avd-creation: true
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
target: google_apis
ndk: 26.1.10909125
# I think this might be a quick fix for intermittent build failures waiting for the emaultor to boot
emulator-build: 7425822
script: echo "Generated AVD snapshot for caching."

- name: Set Java 11
run: |
echo "JAVA_HOME=$JAVA_HOME_11_X64" >> $GITHUB_ENV
- name: Copy iNat config files
run: |
sed -E 's/<!-- *</</' iNaturalist/src/main/res/values/config.example.xml | sed -E 's/> *-->/>/' > iNaturalist/src/main/res/values/config.xml
Expand All @@ -68,6 +73,7 @@ jobs:
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: arm64-v8a
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
Expand Down

0 comments on commit 5a27492

Please sign in to comment.