Skip to content

Commit

Permalink
Fix the Android CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaoyuang committed Apr 26, 2024
1 parent 14308c6 commit 79338e3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ jobs:
~/.android/adb*
key: avd-34

- name: Restart ADB Server
run: ./restart_adb_server.sh

- name: Create AVD and Generate Snapshot for Caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
Expand All @@ -87,7 +90,7 @@ jobs:
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: adb kill-server && adb start-server && echo "Generated AVD snapshot for caching."
script: echo "Generated AVD snapshot for caching."

- name: Run Android 14 Instrumented Tests
uses: reactivecircus/android-emulator-runner@v2
Expand Down Expand Up @@ -237,6 +240,9 @@ jobs:
~/.android/adb*
key: avd-26

- name: Restart ADB Server
run: ./restart_adb_server.sh

- name: Create AVD and Generate Snapshot for Caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
Expand All @@ -249,7 +255,7 @@ jobs:
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: adb kill-server && adb start-server && echo "Generated AVD snapshot for caching."
script: echo "Generated AVD snapshot for caching."

- name: Run Android 8 Instrumented Tests
uses: reactivecircus/android-emulator-runner@v2
Expand Down
5 changes: 5 additions & 0 deletions restart_adb_server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#Restart adb server
echo "${ANDROID_HOME}"
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
adb kill adb-server
adb start adb-server

0 comments on commit 79338e3

Please sign in to comment.