aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeikki Halmet <heikki.halmet@qt.io>2022-05-16 09:20:16 +0300
committerHeikki Halmet <heikki.halmet@qt.io>2022-09-20 10:30:05 +0300
commit8a72b1de996012d8ccfa59578579f08f1061c6fe (patch)
tree2083ce151121dd746e5d00de53f15624489c6bd3
parent911505cd37ef0bb3dd32184a4c2fc8de9284875d (diff)
Support multiple Android NDK versions
We need to verify latest Android NDK version in all Qt6 branches and we need to retain the NDK version we had when the specific branch was released at the first time. Verification of the latest NDK will be done during integrations in 'dev' branch and with older brances it will be done using nightly build targets Task-number: QTQAINFRA-4990 Change-Id: I2a96e419d403820f55f4244230c28ad09dc9095b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
-rw-r--r--coin/platform_configs/cmake_platforms_target_android_host_linux.yaml28
-rw-r--r--coin/platform_configs/cmake_platforms_target_android_host_macos.yaml28
-rw-r--r--coin/platform_configs/cmake_platforms_target_android_host_windows.yaml28
-rw-r--r--coin/platform_configs/linux_android_tests_developer.yaml4
-rw-r--r--coin/platform_configs/tqtc-android-automotive.yaml4
-rwxr-xr-xcoin/provisioning/common/linux/android_linux.sh42
-rwxr-xr-xcoin/provisioning/common/macos/android.sh112
-rwxr-xr-xcoin/provisioning/common/unix/openssl_for_android.sh43
-rw-r--r--coin/provisioning/common/windows/android-openssl.ps1110
-rw-r--r--coin/provisioning/common/windows/android.ps134
-rwxr-xr-xcoin/provisioning/qtci-macos-10.14-x86_64/30-android.sh97
-rwxr-xr-xcoin/provisioning/qtci-macos-12-x86_64/30-android.sh98
12 files changed, 324 insertions, 304 deletions
diff --git a/coin/platform_configs/cmake_platforms_target_android_host_linux.yaml b/coin/platform_configs/cmake_platforms_target_android_host_linux.yaml
index dea0b437..ee9536e3 100644
--- a/coin/platform_configs/cmake_platforms_target_android_host_linux.yaml
+++ b/coin/platform_configs/cmake_platforms_target_android_host_linux.yaml
@@ -9,10 +9,11 @@ Configurations:
Platform dependency: 'RHEL-8.4-host'
Features: ['Packaging', 'Sccache', 'DisableTests', 'UseConfigure']
Environment variables: [
- 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis arm64-v8a',
- 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME}}',
+ 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT_DEFAULT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis arm64-v8a',
+ 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME_DEFAULT}}',
'CONAN_HOST_PROFILE=coin/conan/profiles/ci-linux-x86_64-gcc',
- 'CONAN_PROFILE=coin/conan/profiles/ci-unix-android-arm64-clang'
+ 'CONAN_PROFILE=coin/conan/profiles/ci-unix-android-arm64-clang',
+ 'ANDROID_NDK_ROOT={{.Env.ANDROID_NDK_ROOT_DEFAULT}}'
]
-
Template: 'qtci-linux-RHEL-8.4-x86_64-50'
@@ -23,10 +24,11 @@ Configurations:
Platform dependency: 'RHEL-8.4-host'
Features: ['Packaging', 'Sccache', 'DisableTests', 'UseConfigure']
Environment variables: [
- 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis armeabi-v7a',
- 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME}}',
+ 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT_DEFAULT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis armeabi-v7a',
+ 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME_DEFAULT}}',
'CONAN_HOST_PROFILE=coin/conan/profiles/linux-x86_64-gcc',
- 'CONAN_PROFILE=coin/conan/profiles/unix-android-armv7-clang'
+ 'CONAN_PROFILE=coin/conan/profiles/unix-android-armv7-clang',
+ 'ANDROID_NDK_ROOT={{.Env.ANDROID_NDK_ROOT_DEFAULT}}'
]
-
Template: 'qtci-linux-RHEL-8.4-x86_64-50'
@@ -37,11 +39,12 @@ Configurations:
Platform dependency: 'RHEL-8.4-host'
Features: ['Packaging', 'Sccache', 'AndroidTestRun', 'VMSize8', 'UseConfigure']
Environment variables: [
- 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis x86',
- 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME}}',
+ 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT_DEFAULT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis x86',
+ 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME_DEFAULT}}',
'CONAN_HOST_PROFILE=coin/conan/profiles/ci-linux-x86_64-gcc',
'CONAN_PROFILE=coin/conan/profiles/ci-unix-android-x86-clang',
- 'ANDROID_EMULATOR=@emulator_x86_api_23'
+ 'ANDROID_EMULATOR=@emulator_x86_api_23',
+ 'ANDROID_NDK_ROOT={{.Env.ANDROID_NDK_ROOT_DEFAULT}}'
]
-
Template: 'qtci-linux-RHEL-8.4-x86_64-50'
@@ -52,8 +55,9 @@ Configurations:
Platform dependency: 'RHEL-8.4-host'
Features: ['Packaging', 'Sccache', 'DisableTests', 'UseConfigure']
Environment variables: [
- 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT}} -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}}',
+ 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT_DEFAULT}} -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_DEFAULT}}',
'CONAN_HOST_PROFILE=coin/conan/profiles/ci-linux-x86_64-gcc',
- 'CONAN_PROFILE=coin/conan/profiles/ci-unix-android-x86_64-clang'
+ 'CONAN_PROFILE=coin/conan/profiles/ci-unix-android-x86_64-clang',
+ 'ANDROID_NDK_ROOT={{.Env.ANDROID_NDK_ROOT_DEFAULT}}'
]
diff --git a/coin/platform_configs/cmake_platforms_target_android_host_macos.yaml b/coin/platform_configs/cmake_platforms_target_android_host_macos.yaml
index 66f296dc..3bd26e19 100644
--- a/coin/platform_configs/cmake_platforms_target_android_host_macos.yaml
+++ b/coin/platform_configs/cmake_platforms_target_android_host_macos.yaml
@@ -10,10 +10,11 @@ Configurations:
Platform dependency: 'macos-latest-xcode-universal-packaging-build'
Features: ['Packaging', 'Sccache', 'DisableTests', 'UseConfigure']
Environment variables: [
- 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis arm64-v8a',
- 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME}}',
+ 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT_DEFAULT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis arm64-v8a',
+ 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME_DEFAULT}}',
'CONAN_HOST_PROFILE=coin/conan/profiles/ci-macos-universal-clang',
- 'CONAN_PROFILE=coin/conan/profiles/ci-unix-android-arm64-clang'
+ 'CONAN_PROFILE=coin/conan/profiles/ci-unix-android-arm64-clang',
+ 'ANDROID_NDK_ROOT={{.Env.ANDROID_NDK_ROOT_DEFAULT}}'
]
-
Template: 'qtci-macos-12-x86_64-102'
@@ -24,10 +25,11 @@ Configurations:
Platform dependency: 'macos-latest-xcode-universal-packaging-build'
Features: ['Packaging', 'Sccache', 'DisableTests', 'UseConfigure']
Environment variables: [
- 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis armeabi-v7a',
- 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME}}',
+ 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT_DEFAULT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis armeabi-v7a',
+ 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME_DEFAULT}}',
'CONAN_HOST_PROFILE=coin/conan/profiles/ci-macos-universal-clang',
- 'CONAN_PROFILE=coin/conan/profiles/ci-unix-android-armv7-clang'
+ 'CONAN_PROFILE=coin/conan/profiles/ci-unix-android-armv7-clang',
+ 'ANDROID_NDK_ROOT={{.Env.ANDROID_NDK_ROOT_DEFAULT}}'
]
-
Template: 'qtci-macos-12-x86_64-102'
@@ -38,10 +40,11 @@ Configurations:
Platform dependency: 'macos-latest-xcode-universal-packaging-build'
Features: ['Packaging', 'Sccache', 'DisableTests', 'UseConfigure']
Environment variables: [
- 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis x86',
- 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME}}',
+ 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT_DEFAULT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis x86',
+ 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME_DEFAULT}}',
'CONAN_HOST_PROFILE=coin/conan/profiles/ci-macos-universal-clang',
- 'CONAN_PROFILE=coin/conan/profiles/ci-unix-android-x86-clang'
+ 'CONAN_PROFILE=coin/conan/profiles/ci-unix-android-x86-clang',
+ 'ANDROID_NDK_ROOT={{.Env.ANDROID_NDK_ROOT_DEFAULT}}'
]
-
Template: 'qtci-macos-12-x86_64-102'
@@ -52,8 +55,9 @@ Configurations:
Platform dependency: 'macos-latest-xcode-universal-packaging-build'
Features: ['Packaging', 'Sccache', 'DisableTests', 'UseConfigure']
Environment variables: [
- 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT}} -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}}',
+ 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT_DEFAULT}} -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_DEFAULT}}',
'CONAN_HOST_PROFILE=coin/conan/profiles/ci-macos-universal-clang',
- 'CONAN_PROFILE=coin/conan/profiles/ci-unix-android-x86_64-clang'
+ 'CONAN_PROFILE=coin/conan/profiles/ci-unix-android-x86_64-clang',
+ 'ANDROID_NDK_ROOT={{.Env.ANDROID_NDK_ROOT_DEFAULT}}'
]
diff --git a/coin/platform_configs/cmake_platforms_target_android_host_windows.yaml b/coin/platform_configs/cmake_platforms_target_android_host_windows.yaml
index 4ea085f3..c3db4ac7 100644
--- a/coin/platform_configs/cmake_platforms_target_android_host_windows.yaml
+++ b/coin/platform_configs/cmake_platforms_target_android_host_windows.yaml
@@ -10,10 +10,11 @@ Configurations:
Features: ['Packaging', 'Sccache', 'DisableTests', 'UseConfigure']
Environment variables: [
'Path={{.Env.MINGW1120}}\bin;{{.Env.Path}}',
- 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis arm64-v8a -no-feature-pkg-config',
- 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME}}',
+ 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT_DEFAULT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis arm64-v8a -no-feature-pkg-config',
+ 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME_DEFAULT}}',
'CONAN_HOST_PROFILE=coin/conan/profiles/ci-windows-x86_64-mingw',
- 'CONAN_PROFILE=coin/conan/profiles/ci-windows-android-arm64-clang'
+ 'CONAN_PROFILE=coin/conan/profiles/ci-windows-android-arm64-clang',
+ 'ANDROID_NDK_ROOT={{.Env.ANDROID_NDK_ROOT_DEFAULT}}'
]
-
Template: 'qtci-windows-10_21H2-x86_64-51'
@@ -25,10 +26,11 @@ Configurations:
Features: ['Packaging', 'Sccache', 'DisableTests', 'UseConfigure']
Environment variables: [
'Path={{.Env.MINGW1120}}\bin;{{.Env.Path}}',
- 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis armeabi-v7a -no-feature-pkg-config',
- 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME}}',
+ 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT_DEFAULT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis armeabi-v7a -no-feature-pkg-config',
+ 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME_DEFAULT}}',
'CONAN_HOST_PROFILE=coin/conan/profiles/ci-windows-x86_64-mingw',
- 'CONAN_PROFILE=coin/conan/profiles/ci-windows-android-armv7-clang'
+ 'CONAN_PROFILE=coin/conan/profiles/ci-windows-android-armv7-clang',
+ 'ANDROID_NDK_ROOT={{.Env.ANDROID_NDK_ROOT_DEFAULT}}'
]
-
Template: 'qtci-windows-10_21H2-x86_64-51'
@@ -40,10 +42,11 @@ Configurations:
Features: ['Packaging', 'Sccache', 'DisableTests', 'UseConfigure']
Environment variables: [
'Path={{.Env.MINGW1120}}\bin;{{.Env.Path}}',
- 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis x86 -no-feature-pkg-config',
- 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME}}',
+ 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT_DEFAULT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis x86 -no-feature-pkg-config',
+ 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME_DEFAULT}}',
'CONAN_HOST_PROFILE=coin/conan/profiles/ci-windows-x86_64-mingw',
- 'CONAN_PROFILE=coin/conan/profiles/ci-windows-android-x86-clang'
+ 'CONAN_PROFILE=coin/conan/profiles/ci-windows-android-x86-clang',
+ 'ANDROID_NDK_ROOT={{.Env.ANDROID_NDK_ROOT_DEFAULT}}'
]
-
Template: 'qtci-windows-10_21H2-x86_64-51'
@@ -55,8 +58,9 @@ Configurations:
Features: ['Packaging', 'Sccache', 'DisableTests', 'UseConfigure']
Environment variables: [
'Path={{.Env.MINGW1120}}\bin;{{.Env.Path}}',
- 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis x86_64 -no-feature-pkg-config',
- 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME}}',
+ 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT_DEFAULT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis x86_64 -no-feature-pkg-config',
+ 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME_DEFAULT}}',
'CONAN_HOST_PROFILE=coin/conan/profiles/ci-windows-x86_64-mingw',
- 'CONAN_PROFILE=coin/conan/profiles/ci-windows-android-x86_64-clang'
+ 'CONAN_PROFILE=coin/conan/profiles/ci-windows-android-x86_64-clang',
+ 'ANDROID_NDK_ROOT={{.Env.ANDROID_NDK_ROOT_DEFAULT}}'
]
diff --git a/coin/platform_configs/linux_android_tests_developer.yaml b/coin/platform_configs/linux_android_tests_developer.yaml
index 4bc125ba..d3ccba2b 100644
--- a/coin/platform_configs/linux_android_tests_developer.yaml
+++ b/coin/platform_configs/linux_android_tests_developer.yaml
@@ -9,8 +9,8 @@ Configurations:
Platform dependency: 'RHEL-8.4-host'
Features: ['Packaging', 'Sccache', 'AndroidTestRun', 'UseConfigure']
Environment variables: [
- 'TARGET_CONFIGURE_ARGS=-nomake examples -debug -developer-build -android-ndk {{.Env.ANDROID_NDK_ROOT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis x86',
- 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME}}',
+ 'TARGET_CONFIGURE_ARGS=-nomake examples -debug -developer-build -android-ndk {{.Env.ANDROID_NDK_ROOT_DEFAULT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis x86',
+ 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME_DEFAULT}}',
'CONAN_HOST_PROFILE=coin/conan/profiles/linux-x86_64-gcc',
'CONAN_INSTALL_DIR={{.InstallDir}}/target',
'CONAN_PROFILE=coin/conan/profiles/unix-android-x86-clang',
diff --git a/coin/platform_configs/tqtc-android-automotive.yaml b/coin/platform_configs/tqtc-android-automotive.yaml
index 6b2c0ac3..ff837fb6 100644
--- a/coin/platform_configs/tqtc-android-automotive.yaml
+++ b/coin/platform_configs/tqtc-android-automotive.yaml
@@ -54,8 +54,8 @@ Configurations:
Platform dependency: 'RHEL-8.4-host'
Features: ['Packaging', 'Sccache', 'AndroidTestRun', 'VMSize8', 'UseConfigure']
Environment variables: [
- 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis x86',
- 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME}}',
+ 'TARGET_CONFIGURE_ARGS=-nomake examples -release -force-debug-info -android-ndk {{.Env.ANDROID_NDK_ROOT_DEFAULT}} -android-sdk {{.Env.ANDROID_SDK_ROOT}} -android-abis x86',
+ 'TARGET_CMAKE_ARGS=-DCMAKE_C_COMPILER_FRONTEND_VARIANT=GNU -DCMAKE_CXX_COMPILER_FRONTEND_VARIANT=GNU -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_ANDROID_HOME_DEFAULT}}',
'CONAN_HOST_PROFILE=coin/conan/profiles/linux-x86_64-gcc',
'CONAN_PROFILE=coin/conan/profiles/unix-android-x86-clang',
'ANDROID_EMULATOR=@automotive_emulator_x86_api_30'
diff --git a/coin/provisioning/common/linux/android_linux.sh b/coin/provisioning/common/linux/android_linux.sh
index e55a63ab..60e81e9f 100755
--- a/coin/provisioning/common/linux/android_linux.sh
+++ b/coin/provisioning/common/linux/android_linux.sh
@@ -55,18 +55,20 @@ source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
targetFolder="/opt/android"
sdkTargetFolder="$targetFolder/sdk"
+sudo mkdir -p $sdkTargetFolder
+
basePath="http://ci-files01-hki.intra.qt.io/input/android"
toolsVersion="2.1"
toolsFile="commandlinetools-linux-6609375_latest.zip"
-ndkVersion="r23b"
-ndkFile="android-ndk-$ndkVersion-linux.zip"
+ndkVersionLatest="r23b"
+ndkVersionDefault=$ndkVersionLatest
sdkBuildToolsVersion="31.0.0"
sdkApiLevel="android-31"
toolsSha1="9172381ff070ee2a416723c1989770cf4b0d1076"
-ndkSha1="f47ec4c4badd11e9f593a8450180884a927c330d"
-
+ndkSha1Latest="f47ec4c4badd11e9f593a8450180884a927c330d"
+ndkSha1Default=$ndkSha1Latest
# Android automotive
sdkApiLevelAutomovie="android-30"
androidAutomotive11Url="$basePath/${sdkApiLevelAutomovie}_automotive.tar.gz"
@@ -75,18 +77,37 @@ android11Sha="4a5cd2bea7ce323b724c3ff1faab13d99f9d2be9"
toolsTargetFile="/tmp/$toolsFile"
toolsSourceFile="$basePath/$toolsFile"
-ndkTargetFile="/tmp/$ndkFile"
-ndkSourceFile="$basePath/$ndkFile"
+echo "Download and unzip Android SDK"
DownloadURL "$toolsSourceFile" "$toolsSourceFile" "$toolsSha1" "$toolsTargetFile"
-DownloadURL "$ndkSourceFile" "$ndkSourceFile" "$ndkSha1" "$ndkTargetFile"
-echo "Unzipping Android NDK to '$targetFolder'"
-sudo unzip -q "$ndkTargetFile" -d "$targetFolder"
echo "Unzipping Android Tools to '$sdkTargetFolder'"
sudo unzip -q "$toolsTargetFile" -d "$sdkTargetFolder"
-rm "$ndkTargetFile"
rm "$toolsTargetFile"
+function InstallNdk() {
+
+ ndkVersion=$1
+ ndkSha1=$2
+
+ if [[ ! -d $targetFolder/android-ndk-$ndkVersion ]]; then
+
+ ndkFile="android-ndk-$ndkVersion-linux.zip"
+ ndkTargetFile="/tmp/$ndkFile"
+ ndkSourceFile="$basePath/$ndkFile"
+
+ DownloadURL "$ndkSourceFile" "$ndkSourceFile" "$ndkSha1" "$ndkTargetFile"
+ echo "Unzipping Android NDK to '$targetFolder'"
+ sudo unzip -q "$ndkTargetFile" -d "$targetFolder"
+ rm "$ndkTargetFile"
+ fi
+
+}
+
+InstallNdk $ndkVersionDefault $ndkSha1Default
+SetEnvVar "ANDROID_NDK_ROOT_DEFAULT" "$targetFolder/android-ndk-$ndkVersionDefault"
+InstallNdk $ndkVersionLatest $ndkSha1Latest
+SetEnvVar "ANDROID_NDK_ROOT_LATEST" "$targetFolder/android-ndk-$ndkVersionLatest"
+
echo "Changing ownership of Android files."
if uname -a |grep -q "el7"; then
sudo chown -R qt:wheel "$targetFolder"
@@ -122,7 +143,6 @@ echo "Checking the contents of Android SDK..."
ls -l "$sdkTargetFolder"
SetEnvVar "ANDROID_SDK_ROOT" "$sdkTargetFolder"
-SetEnvVar "ANDROID_NDK_ROOT" "$targetFolder/android-ndk-$ndkVersion"
SetEnvVar "ANDROID_NDK_HOST" "linux-x86_64"
SetEnvVar "ANDROID_API_VERSION" "$sdkApiLevel"
diff --git a/coin/provisioning/common/macos/android.sh b/coin/provisioning/common/macos/android.sh
new file mode 100755
index 00000000..1efb8ee0
--- /dev/null
+++ b/coin/provisioning/common/macos/android.sh
@@ -0,0 +1,112 @@
+#!/usr/bin/env bash
+
+#############################################################################
+##
+## Copyright (C) 2022 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the provisioning scripts of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 3 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL3 included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 3 requirements
+## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 2.0 or (at your option) the GNU General
+## Public license version 3 or any later version approved by the KDE Free
+## Qt Foundation. The licenses are as published by the Free Software
+## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-2.0.html and
+## https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# This script install Android sdk and ndk.
+
+# It also runs update for SDK API, latest SDK tools, latest platform-tools and build-tools version
+
+set -ex
+
+# shellcheck source=../common/unix/SetEnvVar.sh
+source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
+
+targetFolder="/opt/android"
+sdkTargetFolder="$targetFolder/sdk"
+
+basePath="/net/ci-files01-hki.intra.qt.io/hdd/www/input/android"
+
+toolsVersion="2.1"
+# toolsFile dertermines tools version
+toolsFile="commandlinetools-mac-6609375_latest.zip"
+
+ndkVersionLatest="r23b"
+ndkVersionDefault="$ndkVersionLatest"
+sdkBuildToolsVersion="31.0.0"
+# this is compile sdk version
+sdkApiLevel="android-31"
+
+toolsSourceFile="$basePath/$toolsFile"
+
+function InstallNdk() {
+
+ ndkVersion=$1
+
+ if [[ ! -d "${targetFolder}/android-ndk-${ndkVersion}" ]]; then
+ echo "Unzipping Android NDK $ndkVersion to '${targetFolder}'"
+ ndkSourceFile="$basePath/android-ndk-$ndkVersion-darwin*.zip"
+ sudo unzip -q "$ndkSourceFile" -d "$targetFolder"
+ fi
+
+}
+
+InstallNdk $ndkVersionDefault
+InstallNdk $ndkVersionLatest
+
+echo "Unzipping Android Tools to '$sdkTargetFolder'"
+sudo unzip -q "$toolsSourceFile" -d "$sdkTargetFolder"
+
+echo "Changing ownership of Android files."
+sudo chown -R qt:wheel "$targetFolder"
+
+# Run the following command under `eval` or `sh -c` so that the shell properly splits it
+sdkmanager_no_progress_bar_cmd="tr '\r' '\n' | grep -v '^\[[ =]*\]'"
+
+sudo mkdir "$sdkTargetFolder/cmdline-tools"
+sudo mv "$sdkTargetFolder/tools" "$sdkTargetFolder/cmdline-tools"
+
+echo "Running SDK manager for platforms;$sdkApiLevel, platform-tools and build-tools;$sdkBuildToolsVersion."
+(echo "y"; echo "y") | "$sdkTargetFolder/cmdline-tools/tools/bin/sdkmanager" "--sdk_root=$sdkTargetFolder" \
+ "platforms;$sdkApiLevel" "platform-tools" "build-tools;$sdkBuildToolsVersion" \
+ | eval $sdkmanager_no_progress_bar_cmd
+
+echo "Checking the contents of Android SDK..."
+ls -l "$sdkTargetFolder"
+
+SetEnvVar "ANDROID_SDK_ROOT" "$sdkTargetFolder"
+SetEnvVar "ANDROID_NDK_ROOT_DEFAULT" "$targetFolder/android-ndk-$ndkVersionDefault"
+SetEnvVar "ANDROID_NDK_ROOT_LATEST" "$targetFolder/android-ndk-$ndkVersionLatest"
+SetEnvVar "ANDROID_NDK_HOST" "darwin-x86_64"
+SetEnvVar "ANDROID_API_VERSION" "$sdkApiLevel"
+
+echo "Android SDK tools = $toolsVersion" >> ~/versions.txt
+echo "Android SDK Build Tools = $sdkBuildToolsVersion" >> ~/versions.txt
+echo "Android SDK API level = $sdkApiLevel" >> ~/versions.txt
+echo "Android NDK = $ndkVersionDefault" >> ~/versions.txt
diff --git a/coin/provisioning/common/unix/openssl_for_android.sh b/coin/provisioning/common/unix/openssl_for_android.sh
index 448279e2..35a9ad6c 100755
--- a/coin/provisioning/common/unix/openssl_for_android.sh
+++ b/coin/provisioning/common/unix/openssl_for_android.sh
@@ -49,6 +49,13 @@ source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
version="1.1.1m"
+ndkVersionLatest="r23b"
+ndkVersionDefault=$ndkVersionLatest
+prebuiltOpensslNdkShaDarwinLatest="2624b0c2772e360bbbae7a7f2dc342e4b97f1a2e"
+prebuiltOpensslNdkShaLinuxLatest="f58dcb32b2d3e5edc7e5141ae139a50547805f60"
+prebuiltOpensslNdkShaDarwinDefault=$prebuiltOpensslNdkShaDarwinLatest
+prebuiltOpensslNdkShaLinuxDefault=$prebuiltOpensslNdkShaLinuxLatest
+
: ' SOURCE BUILD INSTRUCTIONS - Openssl prebuilt was made using Android NDK 21
# Source built requires GCC and Perl to be in PATH.
exports_file="/tmp/export.sh"
@@ -81,18 +88,34 @@ PATH=$TOOLCHAIN:$PATH CC=clang ./Configure android-arm
PATH=$TOOLCHAIN:$PATH CC=clang make build_generated
'
+function InstallPrebuiltOpenssl() {
+
+ ndkVersion=$1
+ nkdSha=$2
+ os=$3
+
+ if [[ ! -d $HOME/openssl/android/openssl ]]; then
+ prebuiltUrl="http://ci-files01-hki.intra.qt.io/input/openssl/prebuilt-openssl-${version}-for-android-ndk-${ndkVersion}-${os}.tar.gz"
+ targetFile="/tmp/prebuilt-openssl-${version}-for-android-ndk-${ndkVersion}-${os}.tar.gz"
+
+ DownloadURL "$prebuiltUrl" "$prebuiltUrl" "$nkdSha" "$targetFile"
+ tar -xzf "$targetFile" -C "${HOME}"
+ mv "${HOME}/openssl" "${HOME}/openssl_android_ndk_${ndkVersion}"
+ opensslHome="${HOME}/openssl_android_ndk_${ndkVersion}/android/openssl-${version}"
+ sudo rm -f $targetFile
+ fi
+}
+
if uname -a |grep -q "Darwin"; then
- prebuiltUrl="http://ci-files01-hki.intra.qt.io/input/openssl/prebuilt-openssl-1.1.1m-for-android-ndk-r23b-darwin.tar.gz"
- sha="2624b0c2772e360bbbae7a7f2dc342e4b97f1a2e"
+ InstallPrebuiltOpenssl $ndkVersionDefault $prebuiltOpensslNdkShaDarwinDefault "darwin"
+ SetEnvVar "OPENSSL_ANDROID_HOME_DEFAULT" "$opensslHome"
+ InstallPrebuiltOpenssl $ndkVersionLatest $prebuiltOpensslNdkShaDarwinLatest "darwin"
+ SetEnvVar "OPENSSL_ANDROID_HOME_LATEST" "$opensslHome"
else
- prebuiltUrl="http://ci-files01-hki.intra.qt.io/input/openssl/prebuilt-openssl-1.1.1m-for-android-ndk-r23b-linux.tar.gz"
- sha="f58dcb32b2d3e5edc7e5141ae139a50547805f60"
+ InstallPrebuiltOpenssl $ndkVersionDefault $prebuiltOpensslNdkShaLinuxDefault "linux"
+ SetEnvVar "OPENSSL_ANDROID_HOME_DEFAULT" "$opensslHome"
+ InstallPrebuiltOpenssl $ndkVersionLatest $prebuiltOpensslNdkShaLinuxLatest "linux"
+ SetEnvVar "OPENSSL_ANDROID_HOME_LATEST" "$opensslHome"
fi
-targetFile="/tmp/prebuilt-openssl-$version.tar.gz"
-DownloadURL "$prebuiltUrl" "$prebuiltUrl" "$sha" "$targetFile"
-tar -xzf "$targetFile" -C "${HOME}"
-
-opensslHome="${HOME}/openssl/android/openssl-${version}"
-SetEnvVar "OPENSSL_ANDROID_HOME" "$opensslHome"
echo "OpenSSL for Android = $version" >> ~/versions.txt
diff --git a/coin/provisioning/common/windows/android-openssl.ps1 b/coin/provisioning/common/windows/android-openssl.ps1
index f03cf297..d260ef52 100644
--- a/coin/provisioning/common/windows/android-openssl.ps1
+++ b/coin/provisioning/common/windows/android-openssl.ps1
@@ -51,59 +51,83 @@ if (Is64BitWinHost) {
# Msys need to be installed to target machine
# More info and building instructions can be found from http://doc.qt.io/qt-5/opensslsupport.html
-$version = "1.1.1m"
-$ndk_version = "r23b"
-$zip = Get-DownloadLocation ("openssl-${version}_fixes-ndk_root.tar.gz")
-$prebuilt_zip = Get-DownloadLocation ("prebuilt-openssl-${version}-for-android-used-ndk-${ndk_version}-windows.zip")
-$sha1 = "c9638d25b9709eda1ac52591c0993af52d6d1206"
-$prebuilt_sha1 = "0aebe55d2436f235e1a24ae9d1030cb6ce8f31da"
+$openssl_version = "1.1.1m"
+$ndk_version_latest = "r23b"
+$ndk_version_default = "$ndk_version_latest"
+$openssl_compressed = Get-DownloadLocation ("openssl-${openssl_version}_fixes-ndk_root.tar.gz")
+$openssl_sha1 = "c9638d25b9709eda1ac52591c0993af52d6d1206"
+$prebuilt_sha1_ndk_latest = "0aebe55d2436f235e1a24ae9d1030cb6ce8f31da"
+$prebuilt_sha1_ndk_default = "$prebuilt_sha1_ndk_latest"
$destination = "C:\Utils\openssl-android-master"
-$prebuilt_url = "\\ci-files01-hki.intra.qt.io\provisioning\openssl\prebuilt-openssl-${version}-for-android-used-ndk-${ndk_version}-windows.zip"
-
-# msys unix style paths
-$ndkPath = "/c/Utils/Android/android-ndk-${ndk_version}"
-$openssl_path = "/c/Utils/openssl-android-master"
-$cc_path = "$ndkPath/toolchains/llvm/prebuilt/windows-x86_64/bin"
-if ((Test-Path $prebuilt_url)) {
- Download $prebuilt_url $prebuilt_url $prebuilt_zip
- Verify-Checksum $prebuilt_zip $prebuilt_sha1
- Extract-7Zip $prebuilt_zip C:\Utils
- Remove $prebuilt_zip
-} else {
- # openssl-${version}_fixes-ndk_root.tar.gz package includes fixes from https://github.com/openssl/openssl/pull/17322 and string ANDROID_NDK_HOME is replaced with ANDROID_NDK_ROOT in Configurations/15-android.conf
- Download \\ci-files01-hki.intra.qt.io\provisioning\openssl\openssl-${version}_fixes-ndk_root.tar.gz \\ci-files01-hki.intra.qt.io\provisioning\openssl\openssl-${version}_fixes-ndk_root.tar.gz $zip
- Verify-Checksum $zip $sha1
- Extract-7Zip $zip C:\Utils\tmp
- Extract-7Zip C:\Utils\tmp\openssl-$version.tar C:\Utils\tmp
- Move-Item C:\Utils\tmp\openssl-${version} $destination
- Remove "$zip"
+function Install($1, $2) {
+ $ndk_version = $1
+ $prebuilt_sha1 = $2
+
+ # msys unix style paths
+ $openssl_path = "/c/Utils/openssl-android-master"
+ $ndk_path = "/c/Utils/Android/android-ndk-${ndk_version}"
+ $cc_path = "$ndk_path/toolchains/llvm/prebuilt/windows-x86_64/bin"
+
+ $prebuilt_url_ndk = "\\ci-files01-hki.intra.qt.io\provisioning\openssl\prebuilt-openssl-${openssl_version}-for-android-used-ndk-${ndk_version}-windows.zip"
+ $prebuilt_zip_ndk = Get-DownloadLocation ("prebuilt-openssl-${openssl_version}-for-android-used-ndk-${ndk_version}-windows.zip")
+
+ if ((Test-Path $prebuilt_url_ndk)) {
+ Write-Host "Install prebuilt OpenSSL for Android"
+ Download $prebuilt_url_ndk $prebuilt_url_ndk $prebuilt_zip_ndk
+ Verify-Checksum $prebuilt_zip_ndk $prebuilt_sha1
+ Extract-7Zip $prebuilt_zip_ndk C:\Utils
+ Remove $prebuilt_zip_ndk
+ } else {
+ Write-Host "Build OpenSSL for Android from sources"
+ # openssl-${openssl_version}_fixes-ndk_root.tar.gz package includes fixes from https://github.com/openssl/openssl/pull/17322 and string ANDROID_NDK_HOME is replaced with ANDROID_NDK_ROOT in Configurations/15-android.conf
+ Download \\ci-files01-hki.intra.qt.io\provisioning\openssl\openssl-${openssl_version}_fixes-ndk_root.tar.gz \\ci-files01-hki.intra.qt.io\provisioning\openssl\openssl-${openssl_version}_fixes-ndk_root.tar.gz $openssl_compressed
+ Verify-Checksum $openssl_compressed $openssl_sha1
+
+ Extract-7Zip $openssl_compressed C:\Utils\tmp
+ Extract-7Zip C:\Utils\tmp\openssl-${openssl_version}_fixes-ndk_root.tar C:\Utils\tmp
+ Move-Item C:\Utils\tmp\openssl-${openssl_version} $destination
+ Remove "$openssl_compressed"
- Write-Host "Configuring OpenSSL $version for Android..."
- Push-Location $destination
- # $ must be escaped in powershell...
+ Write-Host "Configuring OpenSSL $openssl_version for Android..."
+ Push-Location $destination
+ # $ must be escaped in powershell...
- function CheckExitCode {
+ function CheckExitCode {
- param (
- $p
- )
+ param (
+ $p
+ )
- if ($p.ExitCode) {
- Write-host "Process failed with exit code: $($p.ExitCode)"
- exit 1
+ if ($p.ExitCode) {
+ Write-host "Process failed with exit code: $($p.ExitCode)"
+ exit 1
+ }
}
+
+ $configure = Start-Process -NoNewWindow -Wait -PassThru -ErrorAction Stop -FilePath "$msys_bash" -ArgumentList ("-lc", "`"pushd $openssl_path; ANDROID_NDK_ROOT=$ndk_path PATH=${cc_path}:`$PATH CC=clang $openssl_path/Configure shared android-arm`"")
+ CheckExitCode $configure
+
+ $make = Start-Process -NoNewWindow -Wait -PassThru -ErrorAction Stop -FilePath "$msys_bash" -ArgumentList ("-lc", "`"pushd $openssl_path; ANDROID_NDK_ROOT=$ndk_path PATH=${cc_path}:`$PATH CC=clang make -f $openssl_path/Makefile build_generated`"")
+ CheckExitCode $make
+
+ Pop-Location
+ Remove-item C:\Utils\tmp -Recurse -Confirm:$false
}
- $configure = Start-Process -NoNewWindow -Wait -PassThru -ErrorAction Stop -FilePath "$msys_bash" -ArgumentList ("-lc", "`"pushd $openssl_path; ANDROID_NDK_ROOT=$ndkPath PATH=${cc_path}:`$PATH CC=clang $openssl_path/Configure shared android-arm`"")
- CheckExitCode $configure
+ Move-Item $destination "${destination}-${ndk_version}"
+}
- $make = Start-Process -NoNewWindow -Wait -PassThru -ErrorAction Stop -FilePath "$msys_bash" -ArgumentList ("-lc", "`"pushd $openssl_path; ANDROID_NDK_ROOT=$ndkPath PATH=${cc_path}:`$PATH CC=clang make -f $openssl_path/Makefile build_generated`"")
- CheckExitCode $make
+# Install NDK Default version
+Install $ndk_version_default $prebuilt_sha1_ndk_default
- Pop-Location
- Remove-item C:\Utils\tmp -Recurse -Confirm:$false
+if (Test-Path -Path ${destination}-${ndk_version_latest}) {
+ Write-Host "OpenSSL for Android Latest version is the same than Default. Installation done."
+} else {
+ # Install NDK Latest version
+ Install $ndk_version_latest $prebuilt_sha1_ndk_latest
}
-Set-EnvironmentVariable "OPENSSL_ANDROID_HOME" "$destination"
-Write-Output "Android OpenSSL = $version" >> ~/versions.txt
+Set-EnvironmentVariable "OPENSSL_ANDROID_HOME_DEFAULT" "${destination}-${ndk_version_default}"
+Set-EnvironmentVariable "OPENSSL_ANDROID_HOME_LATEST" "${destination}-${ndk_version_latest}"
+Write-Output "Android OpenSSL = $openssl_version" >> ~/versions.txt
diff --git a/coin/provisioning/common/windows/android.ps1 b/coin/provisioning/common/windows/android.ps1
index 5ee6d22e..cd989170 100644
--- a/coin/provisioning/common/windows/android.ps1
+++ b/coin/provisioning/common/windows/android.ps1
@@ -46,12 +46,17 @@
# That's why we need to use Andoid-21 API version in Qt 5.9.
# NDK
-$ndkVersion = "r23b"
-$ndkCachedUrl = "\\ci-files01-hki.intra.qt.io\provisioning\android\android-ndk-$ndkVersion-windows.zip"
-$ndkOfficialUrl = "https://dl.google.com/android/repository/android-ndk-$ndkVersion-windows.zip"
-$ndkChecksum = "6e3fb50022c611a2b13d02f5de5c21cc7206a298"
-$ndkFolder = "c:\Utils\Android\android-ndk-$ndkVersion"
-$ndkZip = "c:\Windows\Temp\android_ndk_$ndkVersion.zip"
+$ndkVersionLatest = "r23b"
+$ndkVersionDefault = $ndkVersionLatest
+$ndkChecksumLatest = "6e3fb50022c611a2b13d02f5de5c21cc7206a298"
+$ndkChecksumDefault = $ndkChecksumLatest
+$ndkCachedUrlLatest = "\\ci-files01-hki.intra.qt.io\provisioning\android\android-ndk-$ndkVersionLatest-windows.zip"
+$ndkOfficialUrlLatest = "https://dl.google.com/android/repository/android-ndk-$ndkVersionLatest-windows.zip"
+$ndkCachedUrlDefault = "\\ci-files01-hki.intra.qt.io\provisioning\android\android-ndk-$ndkVersionDefault-windows.zip"
+$ndkOfficialUrlDefault = "https://dl.google.com/android/repository/android-ndk-$ndkVersionDefault-windows.zip"
+$ndkFolderLatest = "c:\Utils\Android\android-ndk-$ndkVersionLatest"
+$ndkFolderDefault = "c:\Utils\Android\android-ndk-$ndkVersionDefault"
+$ndkZip = "c:\Windows\Temp\android_ndk.zip"
# SDK
$toolsVersion = "2.1"
@@ -75,11 +80,20 @@ function Install($1, $2, $3, $4) {
Download $offcialUrl $cacheUrl $zip
Verify-Checksum $zip "$checksum"
Extract-7Zip $zip C:\Utils\Android
+ Remove $zip
}
-Write-Host "Installing Android NDK $nkdVersion"
-Install $ndkCachedUrl $ndkZip $ndkChecksum $ndkOfficialUrl
-Set-EnvironmentVariable "ANDROID_NDK_ROOT" $ndkFolder
+Write-Host "Installing Android NDK $ndkVersionDefault"
+Install $ndkCachedUrlDefault $ndkZip $ndkChecksumDefault $ndkOfficialUrlDefault
+Set-EnvironmentVariable "ANDROID_NDK_ROOT_DEFAULT" $ndkFolderDefault
+
+if (Test-Path -Path $ndkFolderLatest) {
+ Write-Host "Android Latest version is the same than Default. NDK installation done."
+} else {
+ Write-Host "Installing Android NDK $nkdVersionLatest"
+ Install $ndkCachedUrlLatest $ndkZip $ndkChecksumLatest $ndkOfficialUrlLatest
+ Set-EnvironmentVariable "ANDROID_NDK_ROOT_LATEST" $ndkFolderLatest
+}
Install $toolsCachedUrl $sdkZip $toolsChecksum $sdkOfficialUrl
New-Item -ItemType directory -Path $toolsFolder
@@ -117,4 +131,4 @@ cmd /c "dir C:\Utils\android"
Write-Output "Android SDK tools= $toolsVersion" >> ~/versions.txt
Write-Output "Android SDK Build Tools = $sdkBuildToolsVersion" >> ~/versions.txt
Write-Output "Android SDK Api Level = $sdkApiLevel" >> ~/versions.txt
-Write-Output "Android NDK = $ndkVersion" >> ~/versions.txt
+Write-Output "Android NDK = $ndkVersionDefault" >> ~/versions.txt
diff --git a/coin/provisioning/qtci-macos-10.14-x86_64/30-android.sh b/coin/provisioning/qtci-macos-10.14-x86_64/30-android.sh
index 770b5d0c..c47c2e7b 100755
--- a/coin/provisioning/qtci-macos-10.14-x86_64/30-android.sh
+++ b/coin/provisioning/qtci-macos-10.14-x86_64/30-android.sh
@@ -1,99 +1,6 @@
#!/usr/bin/env bash
-#############################################################################
-##
-## Copyright (C) 2022 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# This script install Android sdk and ndk.
-
-# It also runs update for SDK API, latest SDK tools, latest platform-tools and build-tools version
-
set -ex
-# shellcheck source=../common/unix/SetEnvVar.sh
-source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
-
-targetFolder="/opt/android"
-sdkTargetFolder="$targetFolder/sdk"
-
-basePath="/net/ci-files01-hki.intra.qt.io/hdd/www/input/android"
-
-toolsVersion="2.1"
-# toolsFile dertermines tools version
-toolsFile="commandlinetools-mac-6609375_latest.zip"
-
-ndkVersion="r23b"
-ndkFile="android-ndk-$ndkVersion-darwin.zip"
-sdkBuildToolsVersion="31.0.0"
-# this is compile sdk version
-sdkApiLevel="android-31"
-
-toolsSourceFile="$basePath/$toolsFile"
-ndkSourceFile="$basePath/$ndkFile"
-
-echo "Unzipping Android NDK to '$targetFolder'"
-sudo unzip -q "$ndkSourceFile" -d "$targetFolder"
-echo "Unzipping Android Tools to '$sdkTargetFolder'"
-sudo unzip -q "$toolsSourceFile" -d "$sdkTargetFolder"
-
-echo "Changing ownership of Android files."
-sudo chown -R qt:wheel "$targetFolder"
-
-# Run the following command under `eval` or `sh -c` so that the shell properly splits it
-sdkmanager_no_progress_bar_cmd="tr '\r' '\n' | grep -v '^\[[ =]*\]'"
-
-sudo mkdir "$sdkTargetFolder/cmdline-tools"
-sudo mv "$sdkTargetFolder/tools" "$sdkTargetFolder/cmdline-tools"
-
-echo "Running SDK manager for platforms;$sdkApiLevel, platform-tools and build-tools;$sdkBuildToolsVersion."
-(echo "y"; echo "y") | "$sdkTargetFolder/cmdline-tools/tools/bin/sdkmanager" "--sdk_root=$sdkTargetFolder" \
- "platforms;$sdkApiLevel" "platform-tools" "build-tools;$sdkBuildToolsVersion" \
- | eval $sdkmanager_no_progress_bar_cmd
-
-echo "Checking the contents of Android SDK..."
-ls -l "$sdkTargetFolder"
-
-SetEnvVar "ANDROID_SDK_ROOT" "$sdkTargetFolder"
-SetEnvVar "ANDROID_NDK_ROOT" "$targetFolder/android-ndk-$ndkVersion"
-SetEnvVar "ANDROID_NDK_HOST" "darwin-x86_64"
-SetEnvVar "ANDROID_API_VERSION" "$sdkApiLevel"
-
-echo "Android SDK tools = $toolsVersion" >> ~/versions.txt
-echo "Android SDK Build Tools = $sdkBuildToolsVersion" >> ~/versions.txt
-echo "Android SDK API level = $sdkApiLevel" >> ~/versions.txt
-echo "Android NDK = $ndkVersion" >> ~/versions.txt
+# shellcheck source=../common/macos/android.sh
+source "${BASH_SOURCE%/*}/../common/macos/android.sh"
diff --git a/coin/provisioning/qtci-macos-12-x86_64/30-android.sh b/coin/provisioning/qtci-macos-12-x86_64/30-android.sh
index cbc59c7d..3d6aaea8 100755
--- a/coin/provisioning/qtci-macos-12-x86_64/30-android.sh
+++ b/coin/provisioning/qtci-macos-12-x86_64/30-android.sh
@@ -1,99 +1,7 @@
-#!/usr/bin/env bash
-
-#############################################################################
-##
-## Copyright (C) 2021 The Qt Company Ltd.
-## Contact: https://www.qt.io/licensing/
-##
-## This file is part of the provisioning scripts of the Qt Toolkit.
-##
-## $QT_BEGIN_LICENSE:LGPL$
-## Commercial License Usage
-## Licensees holding valid commercial Qt licenses may use this file in
-## accordance with the commercial license agreement provided with the
-## Software or, alternatively, in accordance with the terms contained in
-## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see https://www.qt.io/terms-conditions. For further
-## information use the contact form at https://www.qt.io/contact-us.
-##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 3 as published by the Free Software
-## Foundation and appearing in the file LICENSE.LGPL3 included in the
-## packaging of this file. Please review the following information to
-## ensure the GNU Lesser General Public License version 3 requirements
-## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-##
-## GNU General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU
-## General Public License version 2.0 or (at your option) the GNU General
-## Public license version 3 or any later version approved by the KDE Free
-## Qt Foundation. The licenses are as published by the Free Software
-## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-## included in the packaging of this file. Please review the following
-## information to ensure the GNU General Public License requirements will
-## be met: https://www.gnu.org/licenses/gpl-2.0.html and
-## https://www.gnu.org/licenses/gpl-3.0.html.
-##
-## $QT_END_LICENSE$
-##
-#############################################################################
-
-# This script install Android sdk and ndk.
-# It also runs update for SDK API, latest SDK tools, latest platform-tools and build-tools version
+#!/usr/bin/env bash
set -ex
-# shellcheck source=../common/unix/SetEnvVar.sh
-source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
-
-targetFolder="/opt/android"
-sdkTargetFolder="$targetFolder/sdk"
-
-basePath="/net/ci-files01-hki.intra.qt.io/hdd/www/input/android"
-
-toolsVersion="2.1"
-# toolsFile dertermines tools version
-toolsFile="commandlinetools-mac-6609375_latest.zip"
-
-ndkVersion="r23b"
-ndkFile="android-ndk-$ndkVersion-darwin.zip"
-sdkBuildToolsVersion="31.0.0"
-# this is compile sdk version
-sdkApiLevel="android-31"
-
-toolsSourceFile="$basePath/$toolsFile"
-ndkSourceFile="$basePath/$ndkFile"
-
-echo "Unzipping Android NDK to '$targetFolder'"
-sudo unzip -q "$ndkSourceFile" -d "$targetFolder"
-echo "Unzipping Android Tools to '$sdkTargetFolder'"
-sudo unzip -q "$toolsSourceFile" -d "$sdkTargetFolder"
-
-echo "Changing ownership of Android files."
-sudo chown -R qt:wheel "$targetFolder"
-
-# Run the following command under `eval` or `sh -c` so that the shell properly splits it
-sdkmanager_no_progress_bar_cmd="tr '\r' '\n' | grep -v '^\[[ =]*\]'"
-
-sudo mkdir "$sdkTargetFolder/cmdline-tools"
-sudo mv "$sdkTargetFolder/tools" "$sdkTargetFolder/cmdline-tools"
-
-echo "Running SDK manager for platforms;$sdkApiLevel, platform-tools and build-tools;$sdkBuildToolsVersion."
-(echo "y"; echo "y") | "$sdkTargetFolder/cmdline-tools/tools/bin/sdkmanager" "--sdk_root=$sdkTargetFolder" \
- "platforms;$sdkApiLevel" "platform-tools" "build-tools;$sdkBuildToolsVersion" \
- | eval $sdkmanager_no_progress_bar_cmd
-
-echo "Checking the contents of Android SDK..."
-ls -l "$sdkTargetFolder"
-
-SetEnvVar "ANDROID_SDK_ROOT" "$sdkTargetFolder"
-SetEnvVar "ANDROID_NDK_ROOT" "$targetFolder/android-ndk-$ndkVersion"
-SetEnvVar "ANDROID_NDK_HOST" "darwin-x86_64"
-SetEnvVar "ANDROID_API_VERSION" "$sdkApiLevel"
-
-echo "Android SDK tools = $toolsVersion" >> ~/versions.txt
-echo "Android SDK Build Tools = $sdkBuildToolsVersion" >> ~/versions.txt
-echo "Android SDK API level = $sdkApiLevel" >> ~/versions.txt
-echo "Android NDK = $ndkVersion" >> ~/versions.txt
+# shellcheck source=../common/macos/android.sh
+source "${BASH_SOURCE%/*}/../common/macos/android.sh"