44 workflow_call :
55
66env :
7- DEVICE_API_LEVEL : ' 34 '
7+ DEVICE_API_LEVEL : ' 35 '
88 DEVICE_ARCH : ' x86_64'
99 DEVICE_TARGET : ' google_apis'
10- AVD_NAME : ' Pixel_API_34'
10+ AVD_NAME : ' Pixel_API_35'
11+ ANDROID_SDK_ROOT : /usr/local/lib/android/sdk
12+ ANDROID_HOME : /usr/local/lib/android/sdk
13+ NDK_VERSION : ' 27.3.13750724'
1114
1215jobs :
1316 android :
@@ -17,19 +20,31 @@ jobs:
1720
1821 steps :
1922 - name : Checkout
20- uses : actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
23+ uses : actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v4.2.2
2124
2225 - name : Setup Project
2326 uses : ./.github/actions/setup-node-yarn
2427
2528 - name : Setup Java
26- uses : actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e
29+ uses : actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v4.7.1
2730 with :
2831 distribution : ' zulu'
29- java-version : ' 17'
32+ java-version : ' 21'
33+
34+ # Restore NDK from cache before sdkmanager runs.
35+ - name : Cache NDK
36+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.0
37+ with :
38+ path : ${{ env.ANDROID_SDK_ROOT }}/ndk/${{ env.NDK_VERSION }}
39+ key : ${{ runner.os }}-ndk-${{ env.NDK_VERSION }}
3040
3141 - name : Setup Android SDK
32- uses : android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407
42+ uses : android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.1
43+ with :
44+ packages : |
45+ tools
46+ platform-tools
47+ ndk;${{ env.NDK_VERSION }}
3348
3449 - name : Enable KVM
3550 run : |
3853 sudo udevadm trigger --name-match=kvm
3954 ls /dev/kvm
4055
41- # Build dependencies (only if APK not cached)
42- - name : Cache NDK
43- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
44- with :
45- path : /usr/local/lib/android/sdk/ndk/27.3.13750724
46- key : ${{ runner.os }}-ndk-27.3.13750724
47-
48- - name : Install NDK
49- run : echo "y" | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;27.3.13750724"
50-
5156 - name : Cache Gradle
52- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
57+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.0
5358 with :
5459 path : |
5560 ~/.gradle/caches
6772 run : yarn app:package:android
6873
6974 - name : AVD cache
70- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
75+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.0
7176 with :
7277 path : |
7378 ~/.android/avd/*
7681
7782 # Create AVD (only if not cached, runs after build)
7883 - name : Create AVD and generate snapshot for caching
79- uses : reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b
84+ uses : reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b # v2.33.0
8085 with :
8186 api-level : ${{ env.DEVICE_API_LEVEL }}
8287 target : ${{ env.DEVICE_TARGET }}
9196
9297 # Launch AVD, install app, and run tests
9398 - name : Run Harness E2E tests
94- uses : reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b
99+ uses : reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b # v2.33.0
95100 with :
96101 working-directory : example
97102 api-level : ${{ env.DEVICE_API_LEVEL }}
0 commit comments