From 7d379bca1297f89edf641655bea0836865e69597 Mon Sep 17 00:00:00 2001 From: Rami Potinkara Date: Tue, 31 Mar 2026 16:48:01 +0300 Subject: [PATCH] Coin: Add Android 17 as insignificant platform This patch adds Android 17 16KB Beta3 as insignificant platform to CI which will not abort on first test failure. At the moment there is only 16KB compliant system image available. Before the platform can become significant we need to wait first released version of Android 17. When the first released version will be added remove the Hack to alter source.properties mentioned in this patch. Task-number: QTBUG-143600 Pick-to: 6.8 Change-Id: Iaf2f122e6b56e496ddb8549f281cca6acd3970ac Reviewed-by: Elias Toivola Reviewed-by: Assam Boudjelthia (cherry picked from commit 5f5f9c4db40db7036a73d3875ad0abc89aff4eee) Reviewed-by: Qt Cherry-pick Bot --- .../cmake_platforms_target_android.yaml | 19 ++++++++++++++++++ .../common/linux/android_linux.sh | 20 +++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/coin/platform_configs/cmake_platforms_target_android.yaml b/coin/platform_configs/cmake_platforms_target_android.yaml index 78314c68..fa33d2b7 100644 --- a/coin/platform_configs/cmake_platforms_target_android.yaml +++ b/coin/platform_configs/cmake_platforms_target_android.yaml @@ -69,3 +69,22 @@ Configurations: 'ANDROID_NDK_ROOT={{.Env.ANDROID_NDK_ROOT_LATEST}}', 'ANDROID_EMULATOR=emulator_x86_64_api_36' ] +- + Id: 'android-17-x86_64-on-linux' + Template: 'qtci-linux-RHEL-9.6-x86_64-51' + Target os: 'Android_ANY' + Target arch: 'x86_64' + Compiler: 'GCC' + Target compiler: 'Clang' + Platform dependency: 'rhel-9.6' + Features: ['Sccache', 'WarningsAreErrors', 'AndroidTestRun', 'VMSize8', 'UseConfigure', 'GenerateSBOM', 'VerifySBOM', 'JavaDocs', 'InsignificantTests', 'DoNotAbortTestingOnFirstFailure'] + Environment variables: [ + 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT_LATEST}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis x86_64', + 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME_LATEST}} -DQT_GENERATE_WRAPPER_SCRIPTS_FOR_ALL_HOSTS=ON', + 'NON_QTBASE_TARGET_CMAKE_ARGS=-DFFMPEG_DIR={{.Env.FFMPEG_DIR_ANDROID_X86_64_NDK_LATEST}} -DQT_DEPLOY_FFMPEG=TRUE -DQT_PROTOBUF_WELL_KNOWN_TYPES_PROTO_DIR=/usr/local/include', + # We check QT_USE_TARGET_ANDROID_BUILD_DIR and QT_USE_ANDROID_MODERN_BUNDLE only in one + # configuration, to ensure builds without this option work too. + 'COMMON_TARGET_TEST_CMAKE_ARGS=-DQT_USE_TARGET_ANDROID_BUILD_DIR=ON -DQT_USE_ANDROID_MODERN_BUNDLE=ON', + 'ANDROID_NDK_ROOT={{.Env.ANDROID_NDK_ROOT_LATEST}}', + 'ANDROID_EMULATOR=emulator_x86_64_api_37' + ] diff --git a/coin/provisioning/common/linux/android_linux.sh b/coin/provisioning/common/linux/android_linux.sh index 9fd3d283..e43c3e37 100755 --- a/coin/provisioning/common/linux/android_linux.sh +++ b/coin/provisioning/common/linux/android_linux.sh @@ -199,6 +199,23 @@ echo "Unzipping the Android 16 to $maxVersionDestination" sudo unzip -o -q "$maxVersionFilePath" -d "$maxVersionDestination" rm "$maxVersionFilePath" +echo "Download and unzip Android 17 Beta 3 16KB System Image" +insignificantMaxVersionFileName="x86_64-ps16k-37.0_r03.zip" +insignificantMaxVersionDestination="$sdkTargetFolder/system-images/android-37/google_apis_ps16k/" +insignificantMaxVersionFilePath="$insignificantMaxVersionDestination/$insignificantMaxVersionFileName" +insignificantMaxVersionCiUrl="$basePath/system_images/google_apis/$insignificantMaxVersionFileName" +insignificantMaxVersionUrl="https://dl.google.com/android/repository/sys-img/google_apis/$insignificantMaxVersionFileName" +insignificantMaxVersionSha1="b89a6686f9a9e9942d596bed45d422cbccb70c98" + +mkdir -p "$insignificantMaxVersionDestination" +DownloadURL "$insignificantMaxVersionCiUrl" "$insignificantMaxVersionUrl" "$insignificantMaxVersionSha1" "$insignificantMaxVersionFilePath" + +echo "Unzipping the Android 17 Beta3 16KB to $insignificantMaxVersionDestination" +sudo unzip -o -q "$insignificantMaxVersionFilePath" -d "$insignificantMaxVersionDestination" +# Hack to avoid SDK version bug in source.properties file, the usage of ".0" messes things for avdmanager. TODO: undo when official comes +sudo sed -i 's/AndroidVersion.ApiLevel=37.0/AndroidVersion.ApiLevel=37/g' "$insignificantMaxVersionDestination/x86_64/source.properties" +rm "$insignificantMaxVersionFilePath" + echo "Checking the contents of Android SDK again..." ls -l "$sdkTargetFolder" @@ -208,6 +225,9 @@ echo "no" | ./avdmanager create avd -n emulator_x86_api_28 -c 2048M -f \ echo "no" | ./avdmanager create avd -n emulator_x86_64_api_36 -c 2048M -f \ -k "system-images;android-36;google_apis;x86_64" +echo "no" | ./avdmanager create avd -n emulator_x86_64_api_37 -c 2048M -f \ + -k "system-images;android-37;google_apis,page_size_16kb,ai_glasses_compatible;x86_64" + echo "Install maximum supported SDK level image for Android Automotive $sdkApiLevelAutomotiveMax" DownloadURL "$androidAutomotiveMaxUrl" "$androidAutomotiveMaxUrl" "$androidAutomotiveMaxSha" \ "/tmp/${sdkApiLevelAutomotiveMax}_automotive.tar.gz"