From 4d970071b67466585ddbafbd68de008ef7cd0bef Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 09:09:47 +0100 Subject: [PATCH 01/32] ci: replace macos-12 action runners --- .github/workflows/ci.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc124271f..ab6b09c1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,11 @@ on: branches: - master - "release/**" + paths-ignore: + - "*.md" pull_request: + paths-ignore: + - "*.md" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -77,7 +81,7 @@ jobs: SYSTEM_VERSION_COMPAT: 0 CMAKE_DEFINES: -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64 - name: macOS (clang + asan + llvm-cov) - os: macOs-12 + os: macOs-15 CC: clang CXX: clang++ ERROR_ON_WARNINGS: 1 @@ -96,15 +100,15 @@ jobs: # The Android emulator is currently only available on macos, see: # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/android?view=azure-devops#test-on-the-android-emulator - name: Android (old API/NDK) - os: macOs-12 + os: macOs-15 ANDROID_API: 16 ANDROID_NDK: 20.1.5948944 - ANDROID_ARCH: x86 + ANDROID_ARCH: armv7-a - name: Android (new API/NDK) - os: macOs-12 - ANDROID_API: 34 - ANDROID_NDK: 26.1.10909125 - ANDROID_ARCH: x86_64 + os: macOs-15 + ANDROID_API: 35 + ANDROID_NDK: 27.2.12479018 + ANDROID_ARCH: arm64-v8a name: ${{ matrix.name }} runs-on: ${{ matrix.os }} From 293ff2056b55d0ac1d37834e1c476366411d3ad9 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 09:47:10 +0100 Subject: [PATCH 02/32] add listing installed images to android start script --- scripts/start-android.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index 02b4cc306..3373e2756 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -14,6 +14,9 @@ API_LEVEL=${ANDROID_API:-"29"} AVD_EMULATOR_NAME="sentry_android_${ARCH}" IMAGE=${ANDROID_IMAGE:-"system-images;android-${API_LEVEL};google_apis;${ARCH}"} +echo "List installed images" +sdkmanager --list | grep "system-images" | grep "Installed" + # Create an Android Virtual Device echo "Create Test AVDs with..." echo "ARCH = $ARCH" From a74796fd5ad715d26d1a1256b4486c6053e641aa Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 09:50:53 +0100 Subject: [PATCH 03/32] specify path to android tools for sdkmanager --- scripts/start-android.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index 3373e2756..df45c0714 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -15,7 +15,7 @@ AVD_EMULATOR_NAME="sentry_android_${ARCH}" IMAGE=${ANDROID_IMAGE:-"system-images;android-${API_LEVEL};google_apis;${ARCH}"} echo "List installed images" -sdkmanager --list | grep "system-images" | grep "Installed" +$ANDROID_HOME/tools/bin/sdkmanager --list | grep "system-images" | grep "Installed" # Create an Android Virtual Device echo "Create Test AVDs with..." From de1bd42ffd3ede72b4097b1a1da83ec5a1db34be Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 09:59:31 +0100 Subject: [PATCH 04/32] use cmdline-tools for sdkmanager + avdmanager --- scripts/start-android.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index df45c0714..360ca520c 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -15,7 +15,7 @@ AVD_EMULATOR_NAME="sentry_android_${ARCH}" IMAGE=${ANDROID_IMAGE:-"system-images;android-${API_LEVEL};google_apis;${ARCH}"} echo "List installed images" -$ANDROID_HOME/tools/bin/sdkmanager --list | grep "system-images" | grep "Installed" +$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list | grep "system-images" | grep "Installed" # Create an Android Virtual Device echo "Create Test AVDs with..." @@ -23,7 +23,7 @@ echo "ARCH = $ARCH" echo "API_LEVEL = $API_LEVEL" echo "AVD_EMULATOR_NAME = $AVD_EMULATOR_NAME" echo "IMAGE = $IMAGE" -echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n $AVD_EMULATOR_NAME -k "$IMAGE" --force +echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n $AVD_EMULATOR_NAME -k "$IMAGE" --force echo "List available AVDs..." $ANDROID_HOME/emulator/emulator -list-avds From a8f562cdd7e94bcf7b6ebcd8ad4376ecc2e7e4d2 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 10:10:25 +0100 Subject: [PATCH 05/32] switch to macos-14 since macos-15 has no android cmd-tools --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab6b09c1a..3bc7ea9b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,20 +68,20 @@ jobs: os: ubuntu-22.04 RUN_ANALYZER: code-checker,valgrind - name: macOS (xcode llvm) - os: macOs-14 + os: macos-14 ERROR_ON_WARNINGS: 1 SYSTEM_VERSION_COMPAT: 0 - name: macOS 13 (xcode llvm) - os: macOs-13 + os: macos-13 ERROR_ON_WARNINGS: 1 SYSTEM_VERSION_COMPAT: 0 - name: macOS (xcode llvm + universal) - os: macOs-14 + os: macos-14 ERROR_ON_WARNINGS: 1 SYSTEM_VERSION_COMPAT: 0 CMAKE_DEFINES: -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64 - name: macOS (clang + asan + llvm-cov) - os: macOs-15 + os: macos-15 CC: clang CXX: clang++ ERROR_ON_WARNINGS: 1 @@ -100,12 +100,12 @@ jobs: # The Android emulator is currently only available on macos, see: # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/android?view=azure-devops#test-on-the-android-emulator - name: Android (old API/NDK) - os: macOs-15 + os: macos-14 ANDROID_API: 16 ANDROID_NDK: 20.1.5948944 ANDROID_ARCH: armv7-a - name: Android (new API/NDK) - os: macOs-15 + os: macos-14 ANDROID_API: 35 ANDROID_NDK: 27.2.12479018 ANDROID_ARCH: arm64-v8a From a98325ba1c202fe5e11a09096b16fd6a07c2abc3 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 10:24:46 +0100 Subject: [PATCH 06/32] try x64 macos images --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3bc7ea9b3..928916d48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,15 +100,15 @@ jobs: # The Android emulator is currently only available on macos, see: # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/android?view=azure-devops#test-on-the-android-emulator - name: Android (old API/NDK) - os: macos-14 + os: macos-14-large ANDROID_API: 16 ANDROID_NDK: 20.1.5948944 - ANDROID_ARCH: armv7-a + ANDROID_ARCH: x86 - name: Android (new API/NDK) - os: macos-14 + os: macos-14-large ANDROID_API: 35 ANDROID_NDK: 27.2.12479018 - ANDROID_ARCH: arm64-v8a + ANDROID_ARCH: x86_64 name: ${{ matrix.name }} runs-on: ${{ matrix.os }} From 093233378caaa416de82a99ba4bc45127fdb691e Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 10:36:45 +0100 Subject: [PATCH 07/32] list sdkmanager images and try to update to check if tooling works at all --- scripts/start-android.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index 360ca520c..22014d72a 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -15,7 +15,8 @@ AVD_EMULATOR_NAME="sentry_android_${ARCH}" IMAGE=${ANDROID_IMAGE:-"system-images;android-${API_LEVEL};google_apis;${ARCH}"} echo "List installed images" -$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list | grep "system-images" | grep "Installed" +$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list +$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --update # Create an Android Virtual Device echo "Create Test AVDs with..." From d94842daa6f244dd7d75b4960f35dd7a7739d8c7 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 10:45:20 +0100 Subject: [PATCH 08/32] switch back to macos-15 verify installable setup --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 928916d48..d3a7850c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,15 +100,15 @@ jobs: # The Android emulator is currently only available on macos, see: # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/android?view=azure-devops#test-on-the-android-emulator - name: Android (old API/NDK) - os: macos-14-large + os: macos-15 ANDROID_API: 16 ANDROID_NDK: 20.1.5948944 - ANDROID_ARCH: x86 + ANDROID_ARCH: armeabi-v7a - name: Android (new API/NDK) - os: macos-14-large + os: macos-15 ANDROID_API: 35 ANDROID_NDK: 27.2.12479018 - ANDROID_ARCH: x86_64 + ANDROID_ARCH: arm64-v8a name: ${{ matrix.name }} runs-on: ${{ matrix.os }} From b0df4abf76d1beb6765a39cbefaec68c880f1398 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 10:45:45 +0100 Subject: [PATCH 09/32] remove update from android start script again --- scripts/start-android.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index 22014d72a..407bd73af 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -16,7 +16,6 @@ IMAGE=${ANDROID_IMAGE:-"system-images;android-${API_LEVEL};google_apis;${ARCH}"} echo "List installed images" $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list -$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --update # Create an Android Virtual Device echo "Create Test AVDs with..." From b93e7d2db3dcf35567fc3ee252ef08c99009c1ac Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 11:49:47 +0100 Subject: [PATCH 10/32] ensure images are installed --- scripts/start-android.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index 407bd73af..e4b3da21e 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -14,7 +14,7 @@ API_LEVEL=${ANDROID_API:-"29"} AVD_EMULATOR_NAME="sentry_android_${ARCH}" IMAGE=${ANDROID_IMAGE:-"system-images;android-${API_LEVEL};google_apis;${ARCH}"} -echo "List installed images" +echo "List installed images..." $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list # Create an Android Virtual Device @@ -23,6 +23,11 @@ echo "ARCH = $ARCH" echo "API_LEVEL = $API_LEVEL" echo "AVD_EMULATOR_NAME = $AVD_EMULATOR_NAME" echo "IMAGE = $IMAGE" + +echo "Install image..." +$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install "$IMAGE" + +echo "Create AVD..." echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n $AVD_EMULATOR_NAME -k "$IMAGE" --force echo "List available AVDs..." From 708eff7dc676fc11878231ebfea910f44e2e18ae Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 11:53:47 +0100 Subject: [PATCH 11/32] accept android image licenses automatically --- scripts/start-android.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index e4b3da21e..617d42c0d 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -25,7 +25,7 @@ echo "AVD_EMULATOR_NAME = $AVD_EMULATOR_NAME" echo "IMAGE = $IMAGE" echo "Install image..." -$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install "$IMAGE" +$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install "$IMAGE" --licenses echo "Create AVD..." echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n $AVD_EMULATOR_NAME -k "$IMAGE" --force From 0cedb2bb6d3a82836e9b9d5c6a1e60c7038f8096 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 12:01:00 +0100 Subject: [PATCH 12/32] pre-accept licenses --- scripts/start-android.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index 617d42c0d..80287fa78 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -25,7 +25,8 @@ echo "AVD_EMULATOR_NAME = $AVD_EMULATOR_NAME" echo "IMAGE = $IMAGE" echo "Install image..." -$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install "$IMAGE" --licenses +yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --licenses +$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install "$IMAGE" echo "Create AVD..." echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n $AVD_EMULATOR_NAME -k "$IMAGE" --force From 10bee8eb11fd8e8a8b723c9293affeb636467af6 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 12:08:39 +0100 Subject: [PATCH 13/32] start the emulator blocking so we can see any issues during startup --- scripts/start-android.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index 80287fa78..6516ed132 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -35,8 +35,11 @@ echo "List available AVDs..." $ANDROID_HOME/emulator/emulator -list-avds # Start emulator in background -echo "Starting emulator..." -nohup $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot > /dev/null 2>&1 & +# echo "Starting emulator..." +# nohup $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot > /dev/null 2>&1 & +echo "Starting emulator blocking..." +$ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot + echo "Wait for emulator availability..." $ANDROID_HOME/platform-tools/adb wait-for-device shell 'ls' echo "Verify emulator devices as running..." From cd215a4ccba8b7a77399e52612b86871cf42664b Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 12:23:38 +0100 Subject: [PATCH 14/32] check emulator acceleration before starting the emulator --- scripts/start-android.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index 6516ed132..8ef4b3249 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -34,6 +34,9 @@ echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n $AVD echo "List available AVDs..." $ANDROID_HOME/emulator/emulator -list-avds +echo "Check emulator acceleration..." +$ANDROID_HOME/emulator/emulator -accel-check + # Start emulator in background # echo "Starting emulator..." # nohup $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot > /dev/null 2>&1 & From a75e4f17bc690e7df2ec94a3f9c63cb6ca033939 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 12:45:44 +0100 Subject: [PATCH 15/32] switch back x86[_64] images --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3a7850c7..d3728267a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,15 +100,15 @@ jobs: # The Android emulator is currently only available on macos, see: # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/android?view=azure-devops#test-on-the-android-emulator - name: Android (old API/NDK) - os: macos-15 + os: macos-15-large ANDROID_API: 16 ANDROID_NDK: 20.1.5948944 - ANDROID_ARCH: armeabi-v7a + ANDROID_ARCH: x86 - name: Android (new API/NDK) - os: macos-15 + os: macos-15-large ANDROID_API: 35 ANDROID_NDK: 27.2.12479018 - ANDROID_ARCH: arm64-v8a + ANDROID_ARCH: x86_64 name: ${{ matrix.name }} runs-on: ${{ matrix.os }} From 785692bb0895864fd6da9c29384938d7c4d03ea2 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 12:49:24 +0100 Subject: [PATCH 16/32] re-enable emulator run in background --- scripts/start-android.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index 8ef4b3249..e080b4a36 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -38,10 +38,12 @@ echo "Check emulator acceleration..." $ANDROID_HOME/emulator/emulator -accel-check # Start emulator in background -# echo "Starting emulator..." -# nohup $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot > /dev/null 2>&1 & -echo "Starting emulator blocking..." -$ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot +echo "Starting emulator..." +nohup $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot > /dev/null 2>&1 & + +# For debugging emulator start issues: +# echo "Starting emulator blocking..." +# $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot echo "Wait for emulator availability..." $ANDROID_HOME/platform-tools/adb wait-for-device shell 'ls' From d80228f91f3d29f8c8994fecd0752310e290eae2 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 13:05:52 +0100 Subject: [PATCH 17/32] expose llvm18 bin directory for macos15 runners on PATH --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3728267a..bfea1e588 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -155,10 +155,14 @@ jobs: if: ${{ contains(env['RUN_ANALYZER'], 'code-checker') }} run: sudo snap install codechecker --classic - - name: Expose llvm PATH for Mac + - name: Expose llvm@15 PATH for Mac if: ${{ runner.os == 'macOS' }} run: echo $(brew --prefix llvm@15)/bin >> $GITHUB_PATH - + + - name: Expose llvm@18 PATH for Mac + if: ${{ runner.os == 'macOS' && matrix.os == "macos-15-large" }} + run: echo $(brew --prefix llvm@18)/bin >> $GITHUB_PATH + - name: Installing LLVM-MINGW Dependencies if: ${{ runner.os == 'Windows' && env['TEST_MINGW'] }} shell: powershell From ba8661f96969ab2d43631d53303eaf0d3c40cf12 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 13:06:49 +0100 Subject: [PATCH 18/32] revert last commit to macos-15 only --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfea1e588..486e55453 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,7 +160,7 @@ jobs: run: echo $(brew --prefix llvm@15)/bin >> $GITHUB_PATH - name: Expose llvm@18 PATH for Mac - if: ${{ runner.os == 'macOS' && matrix.os == "macos-15-large" }} + if: ${{ runner.os == 'macOS' && matrix.os == "macos-15" }} run: echo $(brew --prefix llvm@18)/bin >> $GITHUB_PATH - name: Installing LLVM-MINGW Dependencies From a5099c67101a738e5217b1a1032b5bbc3a69b099 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 13:08:21 +0100 Subject: [PATCH 19/32] fix quotes --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 486e55453..30ad7a960 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,7 +160,7 @@ jobs: run: echo $(brew --prefix llvm@15)/bin >> $GITHUB_PATH - name: Expose llvm@18 PATH for Mac - if: ${{ runner.os == 'macOS' && matrix.os == "macos-15" }} + if: ${{ runner.os == 'macOS' && matrix.os == 'macos-15' }} run: echo $(brew --prefix llvm@18)/bin >> $GITHUB_PATH - name: Installing LLVM-MINGW Dependencies From 76e1da8df322768c323488e32e323fea28370526 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 15:15:33 +0100 Subject: [PATCH 20/32] bump old android api/ndk --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30ad7a960..fca0ee688 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,10 +101,10 @@ jobs: # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/android?view=azure-devops#test-on-the-android-emulator - name: Android (old API/NDK) os: macos-15-large - ANDROID_API: 16 - ANDROID_NDK: 20.1.5948944 + ANDROID_API: 19 + ANDROID_NDK: 23.2.8568313 ANDROID_ARCH: x86 - - name: Android (new API/NDK) + - name: Android (latest API/NDK) os: macos-15-large ANDROID_API: 35 ANDROID_NDK: 27.2.12479018 From 31cf4fa2c84ff894ff04571088b9ec44b423b3d4 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 15:29:38 +0100 Subject: [PATCH 21/32] lower end android on x86_64 + llvm-cov on macos-15-large --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fca0ee688..d494ed9a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,7 +81,7 @@ jobs: SYSTEM_VERSION_COMPAT: 0 CMAKE_DEFINES: -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64 - name: macOS (clang + asan + llvm-cov) - os: macos-15 + os: macos-15-large CC: clang CXX: clang++ ERROR_ON_WARNINGS: 1 @@ -103,7 +103,7 @@ jobs: os: macos-15-large ANDROID_API: 19 ANDROID_NDK: 23.2.8568313 - ANDROID_ARCH: x86 + ANDROID_ARCH: x86_64 - name: Android (latest API/NDK) os: macos-15-large ANDROID_API: 35 @@ -160,7 +160,7 @@ jobs: run: echo $(brew --prefix llvm@15)/bin >> $GITHUB_PATH - name: Expose llvm@18 PATH for Mac - if: ${{ runner.os == 'macOS' && matrix.os == 'macos-15' }} + if: ${{ runner.os == 'macOS' && matrix.os == 'macos-15-large' && matrix.RUN_ANALYZER == 'asan,llvm-cov' }} run: echo $(brew --prefix llvm@18)/bin >> $GITHUB_PATH - name: Installing LLVM-MINGW Dependencies From 72493586fcd1c0d40a23b2ca3f4e23de7c2dd8d8 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 15:46:19 +0100 Subject: [PATCH 22/32] android lower end only available on x86 + increase timeout to 20 minutes --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d494ed9a3..af00b09b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,7 +103,7 @@ jobs: os: macos-15-large ANDROID_API: 19 ANDROID_NDK: 23.2.8568313 - ANDROID_ARCH: x86_64 + ANDROID_ARCH: x86 - name: Android (latest API/NDK) os: macos-15-large ANDROID_API: 35 @@ -188,7 +188,7 @@ jobs: - name: Starting Android Simulator if: ${{ env['ANDROID_API'] }} run: bash scripts/start-android.sh - timeout-minutes: 10 + timeout-minutes: 20 - name: Test shell: bash From cf38bfa5014d991495c708e593ad3bd7c6beb8f7 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 15:46:48 +0100 Subject: [PATCH 23/32] install NDK package together with target image --- scripts/start-android.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index e080b4a36..543fa742b 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -11,8 +11,10 @@ echo "PATH: $PATH" ARCH=${ANDROID_ARCH:-"x86"} API_LEVEL=${ANDROID_API:-"29"} +NDK_VERSION=${ANDROID_NDK:-"27.2.12479018"} AVD_EMULATOR_NAME="sentry_android_${ARCH}" IMAGE=${ANDROID_IMAGE:-"system-images;android-${API_LEVEL};google_apis;${ARCH}"} +NDK_PACKAGE=${NDK_IMAGE:-"ndk;${NDK_VERSION}"} echo "List installed images..." $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list @@ -24,9 +26,10 @@ echo "API_LEVEL = $API_LEVEL" echo "AVD_EMULATOR_NAME = $AVD_EMULATOR_NAME" echo "IMAGE = $IMAGE" -echo "Install image..." +echo "Install image and NDK..." yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --licenses $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install "$IMAGE" +$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install "$NDK_PACKAGE" echo "Create AVD..." echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n $AVD_EMULATOR_NAME -k "$IMAGE" --force From 623164caca21f0ac876ee6c30743c01f9afdb35c Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 16:11:23 +0100 Subject: [PATCH 24/32] update lower end android to API level 21 (keep NDK23) --- .github/workflows/ci.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af00b09b8..96c6c3682 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,9 +101,9 @@ jobs: # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/android?view=azure-devops#test-on-the-android-emulator - name: Android (old API/NDK) os: macos-15-large - ANDROID_API: 19 + ANDROID_API: 21 ANDROID_NDK: 23.2.8568313 - ANDROID_ARCH: x86 + ANDROID_ARCH: x86_64 - name: Android (latest API/NDK) os: macos-15-large ANDROID_API: 35 @@ -176,15 +176,6 @@ jobs: shell: powershell run: . "scripts\install-zlib.ps1" - - name: Installing Android SDK Dependencies - if: ${{ env['ANDROID_API'] }} - run: | - export ANDROID_IMAGE="system-images;android-$ANDROID_API;google_apis;$ANDROID_ARCH" - echo "Downloading ndk;$ANDROID_NDK and $ANDROID_IMAGE" - echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install \ - "ndk;$ANDROID_NDK" "$ANDROID_IMAGE" | \ - grep -v "\[=" || true # suppress the progress bar, so we get meaningful logs - - name: Starting Android Simulator if: ${{ env['ANDROID_API'] }} run: bash scripts/start-android.sh From 2db625b126c3260d37c6de394fa1766c521695e8 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 16:24:26 +0100 Subject: [PATCH 25/32] switch lower end to API 35 but keep NDK at 23 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96c6c3682..45230dd17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,12 +99,12 @@ jobs: MINGW_ASM_MASM_COMPILER: llvm-ml;-m64 # The Android emulator is currently only available on macos, see: # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/android?view=azure-devops#test-on-the-android-emulator - - name: Android (old API/NDK) + - name: Android (latest API, NDK23) os: macos-15-large - ANDROID_API: 21 + ANDROID_API: 35 ANDROID_NDK: 23.2.8568313 ANDROID_ARCH: x86_64 - - name: Android (latest API/NDK) + - name: Android (latest API, NDK27) os: macos-15-large ANDROID_API: 35 ANDROID_NDK: 27.2.12479018 From 65f41d0395fc946d4aa338d13d581f5d299c9e8a Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 16:34:24 +0100 Subject: [PATCH 26/32] max API for NDK23 is 31 (but the emulator started) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45230dd17..aae8d699f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,7 +101,7 @@ jobs: # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/android?view=azure-devops#test-on-the-android-emulator - name: Android (latest API, NDK23) os: macos-15-large - ANDROID_API: 35 + ANDROID_API: 31 ANDROID_NDK: 23.2.8568313 ANDROID_ARCH: x86_64 - name: Android (latest API, NDK27) From 36b0bb861151b797d11281bb41b1bb9007ab519b Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 16:59:33 +0100 Subject: [PATCH 27/32] define adb and emulator ports --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aae8d699f..1df08fe18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,11 +101,15 @@ jobs: # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/android?view=azure-devops#test-on-the-android-emulator - name: Android (latest API, NDK23) os: macos-15-large + ADB_PORT: 5038 + EMULATOR_PORT: 5554 ANDROID_API: 31 ANDROID_NDK: 23.2.8568313 ANDROID_ARCH: x86_64 - name: Android (latest API, NDK27) os: macos-15-large + ADB_PORT: 5039 + EMULATOR_PORT: 5556 ANDROID_API: 35 ANDROID_NDK: 27.2.12479018 ANDROID_ARCH: x86_64 @@ -121,6 +125,8 @@ jobs: ANDROID_API: ${{ matrix.ANDROID_API }} ANDROID_NDK: ${{ matrix.ANDROID_NDK }} ANDROID_ARCH: ${{ matrix.ANDROID_ARCH }} + ADB_PORT: ${{ matrix.ADB_PORT }} + EMULATOR_PORT: ${{ matrix.EMULATOR_PORT }} CMAKE_DEFINES: ${{ matrix.CMAKE_DEFINES }} SYSTEM_VERSION_COMPAT: ${{ matrix.SYSTEM_VERSION_COMPAT }} From f427713461a6769a27a57ecb97b20e9dfa8ad90f Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 17:05:46 +0100 Subject: [PATCH 28/32] introduce emulator and adb port to start script --- scripts/start-android.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index 543fa742b..268a63799 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -15,6 +15,7 @@ NDK_VERSION=${ANDROID_NDK:-"27.2.12479018"} AVD_EMULATOR_NAME="sentry_android_${ARCH}" IMAGE=${ANDROID_IMAGE:-"system-images;android-${API_LEVEL};google_apis;${ARCH}"} NDK_PACKAGE=${NDK_IMAGE:-"ndk;${NDK_VERSION}"} +adb start-server echo "List installed images..." $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list @@ -25,6 +26,7 @@ echo "ARCH = $ARCH" echo "API_LEVEL = $API_LEVEL" echo "AVD_EMULATOR_NAME = $AVD_EMULATOR_NAME" echo "IMAGE = $IMAGE" +echo "ADB_SERVER_PORT =${ADB_SERVER_PORT}" echo "Install image and NDK..." yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --licenses @@ -46,11 +48,11 @@ nohup $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot > /de # For debugging emulator start issues: # echo "Starting emulator blocking..." -# $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot +# $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot -port "${EMULATOR_PORT}" echo "Wait for emulator availability..." -$ANDROID_HOME/platform-tools/adb wait-for-device shell 'ls' -echo "Verify emulator devices as running..." -$ANDROID_HOME/platform-tools/adb devices +$ANDROID_HOME/platform-tools/adb -s "emulator-${EMULATOR_PORT}" wait-for-device shell 'ls' +echo "Verify emulator devices are running..." +$ANDROID_HOME/platform-tools/adb -s "emulator-${EMULATOR_PORT}" devices echo "Emulator started." From 5d1cfed67dbbb3c5f45c1b0468d321582e838d1c Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 17:06:41 +0100 Subject: [PATCH 29/32] use ADB_SERVER_PORT as the env variable from the workflow --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1df08fe18..beaefd4c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,7 +125,7 @@ jobs: ANDROID_API: ${{ matrix.ANDROID_API }} ANDROID_NDK: ${{ matrix.ANDROID_NDK }} ANDROID_ARCH: ${{ matrix.ANDROID_ARCH }} - ADB_PORT: ${{ matrix.ADB_PORT }} + ADB_SERVER_PORT: ${{ matrix.ADB_PORT }} EMULATOR_PORT: ${{ matrix.EMULATOR_PORT }} CMAKE_DEFINES: ${{ matrix.CMAKE_DEFINES }} SYSTEM_VERSION_COMPAT: ${{ matrix.SYSTEM_VERSION_COMPAT }} From d79a7c38eae78d9d839f47e2222d0117dc7ecf26 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 17:24:08 +0100 Subject: [PATCH 30/32] start also the non-blocking emulator with the right port --- scripts/start-android.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index 268a63799..808558cc8 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -26,7 +26,9 @@ echo "ARCH = $ARCH" echo "API_LEVEL = $API_LEVEL" echo "AVD_EMULATOR_NAME = $AVD_EMULATOR_NAME" echo "IMAGE = $IMAGE" -echo "ADB_SERVER_PORT =${ADB_SERVER_PORT}" +echo "NDK_PACKAGE = $NDK_PACKAGE" +echo "ADB_SERVER_PORT = $ADB_SERVER_PORT" +echo "EMULATOR_PORT = $EMULATOR_PORT" echo "Install image and NDK..." yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --licenses @@ -44,15 +46,15 @@ $ANDROID_HOME/emulator/emulator -accel-check # Start emulator in background echo "Starting emulator..." -nohup $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot > /dev/null 2>&1 & +nohup $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot -port "$EMULATOR_PORT" > /dev/null 2>&1 & # For debugging emulator start issues: # echo "Starting emulator blocking..." -# $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot -port "${EMULATOR_PORT}" +# $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot -port "$EMULATOR_PORT" echo "Wait for emulator availability..." -$ANDROID_HOME/platform-tools/adb -s "emulator-${EMULATOR_PORT}" wait-for-device shell 'ls' +$ANDROID_HOME/platform-tools/adb -s "emulator-$EMULATOR_PORT" wait-for-device shell 'ls' echo "Verify emulator devices are running..." -$ANDROID_HOME/platform-tools/adb -s "emulator-${EMULATOR_PORT}" devices +$ANDROID_HOME/platform-tools/adb -s "emulator-$EMULATOR_PORT" devices echo "Emulator started." From ee9e155122b64f8544ffe76bd703de83ab2feaa2 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 17:43:04 +0100 Subject: [PATCH 31/32] get rid of lower emulator test --- .github/workflows/ci.yml | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index beaefd4c5..97859cef3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,12 +39,12 @@ jobs: fail-fast: false matrix: include: - - name: Linux (old gcc, 32-bit) + - name: Linux (GCC 7, 32-bit) os: ubuntu-20.04 CC: gcc-7 CXX: g++-7 TEST_X86: 1 - - name: Linux (new gcc) + - name: Linux (GCC 12) os: ubuntu-22.04 CC: gcc-12 CXX: g++-12 @@ -52,22 +52,22 @@ jobs: # The GCC analyzer 10.0.1 (as on CI) has an internal compiler error # currently, and is not stable enough to activate. # RUN_ANALYZER: gcc - - name: Linux (clang + asan + llvm-cov) + - name: Linux (clang 15 + asan + llvm-cov) os: ubuntu-22.04 CC: clang-15 CXX: clang++-15 ERROR_ON_WARNINGS: 1 RUN_ANALYZER: asan,llvm-cov - - name: Linux (clang + kcov) + - name: Linux (clang 15 + kcov) os: ubuntu-22.04 CC: clang-15 CXX: clang++-15 ERROR_ON_WARNINGS: 1 RUN_ANALYZER: kcov - - name: Linux (gcc + code-checker + valgrind) + - name: Linux (gcc 12 + code-checker + valgrind) os: ubuntu-22.04 RUN_ANALYZER: code-checker,valgrind - - name: macOS (xcode llvm) + - name: macOS 14 (xcode llvm) os: macos-14 ERROR_ON_WARNINGS: 1 SYSTEM_VERSION_COMPAT: 0 @@ -75,12 +75,12 @@ jobs: os: macos-13 ERROR_ON_WARNINGS: 1 SYSTEM_VERSION_COMPAT: 0 - - name: macOS (xcode llvm + universal) + - name: macOS 14 (xcode llvm + universal) os: macos-14 ERROR_ON_WARNINGS: 1 SYSTEM_VERSION_COMPAT: 0 CMAKE_DEFINES: -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64 - - name: macOS (clang + asan + llvm-cov) + - name: macOS 15 (clang 18 + asan + llvm-cov) os: macos-15-large CC: clang CXX: clang++ @@ -99,17 +99,14 @@ jobs: MINGW_ASM_MASM_COMPILER: llvm-ml;-m64 # The Android emulator is currently only available on macos, see: # https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/android?view=azure-devops#test-on-the-android-emulator - - name: Android (latest API, NDK23) + # TODO: switch to reactivecircus/android-emulator-runner, concurrently running emulators continuously fail now. + # - name: Android (API 31, NDK 23) + # os: macos-15-large + # ANDROID_API: 31 + # ANDROID_NDK: 23.2.8568313 + # ANDROID_ARCH: x86_64 + - name: Android (API 35, NDK 27) os: macos-15-large - ADB_PORT: 5038 - EMULATOR_PORT: 5554 - ANDROID_API: 31 - ANDROID_NDK: 23.2.8568313 - ANDROID_ARCH: x86_64 - - name: Android (latest API, NDK27) - os: macos-15-large - ADB_PORT: 5039 - EMULATOR_PORT: 5556 ANDROID_API: 35 ANDROID_NDK: 27.2.12479018 ANDROID_ARCH: x86_64 @@ -125,8 +122,6 @@ jobs: ANDROID_API: ${{ matrix.ANDROID_API }} ANDROID_NDK: ${{ matrix.ANDROID_NDK }} ANDROID_ARCH: ${{ matrix.ANDROID_ARCH }} - ADB_SERVER_PORT: ${{ matrix.ADB_PORT }} - EMULATOR_PORT: ${{ matrix.EMULATOR_PORT }} CMAKE_DEFINES: ${{ matrix.CMAKE_DEFINES }} SYSTEM_VERSION_COMPAT: ${{ matrix.SYSTEM_VERSION_COMPAT }} From d15db908b8a23dd601f16958b0828d4a1f50fd3b Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Tue, 5 Nov 2024 17:45:05 +0100 Subject: [PATCH 32/32] get rid of emulator and adb port in start-android.sh --- scripts/start-android.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/scripts/start-android.sh b/scripts/start-android.sh index 808558cc8..3f9d250b5 100755 --- a/scripts/start-android.sh +++ b/scripts/start-android.sh @@ -15,10 +15,6 @@ NDK_VERSION=${ANDROID_NDK:-"27.2.12479018"} AVD_EMULATOR_NAME="sentry_android_${ARCH}" IMAGE=${ANDROID_IMAGE:-"system-images;android-${API_LEVEL};google_apis;${ARCH}"} NDK_PACKAGE=${NDK_IMAGE:-"ndk;${NDK_VERSION}"} -adb start-server - -echo "List installed images..." -$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list # Create an Android Virtual Device echo "Create Test AVDs with..." @@ -27,8 +23,6 @@ echo "API_LEVEL = $API_LEVEL" echo "AVD_EMULATOR_NAME = $AVD_EMULATOR_NAME" echo "IMAGE = $IMAGE" echo "NDK_PACKAGE = $NDK_PACKAGE" -echo "ADB_SERVER_PORT = $ADB_SERVER_PORT" -echo "EMULATOR_PORT = $EMULATOR_PORT" echo "Install image and NDK..." yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --licenses @@ -46,15 +40,15 @@ $ANDROID_HOME/emulator/emulator -accel-check # Start emulator in background echo "Starting emulator..." -nohup $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot -port "$EMULATOR_PORT" > /dev/null 2>&1 & +nohup $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot > /dev/null 2>&1 & # For debugging emulator start issues: # echo "Starting emulator blocking..." -# $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot -port "$EMULATOR_PORT" +# $ANDROID_HOME/emulator/emulator -avd $AVD_EMULATOR_NAME -no-snapshot echo "Wait for emulator availability..." -$ANDROID_HOME/platform-tools/adb -s "emulator-$EMULATOR_PORT" wait-for-device shell 'ls' +$ANDROID_HOME/platform-tools/adb wait-for-device shell 'ls' echo "Verify emulator devices are running..." -$ANDROID_HOME/platform-tools/adb -s "emulator-$EMULATOR_PORT" devices +$ANDROID_HOME/platform-tools/adb devices echo "Emulator started."