Skip to content

Commit 77fd5d6

Browse files
committed
Fix ANDROID_AVD_HOME
1 parent edb1240 commit 77fd5d6

2 files changed

Lines changed: 1 addition & 22 deletions

File tree

.github/workflows/scripts/android/android-emulator-tests.sh

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,6 @@ ANDROID_SDK_TRIPLE="x86_64-unknown-linux-android28"
2929

3030
while [[ $# -gt 0 ]]; do
3131
case $1 in
32-
--android)
33-
INSTALL_ANDROID=true
34-
shift
35-
;;
36-
--android-ndk-version=*)
37-
ANDROID_NDK_VERSION="${1#*=}"
38-
shift
39-
;;
4032
--android-sdk-triple=*)
4133
ANDROID_SDK_TRIPLE="${1#*=}"
4234
shift
@@ -81,34 +73,21 @@ sdkmanager --install "emulator" "platform-tools" "platforms;android-${ANDROID_AP
8173

8274
log "Creating Android emulator"
8375
avdmanager create avd --force -n "${EMULATOR_NAME}" --package "${EMULATOR_SPEC}" --device "${ANDROID_PROFILE}"
84-
echo "Searching for emulator in: ${ANDROID_AVD_HOME}"
85-
find "${ANDROID_AVD_HOME}" || true
86-
echo "Searching for emulator in: /"
87-
find / | grep "${EMULATOR_NAME}" || true
8876

8977
log "Configuring Android emulators"
9078
emulator -list-avds
9179

92-
ANDROID_AVD_CONFIG="${ANDROID_AVD_HOME}"/"${EMULATOR_NAME}".avd/config.ini
93-
#mkdir -p $(dirname "${ANDROID_AVD_CONFIG}")
94-
# ~2G partition size
95-
echo 'disk.dataPartition.size=2GB' >> "${ANDROID_AVD_CONFIG}"
96-
log "Checking Android emulator"
97-
cat "${ANDROID_AVD_CONFIG}"
98-
9980
log "Check Hardware Acceleration (KVM)"
10081
emulator -accel-check
10182

10283
log "Starting Android emulator"
103-
10484
# launch the emulator in the background
10585
nohup emulator -no-metrics -partition-size 1024 -memory 4096 -wipe-data -no-window -no-snapshot -noaudio -no-boot-anim -avd "${EMULATOR_NAME}" &
10686

10787
log "Waiting for Android emulator startup"
10888
timeout ${ANDROID_EMULATOR_LAUNCH_TIMEOUT} adb wait-for-any-device
10989

11090
log "Prepare Swift test package"
111-
11291
# create a staging folder where we copy the test executable
11392
# and all the dependent libraries to copy over to the emulator
11493
STAGING_DIR="swift-android-test"

.github/workflows/swift_package_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ jobs:
656656
${{ steps.script_path.outputs.root }}/.github/workflows/scripts/install-and-build-with-sdk.sh --android --flags="$BUILD_FLAGS" --build-command="${{ inputs.android_sdk_build_command }}" --android-sdk-triple=${{ join(fromJson(inputs.android_sdk_triples), ' --android-sdk-triple=') }} --android-ndk-version="${{ matrix.ndk_version }}" ${{ matrix.swift_version }}
657657
if [[ "${{ inputs.enable_android_sdk_checks }}" == "true" ]]; then
658658
# install and launch the emulator and run the tests
659-
${{ steps.script_path.outputs.root }}/.github/workflows/scripts/android/android-emulator-tests.sh --android-sdk-triple=${{ join(fromJson(inputs.android_sdk_triples), ' --android-sdk-triple=') }} --android-ndk-version="${{ matrix.ndk_version }}"
659+
${{ steps.script_path.outputs.root }}/.github/workflows/scripts/android/android-emulator-tests.sh --android-sdk-triple=${{ join(fromJson(inputs.android_sdk_triples), ' --android-sdk-triple=') }}
660660
fi
661661
662662
windows-build:

0 commit comments

Comments
 (0)