File tree Expand file tree Collapse file tree 1 file changed +4
-27
lines changed Expand file tree Collapse file tree 1 file changed +4
-27
lines changed Original file line number Diff line number Diff line change @@ -56,33 +56,10 @@ jobs:
5656 - name : " Setup Environment"
5757 run : |
5858 echo "$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools/${{ env.ANDROID_BUILD_TOOLS_VERSION }}" >> $GITHUB_PATH
59-
60- - name : " Launch emulator"
61- if : false
62- timeout-minutes : 10
63- run : |
64- yes Y | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses 2>&1 >> /dev/null
65-
66- # Install AVD files
67- sdkmanager --install "system-images;android-${ANDROID_API};${ANDROID_TARGET};${ANDROID_ARCH}"
68- sdkmanager --channel=3 emulator
69-
70- # Create emulator
71- echo "Creating emulator: ${ANDROID_EMULATOR_NAME}"
72- avdmanager --verbose create avd -f -n "${ANDROID_EMULATOR_NAME}" -d "${ANDROID_PROFILE}" --abi "${ANDROID_TARGET}/${ANDROID_ARCH}" -k "system-images;android-${ANDROID_API};${ANDROID_TARGET};${ANDROID_ARCH}" --force
73-
74- echo "Listing emulators"
75-
76- emulator -list-avds
77- echo "Starting emulator"
78-
79- # Start emulator in background
80- nohup emulator -avd ${ANDROID_EMULATOR_NAME} -no-snapshot -no-window -no-audio -no-boot-anim -no-accel -no-metrics -camera-back none -accel off -gpu ${ANDROID_GPU} &
81- # Fixed quoting around "\r"
82- adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d "\r") ]]; do sleep 1; done; input keyevent 82'
83-
84- adb devices
85- echo "Emulator started"
59+ # needed for Linux
60+ if [[ "${RUNNER_OS}" == "Linux" ]]; then
61+ echo "ANDROID_AVD_HOME=${HOME}/.android/avd" >> $GITHUB_ENV
62+ fi
8663
8764 - name : SDKs - accept licenses
8865 run : yes y | sdkmanager --licenses
You can’t perform that action at this time.
0 commit comments