File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343 distribution : ' zulu'
4444 cache : ' gradle'
4545
46+ - name : Add Android tools to PATH
47+ run : |
48+ echo "$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$ANDROID_HOME/cmdline-tools/latest/bin:$PATH" >> $GITHUB_ENV
49+
50+ - name : Remove old AVDs
51+ run : rm -rf $HOME/.android/avd/${AVD_NAME}.avd $HOME/.android/avd/${AVD_NAME}.ini || true
52+
4653 - name : Install Android SDK components
4754 run : |
4855 yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install \
@@ -51,10 +58,12 @@ jobs:
5158 "system-images;android-${API_LEVEL};google_apis;x86_64" \
5259 "emulator"
5360
54- - name : Create and start emulator
61+ - name : Create emulator
62+ run : echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n $AVD_NAME -k "${SYSTEM_IMAGES}" --device "pixel_6"
63+
64+ - name : Boot emulator
5565 run : |
56- echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n $AVD_NAME -k "${SYSTEM_IMAGES}" --device "pixel_6"
57- $ANDROID_HOME/emulator/emulator -avd $AVD_NAME -no-snapshot -noaudio -no-window -gpu swiftshader_indirect -no-boot-anim &
66+ $ANDROID_HOME/emulator/emulator -avd $AVD_NAME -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim &
5867 adb wait-for-device
5968 adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;'
6069 echo "Emulator booted successfully."
You can’t perform that action at this time.
0 commit comments