diff options
Diffstat (limited to 'coin')
30 files changed, 1061 insertions, 69 deletions
diff --git a/coin/axivion/ci_config_linux.json b/coin/axivion/ci_config_linux.json new file mode 100644 index 0000000000..1999760450 --- /dev/null +++ b/coin/axivion/ci_config_linux.json @@ -0,0 +1,43 @@ +{ + "Project": { + "BuildSystemIntegration": { + "child_order": [ + "GCCSetup", + "CMake", + "LinkLibraries" + ] + }, + "CMake": { + "_active": true, + "_copy_from": "CMakeIntegration", + "build_environment": {}, + "build_options": "-j4", + "generate_options": "--fresh", + "generator": "Ninja" + }, + "GCCSetup": { + "_active": true, + "_copy_from": "Command", + "build_command": "gccsetup --cc gcc --cxx g++ --config ../../../axivion/" + }, + "LinkLibraries": { + "_active": true, + "_copy_from": "AxivionLinker", + "input_files": [ + "build/lib/lib*.so*.ir" + ], + "ir": "build/$(env:TESTED_MODULE_COIN).ir", + "plugin_files": [ + "build/plugins/*/lib*.so*.ir" + ] + } + }, + "_Format": "1.0", + "_Version": "7.6.2", + "_VersionNum": [ + 7, + 6, + 2, + 12725 + ] +} diff --git a/coin/instructions/call_cmake_for_standalone_examples.yaml b/coin/instructions/call_cmake_for_standalone_examples.yaml new file mode 100644 index 0000000000..eb811cbea4 --- /dev/null +++ b/coin/instructions/call_cmake_for_standalone_examples.yaml @@ -0,0 +1,26 @@ +type: Group +instructions: + - type: ChangeDirectory + directory: "{{.BuildDir}}" + - type: ExecuteCommand + command: "{{.Env.EXAMPLES_ENV_PREFIX}} {{.Env.INSTALL_DIR_FOR_EXAMPLES}}\\bin\\qt-internal-configure-examples {{.Env.COIN_CMAKE_ARGS}}" + executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to call configure examples. + enable_if: + condition: property + property: host.os + equals_value: Windows + - type: ExecuteCommand + command: "{{.Env.EXAMPLES_ENV_PREFIX}} {{.Env.INSTALL_DIR_FOR_EXAMPLES}}/libexec/qt-internal-configure-examples {{.Env.COIN_CMAKE_ARGS}}" + executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to call configure examples. + disable_if: + condition: property + property: host.os + equals_value: Windows diff --git a/coin/instructions/call_host_install.yaml b/coin/instructions/call_host_install.yaml index 4762763a1e..1d923fa8f5 100644 --- a/coin/instructions/call_host_install.yaml +++ b/coin/instructions/call_host_install.yaml @@ -1,9 +1,24 @@ type: Group instructions: - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake -DQT_BUILD_DIR={{.BuildDir}} -P {{.Env.COIN_CMAKE_INSTALL_SCRIPT_PATH}}/bin/qt-cmake-private-install.cmake" + command: "{{.Env.ENV_PREFIX}} cmake -DQT_BUILD_DIR={{.BuildDir}} -P {{.Env.COIN_CMAKE_BUILD_LIBEXEC_DIR}}{{.Env.CI_PATH_SEP}}qt-cmake-private-install.cmake" executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution maxTimeInSeconds: 6000 maxTimeBetweenOutput: 1200 + enable_if: + condition: runtime + env_var: TESTED_MODULE_COIN + contains_value: qtbase + userMessageOnFailure: > + Failed to install package. + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake -DQT_BUILD_DIR={{.BuildDir}} -P {{.Env.COIN_CMAKE_INSTALL_LIBEXEC_DIR}}{{.Env.CI_PATH_SEP}}qt-cmake-private-install.cmake" + executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + disable_if: + condition: runtime + env_var: TESTED_MODULE_COIN + contains_value: qtbase userMessageOnFailure: > Failed to install package. diff --git a/coin/instructions/call_target_install.yaml b/coin/instructions/call_target_install.yaml index 0f45240101..f2a7fc10ef 100644 --- a/coin/instructions/call_target_install.yaml +++ b/coin/instructions/call_target_install.yaml @@ -1,9 +1,24 @@ type: Group instructions: - type: ExecuteCommand - command: "{{.Env.TARGET_ENV_PREFIX}} cmake -DQT_BUILD_DIR={{.BuildDir}} -P {{.Env.COIN_CMAKE_INSTALL_SCRIPT_PATH}}/bin/qt-cmake-private-install.cmake" + command: "{{.Env.TARGET_ENV_PREFIX}} cmake -DQT_BUILD_DIR={{.BuildDir}} -P {{.Env.COIN_CMAKE_BUILD_LIBEXEC_DIR}}{{.Env.CI_PATH_SEP}}qt-cmake-private-install.cmake" executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution maxTimeInSeconds: 6000 maxTimeBetweenOutput: 1200 + enable_if: + condition: runtime + env_var: TESTED_MODULE_COIN + contains_value: qtbase + userMessageOnFailure: > + Failed to install package. + - type: ExecuteCommand + command: "{{.Env.TARGET_ENV_PREFIX}} cmake -DQT_BUILD_DIR={{.BuildDir}} -P {{.Env.COIN_CMAKE_INSTALL_LIBEXEC_DIR}}{{.Env.CI_PATH_SEP}}qt-cmake-private-install.cmake" + executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + disable_if: + condition: runtime + env_var: TESTED_MODULE_COIN + contains_value: qtbase userMessageOnFailure: > Failed to install package. diff --git a/coin/instructions/cmake_build_and_upload_test_artifacts.yaml b/coin/instructions/cmake_build_and_upload_test_artifacts.yaml index c1db6cc488..7fa663e4d2 100644 --- a/coin/instructions/cmake_build_and_upload_test_artifacts.yaml +++ b/coin/instructions/cmake_build_and_upload_test_artifacts.yaml @@ -48,6 +48,15 @@ instructions: property: features contains_value: "MinimalStaticTests" + # Inform CMake to build just a minimal set of tests for Android multi-ABI Qt builds. + - type: AppendToEnvironmentVariable + variableName: COIN_CMAKE_ARGS + variableValue: " -DQT_BUILD_MINIMAL_ANDROID_MULTI_ABI_TESTS=ON" + enable_if: + condition: property + property: features + contains_value: "MinimalAndroidMultiABITests" + - !include "{{qt/qtbase}}/call_cmake_for_standalone_tests.yaml" - type: ExecuteCommand command: "{{.Env.TESTS_ENV_PREFIX}} cmake --build . --parallel -v" diff --git a/coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml b/coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml index 3592ac4270..bc16368fc2 100644 --- a/coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml +++ b/coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml @@ -13,6 +13,11 @@ instructions: variableValue: "{{.Env.COMMON_TEST_CMAKE_ARGS}}" - !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml" disable_if: - condition: property - property: features - contains_value: DisableTests + condition: or + conditions: + - condition: property + property: features + contains_value: DisableTests + - condition: property + property: features + contains_value: DoNotBuildTests diff --git a/coin/instructions/cmake_build_and_upload_test_artifacts_target.yaml b/coin/instructions/cmake_build_and_upload_test_artifacts_target.yaml index 8c3dfe14e1..afc20b98a9 100644 --- a/coin/instructions/cmake_build_and_upload_test_artifacts_target.yaml +++ b/coin/instructions/cmake_build_and_upload_test_artifacts_target.yaml @@ -16,14 +16,29 @@ instructions: variableName: INSTALL_DIR_FOR_CMAKE_TESTS variableValue: "{{.InstallDir}}/target" disable_if: - condition: property - property: host.os - equals_value: Windows + condition: or + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: and + conditions: + - condition: property + property: target.osVersion + equals_value: Android_ANY + - condition: property + property: target.arch + equals_value: Multi - type: EnvironmentVariable variableName: COIN_CMAKE_ARGS variableValue: "{{.Env.COMMON_TARGET_TEST_CMAKE_ARGS}}" - !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml" disable_if: - condition: property - property: features - contains_value: DisableTests + condition: or + conditions: + - condition: property + property: features + contains_value: DisableTests + - condition: property + property: features + contains_value: DoNotBuildTests diff --git a/coin/instructions/cmake_build_standalone_examples.yaml b/coin/instructions/cmake_build_standalone_examples.yaml new file mode 100644 index 0000000000..ecc0d3a23b --- /dev/null +++ b/coin/instructions/cmake_build_standalone_examples.yaml @@ -0,0 +1,32 @@ +type: Group +instructions: + - type: ChangeDirectory + directory: "{{.SourceDir}}" + - type: MakeDirectory + directory: "{{.SourceDir}}_standalone_examples" + - type: SetBuildDirectory + directory: "{{.SourceDir}}_standalone_examples" + - type: ChangeDirectory + directory: "{{.BuildDir}}" + - type: AppendToEnvironmentVariable + variableName: COIN_CMAKE_ARGS + variableValue: " -S {{.SourceDir}} -B ." + disable_if: + condition: runtime + env_var: COIN_CMAKE_ARGS + equals_value: null + - type: EnvironmentVariable + variableName: COIN_CMAKE_ARGS + variableValue: "-S {{.SourceDir}} -B ." + enable_if: + condition: runtime + env_var: COIN_CMAKE_ARGS + equals_value: null + + - !include "{{qt/qtbase}}/call_cmake_for_standalone_examples.yaml" + - type: ExecuteCommand + command: "{{.Env.EXAMPLES_ENV_PREFIX}} cmake --build . --parallel -v" + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 4800 + userMessageOnFailure: > + Failed to build examples. diff --git a/coin/instructions/cmake_build_standalone_examples_host.yaml b/coin/instructions/cmake_build_standalone_examples_host.yaml new file mode 100644 index 0000000000..47f5ea05d3 --- /dev/null +++ b/coin/instructions/cmake_build_standalone_examples_host.yaml @@ -0,0 +1,16 @@ +type: Group +instructions: + - type: EnvironmentVariable + variableName: EXAMPLES_ENV_PREFIX + variableValue: "{{.Env.ENV_PREFIX}}" + - type: EnvironmentVariable + variableName: INSTALL_DIR_FOR_EXAMPLES + variableValue: "{{.InstallDir}}" + - type: EnvironmentVariable + variableName: COIN_CMAKE_ARGS + variableValue: "{{.Env.COMMON_EXAMPLES_CMAKE_ARGS}}" + - !include "{{qt/qtbase}}/cmake_build_standalone_examples.yaml" +enable_if: + condition: property + property: features + contains_value: StandaloneExamples diff --git a/coin/instructions/cmake_build_standalone_examples_target.yaml b/coin/instructions/cmake_build_standalone_examples_target.yaml new file mode 100644 index 0000000000..faf7300430 --- /dev/null +++ b/coin/instructions/cmake_build_standalone_examples_target.yaml @@ -0,0 +1,30 @@ +type: Group +instructions: + - type: EnvironmentVariable + variableName: EXAMPLES_ENV_PREFIX + variableValue: "{{.Env.TARGET_ENV_PREFIX}}" + - type: EnvironmentVariable + variableName: INSTALL_DIR_FOR_EXAMPLES + variableValue: "{{.InstallDir}}\\target" + enable_if: + condition: property + property: host.os + equals_value: Windows + - type: EnvironmentVariable + variableName: INSTALL_DIR_FOR_EXAMPLES + variableValue: "{{.InstallDir}}/target" + # TODO: Might need android multi-abi support whenever we decide to build examples for that + # config. See 7b9bb698b93e747e02bf6ab8310c439867318f8e in qtbase and how the instructions + # were modified for multi-abi android tests. + disable_if: + condition: property + property: host.os + equals_value: Windows + - type: EnvironmentVariable + variableName: COIN_CMAKE_ARGS + variableValue: "{{.Env.COMMON_TARGET_EXAMPLES_CMAKE_ARGS}}" + - !include "{{qt/qtbase}}/cmake_build_standalone_examples.yaml" +enable_if: + condition: property + property: features + contains_value: StandaloneExamples diff --git a/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml b/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml index 2cf98b5ea2..a62ab0f48e 100644 --- a/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml +++ b/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml @@ -50,8 +50,42 @@ instructions: userMessageOnFailure: > Failed to build sources. - type: EnvironmentVariable - variableName: COIN_CMAKE_INSTALL_SCRIPT_PATH - variableValue: "{{.InstallDir}}/host" + variableName: COIN_CMAKE_INSTALL_DIR + variableValue: "{{.InstallDir}}{{.Env.CI_PATH_SEP}}host" + - type: EnvironmentVariable + variableName: COIN_CMAKE_INSTALL_LIBEXEC_DIR + variableValue: "{{.Env.COIN_CMAKE_INSTALL_DIR}}{{.Env.CI_PATH_SEP}}libexec" + disable_if: + condition: and + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: and + conditions: + - condition: property + property: target.os + not_equals_value: QNX + - condition: property + property: target.osVersion + not_in_values: [WebAssembly, Android_ANY] + - type: EnvironmentVariable + variableName: COIN_CMAKE_INSTALL_LIBEXEC_DIR + variableValue: "{{.InstallDir}}{{.Env.CI_PATH_SEP}}host{{.Env.CI_PATH_SEP}}bin" + enable_if: + condition: and + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: and + conditions: + - condition: property + property: target.os + not_equals_value: QNX + - condition: property + property: target.osVersion + not_in_values: [WebAssembly, Android_ANY] - !include "{{qt/qtbase}}/call_host_install.yaml" - type: EnvironmentVariable variableName: DESTDIR @@ -88,8 +122,42 @@ instructions: userMessageOnFailure: > Failed to build sources. - type: EnvironmentVariable - variableName: COIN_CMAKE_INSTALL_SCRIPT_PATH - variableValue: "{{.InstallDir}}/target" + variableName: COIN_CMAKE_INSTALL_DIR + variableValue: "{{.InstallDir}}{{.Env.CI_PATH_SEP}}target" + - type: EnvironmentVariable + variableName: COIN_CMAKE_INSTALL_LIBEXEC_DIR + variableValue: "{{.Env.COIN_CMAKE_INSTALL_DIR}}{{.Env.CI_PATH_SEP}}libexec" + disable_if: + condition: and + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: and + conditions: + - condition: property + property: target.os + not_equals_value: QNX + - condition: property + property: target.osVersion + not_in_values: [WebAssembly, Android_ANY] + - type: EnvironmentVariable + variableName: COIN_CMAKE_INSTALL_LIBEXEC_DIR + variableValue: "{{.InstallDir}}{{.Env.CI_PATH_SEP}}target{{.Env.CI_PATH_SEP}}bin" + enable_if: + condition: and + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: and + conditions: + - condition: property + property: target.os + not_equals_value: QNX + - condition: property + property: target.osVersion + not_in_values: [WebAssembly, Android_ANY] - !include "{{qt/qtbase}}/call_target_install.yaml" - type: EnvironmentVariable variableName: DESTDIR @@ -106,5 +174,6 @@ instructions: - type: EnvironmentVariable variableName: COIN_CONFIG_TYPE variableValue: "Target" + - !include "{{qt/qtbase}}/cmake_build_standalone_examples_target.yaml" - !include "{{qt/qtbase}}/qmake/get_qmake_location_target.yaml" - !include "{{qt/qtbase}}/qmake_examples/build_qmake_examples_instructions.yaml" diff --git a/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml b/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml index 9850f3c60a..84dc535b61 100644 --- a/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml +++ b/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml @@ -36,8 +36,42 @@ instructions: userMessageOnFailure: > Failed to build sources. - type: EnvironmentVariable - variableName: COIN_CMAKE_INSTALL_SCRIPT_PATH + variableName: COIN_CMAKE_BUILD_DIR variableValue: "{{.BuildDir}}" + - type: EnvironmentVariable + variableName: COIN_CMAKE_BUILD_LIBEXEC_DIR + variableValue: "{{.BuildDir}}{{.Env.CI_PATH_SEP}}libexec" + disable_if: + condition: and + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: and + conditions: + - condition: property + property: target.os + not_equals_value: QNX + - condition: property + property: target.osVersion + not_in_values: [WebAssembly, Android_ANY] + - type: EnvironmentVariable + variableName: COIN_CMAKE_BUILD_LIBEXEC_DIR + variableValue: "{{.BuildDir}}{{.Env.CI_PATH_SEP}}bin" + enable_if: + condition: and + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: and + conditions: + - condition: property + property: target.os + not_equals_value: QNX + - condition: property + property: target.osVersion + not_in_values: [WebAssembly, Android_ANY] - !include "{{qt/qtbase}}/call_host_install.yaml" - type: EnvironmentVariable variableName: DESTDIR @@ -89,8 +123,42 @@ instructions: userMessageOnFailure: > Failed to build sources. - type: EnvironmentVariable - variableName: COIN_CMAKE_INSTALL_SCRIPT_PATH + variableName: COIN_CMAKE_BUILD_DIR variableValue: "{{.BuildDir}}" + - type: EnvironmentVariable + variableName: COIN_CMAKE_BUILD_LIBEXEC_DIR + variableValue: "{{.Env.COIN_CMAKE_BUILD_DIR}}{{.Env.CI_PATH_SEP}}libexec" + disable_if: + condition: and + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: and + conditions: + - condition: property + property: target.os + not_equals_value: QNX + - condition: property + property: target.osVersion + not_in_values: [WebAssembly, Android_ANY] + - type: EnvironmentVariable + variableName: COIN_CMAKE_BUILD_LIBEXEC_DIR + variableValue: "{{.Env.COIN_CMAKE_BUILD_DIR}}{{.Env.CI_PATH_SEP}}bin" + enable_if: + condition: and + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: and + conditions: + - condition: property + property: target.os + not_equals_value: QNX + - condition: property + property: target.osVersion + not_in_values: [WebAssembly, Android_ANY] - !include "{{qt/qtbase}}/call_target_install.yaml" - type: EnvironmentVariable variableName: DESTDIR @@ -107,5 +175,6 @@ instructions: - type: EnvironmentVariable variableName: COIN_CONFIG_TYPE variableValue: "Target" + - !include "{{qt/qtbase}}/cmake_build_standalone_examples_target.yaml" - !include "{{qt/qtbase}}/qmake/get_qmake_location_target.yaml" - !include "{{qt/qtbase}}/qmake_examples/build_qmake_examples_instructions.yaml" diff --git a/coin/instructions/cmake_module_build_instructions.yaml b/coin/instructions/cmake_module_build_instructions.yaml index 80dc075eb5..a589941701 100644 --- a/coin/instructions/cmake_module_build_instructions.yaml +++ b/coin/instructions/cmake_module_build_instructions.yaml @@ -43,8 +43,32 @@ instructions: userMessageOnFailure: > Failed to build sources. - type: EnvironmentVariable - variableName: COIN_CMAKE_INSTALL_SCRIPT_PATH + variableName: COIN_CMAKE_INSTALL_DIR variableValue: "{{.InstallDir}}" + - type: EnvironmentVariable + variableName: COIN_CMAKE_INSTALL_LIBEXEC_DIR + variableValue: "{{.Env.COIN_CMAKE_INSTALL_DIR}}{{.Env.CI_PATH_SEP}}libexec" + disable_if: + condition: and + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: property + property: target.osVersion + not_in_values: [WebAssembly, Android_ANY] + - type: EnvironmentVariable + variableName: COIN_CMAKE_INSTALL_LIBEXEC_DIR + variableValue: "{{.Env.COIN_CMAKE_INSTALL_DIR}}{{.Env.CI_PATH_SEP}}bin" + enable_if: + condition: and + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: property + property: target.osVersion + not_in_values: [WebAssembly, Android_ANY] - !include "{{qt/qtbase}}/call_host_install.yaml" - type: EnvironmentVariable variableName: DESTDIR @@ -52,9 +76,14 @@ instructions: - !include "{{qt/qtbase}}/call_host_install.yaml" - type: SignPackage enable_if: - condition: property - property: host.os - equals_value: Windows + condition: and + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: property + property: features + contains_value: Packaging directory: "{{.InstallRoot}}/{{.AgentWorkingDir}}" maxTimeInSeconds: 1200 maxTimeBetweenOutput: 1200 @@ -66,5 +95,6 @@ instructions: - type: EnvironmentVariable variableName: COIN_CONFIG_TYPE variableValue: "Host" + - !include "{{qt/qtbase}}/cmake_build_standalone_examples_host.yaml" - !include "{{qt/qtbase}}/qmake/get_qmake_location_host.yaml" - !include "{{qt/qtbase}}/qmake_examples/build_qmake_examples_instructions.yaml" diff --git a/coin/instructions/cmake_qtbase_build_instructions.yaml b/coin/instructions/cmake_qtbase_build_instructions.yaml index a17077408e..01eb7f3264 100644 --- a/coin/instructions/cmake_qtbase_build_instructions.yaml +++ b/coin/instructions/cmake_qtbase_build_instructions.yaml @@ -30,8 +30,42 @@ instructions: userMessageOnFailure: > Failed to build sources. - type: EnvironmentVariable - variableName: COIN_CMAKE_INSTALL_SCRIPT_PATH + variableName: COIN_CMAKE_BUILD_DIR variableValue: "{{.BuildDir}}" + - type: EnvironmentVariable + variableName: COIN_CMAKE_BUILD_LIBEXEC_DIR + variableValue: "{{.Env.COIN_CMAKE_BUILD_DIR}}{{.Env.CI_PATH_SEP}}libexec" + disable_if: + condition: and + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: and + conditions: + - condition: property + property: target.os + not_equals_value: QNX + - condition: property + property: target.osVersion + not_in_values: [WebAssembly, Android_ANY] + - type: EnvironmentVariable + variableName: COIN_CMAKE_BUILD_LIBEXEC_DIR + variableValue: "{{.Env.COIN_CMAKE_BUILD_DIR}}{{.Env.CI_PATH_SEP}}bin" + enable_if: + condition: and + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: and + conditions: + - condition: property + property: target.os + not_equals_value: QNX + - condition: property + property: target.osVersion + not_in_values: [WebAssembly, Android_ANY] - !include "{{qt/qtbase}}/call_host_install.yaml" - type: EnvironmentVariable variableName: DESTDIR @@ -39,9 +73,14 @@ instructions: - !include "{{qt/qtbase}}/call_host_install.yaml" - type: SignPackage enable_if: - condition: property - property: host.os - equals_value: Windows + condition: and + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: property + property: features + contains_value: Packaging directory: "{{.InstallRoot}}/{{.AgentWorkingDir}}" maxTimeInSeconds: 1200 maxTimeBetweenOutput: 1200 @@ -53,5 +92,6 @@ instructions: - type: EnvironmentVariable variableName: COIN_CONFIG_TYPE variableValue: "Host" + - !include "{{qt/qtbase}}/cmake_build_standalone_examples_host.yaml" - !include "{{qt/qtbase}}/qmake/get_qmake_location_host.yaml" - !include "{{qt/qtbase}}/qmake_examples/build_qmake_examples_instructions.yaml" diff --git a/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml b/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml index ba9b1f3a79..a7039b5015 100644 --- a/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml +++ b/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml @@ -11,6 +11,11 @@ instructions: - type: EnvironmentVariable variableName: TESTRUNNER variableValue: "{{.Env.LIBEXEC_INSTALL_DIR}}qt-testrunner.py --" + # Running wasm tests with the coin testrunner is not yet implemented + disable_if: + condition: property + property: target.osVersion + in_values: [WebAssembly] - type: AppendToEnvironmentVariable variableName: TESTRUNNER variableValue: " {{.SourceDir}}/coin_qnx_qemu_runner.sh" @@ -26,7 +31,7 @@ instructions: instructions: - type: EnvironmentVariable variableName: ASAN_OPTIONS - variableValue: "malloc_context_size=100" + variableValue: "malloc_context_size=100:detect_leaks=0" - type: EnvironmentVariable # Override qt-testrunner as we don't want to gather test statistics # because many tests FAIL when built with ASAN. @@ -46,9 +51,24 @@ instructions: condition: property property: host.os equals_value: Windows + + # Keep the testrun quiet for ASAN testruns, since there are FAILs happening all over the place... - type: EnvironmentVariable variableName: CTEST_ARGS variableValue: "-V" + disable_if: + condition: property + property: features + contains_value: UseAddressSanitizer + # ...and only print the output from a failing test, i.e. test with ASAN errors. + - type: EnvironmentVariable + variableName: CTEST_OUTPUT_ON_FAILURE + variableValue: "1" + enable_if: + condition: property + property: features + contains_value: UseAddressSanitizer + - type: AppendToEnvironmentVariable variableName: CTEST_ARGS variableValue: " --stop-on-failure" @@ -56,12 +76,40 @@ instructions: condition: property property: features contains_value: AbortTestingOnFirstFailure + + # Enable CTest's JUnit XML summary only for recent versions + - type: AppendToEnvironmentVariable + variableName: CTEST_ARGS + variableValue: " --output-junit {{.Env.COIN_CTEST_RESULTSDIR}}{{.Env.CI_PATH_SEP}}test_summary.ctest_junit_xml" + enable_if: + condition: runtime + env_var: CMAKE_MIN_SUPPORTED_BIN_PATH + equals_value: null + + - !include "{{qt/qtbase}}/coin_module_test_android_start_emulator.yaml" + + - type: EnvironmentVariable + variableName: COIN_CROSS_PLATFORM_VERSION_TEST + variableValue: "TRUE" + enable_if: + condition: and + conditions: + - condition: property + property: platformDependency + not_equals_value: null + - condition: property + property: platformDependency.target.osVersion + not_equals_property: target.osVersion + - condition: property + property: features + contains_value: TestOnly + - type: ExecuteCommand command: "{{.Env.TESTS_ENV_PREFIX}} ctest {{.Env.CTEST_ARGS}}" executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution ignoreExitCode: false maxTimeInSeconds: 10800 - maxTimeBetweenOutput: 900 + maxTimeBetweenOutput: "{{.Env.COIN_COMMAND_OUTPUT_TIMEOUT}}" userMessageOnFailure: > Failed to run tests. diff --git a/coin/instructions/coin_module_axivion_template_v2.yaml b/coin/instructions/coin_module_axivion_template_v2.yaml new file mode 100644 index 0000000000..87d32f5d37 --- /dev/null +++ b/coin/instructions/coin_module_axivion_template_v2.yaml @@ -0,0 +1,98 @@ +analysis_instructions_axivion: &analysis_instructions_axivion + type: Group + instructions: + - type: Group + instructions: + - type: EnvironmentVariable + variableName: AXIVION_CHAINLOAD_TOOLCHAIN_FILE + variableValue: "{{.AgentWorkingDir}}/install/lib/cmake/Qt6/qt.toolchain.cmake" + - type: EnvironmentVariable + variableName: CMAKE_PREFIX_PATH + variableValue: "{{.AgentWorkingDir}}/install/lib/cmake" + enable_if: + condition: runtime + env_var: TESTED_MODULE_COIN + not_equals_value: "qtbase" + - type: Group + instructions: + - type: Rename + sourcePath: "{{.SourceDir}}/coin/axivion/ci_config_{{.Env.TARGET_OS_COIN}}.json" + targetPath: "{{.Env.HOME}}/axivion/ci_config.json" + userMessageOnFailure: "Moving ci_config.json failed. Make sure you have included the file in coin/axivion/ -folder" + - type: SetBuildDirectory + directory: "{{.SourceDir}}" + - type: ChangeDirectory + directory: "{{.BuildDir}}" + - type: ExecuteCommand + command: ["../../../axivion/start_analysis.sh"] + maxTimeInSeconds: 28800 + maxTimeBetweenOutput: 28800 + userMessageOnFailure: "Failed to run analysis" + +build_environment_axivion: &build_environment_axivion + type: Group + instructions: + - type: ExecuteCommand + command: ["sudo", "mkdir", "-p","/data/axivion"] + maxTimeInSeconds: 100 + maxTimeBetweenOutput: 100 + userMessageOnFailure: "Create mount point for results failed" + - type: ExecuteCommand + command: ["sudo", "mount", "-t", "nfs", "-o", "rw,nfsvers=3", "10.212.0.93:/data/axivion", "/data/axivion"] + maxTimeInSeconds: 100 + maxTimeBetweenOutput: 100 + userMessageOnFailure: "Mount failed" + - type: ExecuteCommand + command: ["rm","-rf","{{.SourceDir}}"] + maxTimeInSeconds: 100 + maxTimeBetweenOutput: 100 + userMessageOnFailure: "Failed to remove source directory" + - type: MakeDirectory + directory: "{{.SourceDir}}" + - type: ChangeDirectory + directory: "{{.SourceDir}}" + - type: ExecuteCommand + command: ["git", "clone", "--jobs={{.NumCPU}}", "-n","--depth=50", "git://{{.Env.QT_COIN_GIT_DAEMON}}/qt-project/qt/{{.Env.TESTED_MODULE_COIN}}","."] + maxTimeInSeconds: 900 + maxTimeBetweenOutput: 900 + userMessageOnFailure: "Failed to clone repository" + - type: ExecuteCommand + command: ["git", "fetch", "--recurse-submodules", "origin", "{{.Env.TESTED_MODULE_REVISION_COIN}}"] + maxTimeInSeconds: 900 + maxTimeBetweenOutput: 900 + userMessageOnFailure: "Failed to fetch sources" + - type: ExecuteCommand + command: ["git", "checkout", "--force", "{{.Env.TESTED_MODULE_REVISION_COIN}}"] + maxTimeInSeconds: 900 + maxTimeBetweenOutput: 900 + userMessageOnFailure: "Failed to checkout sources" + - type: ExecuteCommand + command: ["git", "submodule", "update", "--init", "--recursive"] + maxTimeInSeconds: 1800 + maxTimeBetweenOutput: 900 + userMessageOnFailure: "Failed to initialize git submodules" + - type: Group + instructions: + - !include "{{qt/qtbase}}/cmake_module_build_instructions.yaml" + enable_if: + condition: runtime + env_var: TESTED_MODULE_COIN + not_equals_value: "qtbase" + - type: Group + instructions: + - !include "{{qt/qtbase}}/cmake_qtbase_build_instructions.yaml" + enable_if: + condition: runtime + env_var: TESTED_MODULE_COIN + equals_value: "qtbase" + +type: Group +instructions: + - !include "{{qt/qtbase}}/prepare_building_env.yaml" + - *build_environment_axivion + - *analysis_instructions_axivion +enable_if: + condition: runtime + env_var: AXIVION_ANALYSIS + equals_value: "1" + diff --git a/coin/instructions/coin_module_build_template_v2.yaml b/coin/instructions/coin_module_build_template_v2.yaml index 5ed27515fb..e7f47328e8 100644 --- a/coin/instructions/coin_module_build_template_v2.yaml +++ b/coin/instructions/coin_module_build_template_v2.yaml @@ -20,10 +20,37 @@ instructions: equals_property: target.os - condition: property property: target.osVersion - not_in_values: [QEMU, WebAssembly, INTEGRITY] + not_in_values: [QEMU, WebAssembly, INTEGRITY, VxWorks] - condition: property property: features not_contains_value: "TargetBuildOnly" + - condition: property + property: features + not_contains_value: "DebianPackaging" + - condition: runtime + env_var: AXIVION_ANALYSIS + not_equals_value: "1" + - type: Group + instructions: + - !include "{{qt/qtbase}}/coin_module_axivion_template_v2.yaml" + enable_if: + condition: and + conditions: + - condition: runtime + env_var: AXIVION_ANALYSIS + equals_value: "1" + - condition: runtime + env_var: TESTED_MODULE_COIN + not_equals_value: "qtdoc" + - condition: runtime + env_var: TESTED_MODULE_COIN + not_equals_value: "qtquickeffectmaker" + - condition: runtime + env_var: TESTED_MODULE_COIN + not_equals_value: "qttranslations" + - condition: runtime + env_var: TESTED_MODULE_COIN + not_equals_value: "qtwebengine" - type: Group instructions: - !include "{{qt/qtbase}}/cmake_cross_compilation_module_build_instructions.yaml" @@ -33,13 +60,13 @@ instructions: enable_if: condition: property property: target.osVersion - in_values: [Android_ANY, QEMU, INTEGRITY, QNX_710] + in_values: [Android_ANY, QEMU, IOS_ANY, QNX_710, WebAssembly, INTEGRITY, VxWorks] enable_if: condition: or conditions: - condition: property property: target.osVersion - in_values: [IOS_ANY, Android_ANY, QEMU, QNX_710, WebAssembly, INTEGRITY] + in_values: [Android_ANY, QEMU, IOS_ANY, QNX_710, WebAssembly, INTEGRITY, VxWorks] - condition: and conditions: - condition: property @@ -48,3 +75,15 @@ instructions: - condition: property property: target.arch equals_value: ARM64 + - condition: property + property: features + not_contains_value: "DebianPackaging" + - type: Group + instructions: + - type: Group + instructions: + - !include "{{qt/qtbase}}/debian/debian_build_module.yaml" + enable_if: + condition: property + property: features + contains_value: "DebianPackaging" diff --git a/coin/instructions/coin_module_test_android_start_emulator.yaml b/coin/instructions/coin_module_test_android_start_emulator.yaml index a212f5742e..eff28ff494 100644 --- a/coin/instructions/coin_module_test_android_start_emulator.yaml +++ b/coin/instructions/coin_module_test_android_start_emulator.yaml @@ -3,10 +3,10 @@ instructions: - type: Group instructions: - type: ExecuteCommand - command: "{{.InstallDir}}/libexec/android_emulator_launcher.sh" + command: "{{.Env.ANDROID_EMULATOR_RUNNER}}" maxTimeInSeconds: 600 maxTimeBetweenOutput: 300 - userMessageOnFailure: "Failed to start emulator, check coin log and ~/emulator.log" + userMessageOnFailure: "Failed to start emulator, check coin log and testresults log files." enable_if: condition: property property: features diff --git a/coin/instructions/coin_module_test_template_common.yaml b/coin/instructions/coin_module_test_template_common.yaml index 16fac8dd5d..19c51e23c6 100644 --- a/coin/instructions/coin_module_test_template_common.yaml +++ b/coin/instructions/coin_module_test_template_common.yaml @@ -2,7 +2,6 @@ type: Group instructions: # The build env is needed on MSVC so that tst_qmake can properly build apps / libraries. - !include "{{qt/qtbase}}/prepare_building_env.yaml" - - !include "{{qt/qtbase}}/coin_module_test_android_start_emulator.yaml" - !include "{{qt/qtbase}}/coin_module_test_qnx_start_emulator.yaml" # The test env vars are needed to pick the proper prefix.bat file. - !include "{{qt/qtbase}}/cmake_setup_running_tests_env_vars.yaml" diff --git a/coin/instructions/coin_module_test_template_v2.yaml b/coin/instructions/coin_module_test_template_v2.yaml index 25622763ff..423d292bf7 100644 --- a/coin/instructions/coin_module_test_template_v2.yaml +++ b/coin/instructions/coin_module_test_template_v2.yaml @@ -19,7 +19,3 @@ instructions: condition: property property: features contains_value: DisableTests - - - type: EnvironmentVariable - variableName: Dummy - variableValue: dummy diff --git a/coin/instructions/coin_module_test_template_v3.yaml b/coin/instructions/coin_module_test_template_v3.yaml index 4dee84fac9..de870b9d45 100644 --- a/coin/instructions/coin_module_test_template_v3.yaml +++ b/coin/instructions/coin_module_test_template_v3.yaml @@ -14,10 +14,7 @@ instructions: equals_property: target.os - condition: property property: target.osVersion - in_values: [QEMU, QNX_710] - - condition: property - property: target.osVersion - equals_value: IOS_ANY + in_values: [QEMU, QNX_710, IOS_ANY] - condition: property property: features contains_value: AndroidTestRun @@ -25,7 +22,3 @@ instructions: condition: property property: features contains_value: DisableTests - - - type: EnvironmentVariable - variableName: Dummy - variableValue: dummy diff --git a/coin/instructions/coin_qtbase_build_template_v2.yaml b/coin/instructions/coin_qtbase_build_template_v2.yaml index d29bc3ebb9..bcba742781 100644 --- a/coin/instructions/coin_qtbase_build_template_v2.yaml +++ b/coin/instructions/coin_qtbase_build_template_v2.yaml @@ -13,26 +13,51 @@ instructions: equals_property: target.os - condition: property property: target.osVersion - not_in_values: [QEMU, WebAssembly, INTEGRITY] + not_in_values: [QEMU, WebAssembly, INTEGRITY, VxWorks] - condition: property property: features not_contains_value: "TargetBuildOnly" + - condition: property + property: features + not_contains_value: "DebianPackaging" + - condition: runtime + env_var: AXIVION_ANALYSIS + not_equals_value: "1" + - type: Group + instructions: + - !include "{{qt/qtbase}}/coin_module_axivion_template_v2.yaml" + enable_if: + condition: runtime + env_var: AXIVION_ANALYSIS + equals_value: "1" - type: Group instructions: - - !include "{{qt/qtbase}}/cmake_cross_compilation_qtbase_build_instructions.yaml" + - type: Group + instructions: + - !include "{{qt/qtbase}}/cmake_cross_compilation_qtbase_build_instructions.yaml" + disable_if: + condition: and + conditions: + - condition: property + property: target.osVersion + equals_value: Android_ANY + - condition: property + property: target.arch + equals_value: Multi + - !include "{{qt/qtbase}}/prepare_android_multi_abi_env.yaml" - type: Group instructions: - !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts_target.yaml" enable_if: condition: property property: target.osVersion - in_values: [Android_ANY, QEMU, IOS_ANY, QNX_710, INTEGRITY] + in_values: [Android_ANY, QEMU, IOS_ANY, QNX_710, WebAssembly, INTEGRITY, VxWorks] enable_if: condition: or conditions: - condition: property property: target.osVersion - in_values: [IOS_ANY, Android_ANY, QEMU, QNX_710, WebAssembly, INTEGRITY] + in_values: [Android_ANY, QEMU, IOS_ANY, QNX_710, WebAssembly, INTEGRITY, VxWorks] - condition: and conditions: - condition: property @@ -41,3 +66,15 @@ instructions: - condition: property property: target.arch equals_value: ARM64 + - condition: property + property: features + not_contains_value: "DebianPackaging" + - type: Group + instructions: + - type: Group + instructions: + - !include "{{qt/qtbase}}/debian/debian_build_module.yaml" + enable_if: + condition: property + property: features + contains_value: "DebianPackaging" diff --git a/coin/instructions/debian/debian_build_module.yaml b/coin/instructions/debian/debian_build_module.yaml new file mode 100644 index 0000000000..0aa239e1c6 --- /dev/null +++ b/coin/instructions/debian/debian_build_module.yaml @@ -0,0 +1,125 @@ +type: Group +enable_if: + condition: property + property: features + contains_value: DebianPackaging +instructions: + - !include "{{qt/qtbase}}/debian/prepare_debian_env.yaml" + - type: EnvironmentVariable + variableName: GIT_SSH_COMMAND + variableValue: "ssh -o StrictHostKeyChecking=no" + - type: ChangeDirectory + directory: "{{.AgentWorkingDir}}" + - type: MakeDirectory + directory: output/debian_packages + - type: MakeDirectory + directory: debian_packages + - type: ExecuteCommand + command: "git clone git@git.qt.io:tqtc-debian/package_generator.git" + maxTimeInSeconds: 900 + maxTimeBetweenOutput: 900 + userMessageOnFailure: "Failed to clone package generator repo" + disable_if: + condition: runtime + env_var: COIN_SKIP_DEBIAN + contains_value: "MISSING_DEBIAN_INST" + - type: ExecuteCommand + command: "git clone -b 6.6 git@git.qt.io:tqtc-debian/qt6-{{.Env.TESTED_MODULE_PLAIN_COIN}}.git" + maxTimeInSeconds: 900 + maxTimeBetweenOutput: 900 + userMessageOnFailure: "Failed to clone debian packaging repo" + disable_if: + condition: runtime + env_var: COIN_SKIP_DEBIAN + contains_value: "MISSING_DEBIAN_INST" + - type: ChangeDirectory + directory: "qt6-{{.Env.TESTED_MODULE_PLAIN_COIN}}" + disable_if: + condition: runtime + env_var: COIN_SKIP_DEBIAN + contains_value: "MISSING_DEBIAN_INST" + - type: ExecuteCommand + command: "git checkout {{.Env.DEBIAN_RULES_REF}}" + maxTimeInSeconds: 900 + maxTimeBetweenOutput: 900 + userMessageOnFailure: "Failed to checkout debian rules branch" + disable_if: + condition: or + conditions: + - condition: runtime + env_var: DEBIAN_RULES_REF + equals_value: null + - condition: runtime + env_var: COIN_SKIP_DEBIAN + contains_value: "MISSING_DEBIAN_INST" + - type: ChangeDirectory + directory: "{{.AgentWorkingDir}}" + - type: ExecuteCommand + command: "wget -q {{.CoinDownloadURL}}/{{.Env.MODULE_SOURCES_RELATIVE_STORAGE_PATH}}" + maxTimeInSeconds: 900 + maxTimeBetweenOutput: 900 + userMessageOnFailure: "Failed get sources" + disable_if: + condition: runtime + env_var: COIN_SKIP_DEBIAN + contains_value: "MISSING_DEBIAN_INST" + - type: ExecuteCommand + command: "mv sources_unix.tar.gz qt-{{.Env.QT_REPO_MODULE_VERSION}}-{{.Env.TESTED_MODULE_PLAIN_COIN}}-src_{{.Env.QT_REPO_MODULE_VERSION}}.orig.tar.gz" + maxTimeInSeconds: 900 + maxTimeBetweenOutput: 900 + userMessageOnFailure: "Failed rename src pkg" + disable_if: + condition: runtime + env_var: COIN_SKIP_DEBIAN + contains_value: "MISSING_DEBIAN_INST" + - type: ChangeDirectory + directory: "{{.AgentWorkingDir}}/qt6-{{.Env.TESTED_MODULE_PLAIN_COIN}}" + disable_if: + condition: runtime + env_var: COIN_SKIP_DEBIAN + contains_value: "MISSING_DEBIAN_INST" + + + # rc is required currently by the script + - type: ExecuteCommand + command: "../package_generator/generate_packaging.sh --qt-version {{.Env.QT_REPO_MODULE_VERSION}} --deb-rev 1 --release tqtc-focal" + maxTimeInSeconds: 900 + maxTimeBetweenOutput: 900 + userMessageOnFailure: "Failed to generate pkg" + disable_if: + condition: runtime + env_var: COIN_SKIP_DEBIAN + contains_value: "MISSING_DEBIAN_INST" + - type: ChangeDirectory + directory: "{{.AgentWorkingDir}}" + - type: ExecuteCommand + command: "dpkg-source -b qt6-{{.Env.TESTED_MODULE_PLAIN_COIN}}" + maxTimeInSeconds: 900 + maxTimeBetweenOutput: 900 + userMessageOnFailure: "Failed dpkg-source" + disable_if: + condition: runtime + env_var: COIN_SKIP_DEBIAN + contains_value: "MISSING_DEBIAN_INST" + - type: ExecuteCommand + command: ["sbuild", + "--build-dep-resolver=apt", + "-sAd", "{{.Env.COIN_TARGET_DIST}}", + "-c", "{{.Env.COIN_SBUILD_CHROOT}}", + "--build-dir", "output/debian_packages", + "--extra-repository={{.Env.COIN_EXTRA_DEBIAN_REPO}}", + "--extra-package={{.Env.COIN_EXTRA_DEBIAN_PACKAGES}}", + "--extra-package={{.AgentWorkingDir}}/debian_packages/", + "qt-{{.Env.QT_REPO_MODULE_VERSION}}-{{.Env.TESTED_MODULE_PLAIN_COIN}}-src_{{.Env.QT_REPO_MODULE_VERSION}}-1.dsc"] + maxTimeInSeconds: 18000 + maxTimeBetweenOutput: 18000 + userMessageOnFailure: "Failed build debian packages" + disable_if: + condition: runtime + env_var: COIN_SKIP_DEBIAN + contains_value: "MISSING_DEBIAN_INST" + - type: UploadArtifact + archiveDirectory: "{{.AgentWorkingDir}}/output" + transferType: UploadModuleBuildArtifact + maxTimeInSeconds: 1200 + maxTimeBetweenOutput: 1200 diff --git a/coin/instructions/debian/prepare_debian_env.yaml b/coin/instructions/debian/prepare_debian_env.yaml new file mode 100644 index 0000000000..c51de2103c --- /dev/null +++ b/coin/instructions/debian/prepare_debian_env.yaml @@ -0,0 +1,82 @@ +type: Group +enable_if: + condition: property + property: features + contains_value: DebianPackaging +instructions: + - type: EnvironmentVariable + variableName: COIN_TARGET_DIST + variableValue: "tqtc-focal" + enable_if: + condition: runtime + env_var: COIN_TARGET_DIST + equals_value: null + - type: EnvironmentVariable + variableName: COIN_SBUILD_CHROOT + variableValue: "stable-arm64-sbuild" + enable_if: + condition: and + conditions: + - condition: runtime + env_var: COIN_SBUILD_CHROOT + equals_value: null + - condition: property + property: target.arch + equals_value: AARCH64 + - type: EnvironmentVariable + variableName: COIN_SBUILD_CHROOT + variableValue: "stable-amd64-sbuild" + enable_if: + condition: and + conditions: + - condition: runtime + env_var: COIN_SBUILD_CHROOT + equals_value: null + - condition: property + property: target.arch + equals_value: X86_64 + - type: EnvironmentVariable + variableName: COIN_SBUILD_DISTRO + variableValue: "arm64-focal" + enable_if: + condition: property + property: target.arch + equals_value: AARCH64 + - type: EnvironmentVariable + variableName: COIN_SBUILD_DISTRO + variableValue: "amd64-focal" + disable_if: + condition: property + property: target.arch + equals_value: AARCH64 + + - type: EnvironmentVariable + variableName: COIN_SKIP_DEBIAN + variableValue: "MISSING_DEBIAN_INST" + enable_if: + condition: runtime + env_var: COIN_SKIP_DEBIAN_MODULES + contains_value: "{{.Env.TESTED_MODULE_COIN}}" + + # Set version info to environment + - type: ParseEnvironmentVariableFromFile + regex: "QT_REPO_MODULE_VERSION \"(?P<QT_REPO_MODULE_VERSION>.*)\"" + filename: "{{.SourceDir}}/.cmake.conf" + maxTimeInSeconds: 300 + maxTimeBetweenOutput: 300 + userMessageOnFailure: "Failed to parse version information from .cmake.conf" + disable_if: + condition: runtime + env_var: TESTED_MODULE_COIN + equals_value: "qt5" + - type: ParseEnvironmentVariableFromFile + regex: "QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT \"(?P<QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT>.*)\"" + filename: "{{.SourceDir}}/.cmake.conf" + maxTimeInSeconds: 300 + maxTimeBetweenOutput: 300 + userMessageOnFailure: "Failed to parse status information from .cmake.conf" + disable_if: + condition: runtime + env_var: TESTED_MODULE_COIN + equals_value: "qt5" + diff --git a/coin/instructions/prepare_android_multi_abi_env.yaml b/coin/instructions/prepare_android_multi_abi_env.yaml new file mode 100644 index 0000000000..bbd83e600f --- /dev/null +++ b/coin/instructions/prepare_android_multi_abi_env.yaml @@ -0,0 +1,29 @@ +type: Group +instructions: + - type: EnvironmentVariable + variableName: INSTALL_DIR_FOR_CMAKE_TESTS + variableValue: "{{$android_artifact_path:=index .Env \"QT_CI_ARTIFACT_ID_PATH_Android-x86\"}}{{index .Env $android_artifact_path}}/install/target" + - type: AppendToEnvironmentVariable + variableName: COMMON_TARGET_TEST_CMAKE_ARGS + variableValue: " -DQT_PATH_ANDROID_ABI_arm64-v8a={{$android_artifact_path:=index .Env \"QT_CI_ARTIFACT_ID_PATH_Android-arm64-v8a\"}}{{index .Env $android_artifact_path}}/install/target" + - type: AppendToEnvironmentVariable + variableName: COMMON_TARGET_TEST_CMAKE_ARGS + variableValue: " -DQT_PATH_ANDROID_ABI_armeabi-v7a={{$android_artifact_path:=index .Env \"QT_CI_ARTIFACT_ID_PATH_Android-armeabi-v7a\"}}{{index .Env $android_artifact_path}}/install/target" + - type: AppendToEnvironmentVariable + variableName: COMMON_TARGET_TEST_CMAKE_ARGS + variableValue: " -DQT_PATH_ANDROID_ABI_x86={{$android_artifact_path:=index .Env \"QT_CI_ARTIFACT_ID_PATH_Android-x86\"}}{{index .Env $android_artifact_path}}/install/target" + - type: AppendToEnvironmentVariable + variableName: COMMON_TARGET_TEST_CMAKE_ARGS + variableValue: " -DQT_PATH_ANDROID_ABI_x86_64={{$android_artifact_path:=index .Env \"QT_CI_ARTIFACT_ID_PATH_Android-x86_64\"}}{{index .Env $android_artifact_path}}/install/target" + - type: AppendToEnvironmentVariable + variableName: COMMON_TARGET_TEST_CMAKE_ARGS + variableValue: " -DQT_HOST_PATH={{.Env.HOST_INSTALL_DIR}}" +enable_if: + condition: and + conditions: + - condition: property + property: target.osVersion + equals_value: Android_ANY + - condition: property + property: target.arch + equals_value: Multi diff --git a/coin/instructions/prepare_building_env.yaml b/coin/instructions/prepare_building_env.yaml index a94a42c3e2..a3ac5c3f0b 100644 --- a/coin/instructions/prepare_building_env.yaml +++ b/coin/instructions/prepare_building_env.yaml @@ -26,20 +26,15 @@ instructions: property: host.os equals_value: Windows + # Enable Axivion_analysis for Qt - type: EnvironmentVariable - variableName: LIBEXEC_INSTALL_DIR - variableValue: "{{.InstallDir}}\\bin\\" + variableName: AXIVION_ANALYSIS + variableValue: "1" enable_if: condition: property - property: host.os - equals_value: Windows - - type: EnvironmentVariable - variableName: LIBEXEC_INSTALL_DIR - variableValue: "{{.InstallDir}}/libexec/" - disable_if: - condition: property - property: host.os - equals_value: Windows + property: features + contains_value: Axivion + # Export ICC specific env. variables - type: Group @@ -138,9 +133,26 @@ instructions: variableName: TARGET_ARCHITECTURE variableValue: x64_arm64 enable_if: - condition: property - property: target.arch - equals_value: ARM64 + condition: and + conditions: + - condition: property + property: target.arch + equals_value: ARM64 + - condition: property + property: host.arch + equals_value: X86_64 + - type: EnvironmentVariable + variableName: TARGET_ARCHITECTURE + variableValue: arm64 + enable_if: + condition: and + conditions: + - condition: property + property: target.arch + in_values: ["AARCH64", "ARM64"] + - condition: property + property: host + equals_property: target - type: EnvironmentVariable # HACK. Overwrite TARGET_ARCHITECTURE as we do not use standard MSVC cross # compilation targets here. The target architecture will be detected by Qt. @@ -320,6 +332,14 @@ instructions: condition: property property: target.osVersion in_values: [QEMU] + # This fixes an issue where binfmts is sometimes disabled on the test VMs + - type: ExecuteCommand + command: sudo update-binfmts --enable + userMessageOnFailure: "Failed to enable binfmts" + enable_if: + condition: property + property: target.osVersion + equals_value: QEMU # Windows on Arm, cross-compilation with MSVC - type: Group @@ -337,6 +357,17 @@ instructions: variableName: TARGET_ENV_PREFIX variableValue: "c:\\users\\qt\\prefix.bat" + # VxWorks + - type: Group + enable_if: + condition: property + property: target.osVersion + equals_value: VxWorks + instructions: + - type: EnvironmentVariable + variableName: TARGET_ENV_PREFIX + variableValue: "{{.Env.VXWORKS_HOME}}/wrenv.linux" + # QNX variables - type: Group enable_if: @@ -453,6 +484,9 @@ instructions: - type: AppendToEnvironmentVariable variableName: COMMON_TEST_CMAKE_ARGS variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS" + - type: AppendToEnvironmentVariable + variableName: COMMON_EXAMPLES_CMAKE_ARGS + variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS" - type: AppendToEnvironmentVariable variableName: COMMON_TARGET_CMAKE_ARGS @@ -463,6 +497,9 @@ instructions: - type: AppendToEnvironmentVariable variableName: COMMON_TARGET_TEST_CMAKE_ARGS variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS" + - type: AppendToEnvironmentVariable + variableName: COMMON_TARGET_EXAMPLES_CMAKE_ARGS + variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS" # Sccache - type: Group @@ -476,6 +513,9 @@ instructions: - type: AppendToEnvironmentVariable variableName: COMMON_TEST_CMAKE_ARGS variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" + - type: AppendToEnvironmentVariable + variableName: COMMON_EXAMPLES_CMAKE_ARGS + variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" - type: AppendToEnvironmentVariable variableName: COMMON_TARGET_CMAKE_ARGS @@ -486,6 +526,9 @@ instructions: - type: AppendToEnvironmentVariable variableName: COMMON_TARGET_TEST_CMAKE_ARGS variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" + - type: AppendToEnvironmentVariable + variableName: COMMON_TARGET_EXAMPLES_CMAKE_ARGS + variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" enable_if: condition: property property: features @@ -493,6 +536,8 @@ instructions: # Specify a custom examples installation directory, so that the built example binaries are not # packaged into the artifact archive together with the Qt libraries. + # Also specify that during examples deployment, only a subset of examples should be deployed, to + # save time and space. - type: Group instructions: - type: AppendToEnvironmentVariable @@ -501,6 +546,24 @@ instructions: - type: AppendToEnvironmentVariable variableName: COMMON_TARGET_CMAKE_ARGS variableValue: " -DQT_INTERNAL_EXAMPLES_INSTALL_PREFIX={{unixPathSeparators .BuildDir}}/installed_examples" + - type: AppendToEnvironmentVariable + variableName: COMMON_CMAKE_ARGS + variableValue: " -DQT_DEPLOY_MINIMAL_EXAMPLES=ON" + - type: AppendToEnvironmentVariable + variableName: COMMON_TARGET_CMAKE_ARGS + variableValue: " -DQT_DEPLOY_MINIMAL_EXAMPLES=ON" + - type: Group + instructions: + - type: AppendToEnvironmentVariable + variableName: COMMON_CMAKE_ARGS + variableValue: " -DQT_INTERNAL_CI_NO_BUILD_IN_TREE_EXAMPLES=ON" + - type: AppendToEnvironmentVariable + variableName: COMMON_TARGET_CMAKE_ARGS + variableValue: " -DQT_INTERNAL_CI_NO_BUILD_IN_TREE_EXAMPLES=ON" + enable_if: + condition: property + property: features + contains_value: StandaloneExamples enable_if: # Only set the custom installation dir if examples are built. condition: or @@ -553,3 +616,59 @@ instructions: - condition: property property: host.os contains_value: Windows + + - type: EnvironmentVariable + variableName: HOST_INSTALL_DIR + variableValue: "{{$android_host_artifact_path := index .Env \"QT_CI_ARTIFACT_ID_PATH_Android-host\" }}{{index .Env $android_host_artifact_path}}/install" + enable_if: + condition: and + conditions: + - condition: property + property: target.osVersion + equals_value: Android_ANY + - condition: property + property: target.arch + equals_value: Multi + + - type: EnvironmentVariable + variableName: HOST_INSTALL_DIR + variableValue: "{{.InstallDir}}" + disable_if: + condition: and + conditions: + - condition: property + property: target.osVersion + equals_value: Android_ANY + - condition: property + property: target.arch + equals_value: Multi + + - type: EnvironmentVariable + variableName: LIBEXEC_INSTALL_DIR + variableValue: "{{.Env.HOST_INSTALL_DIR}}\\bin\\" + enable_if: + condition: property + property: host.os + equals_value: Windows + - type: EnvironmentVariable + variableName: LIBEXEC_INSTALL_DIR + variableValue: "{{.Env.HOST_INSTALL_DIR}}/libexec/" + disable_if: + condition: property + property: host.os + equals_value: Windows + + - type: EnvironmentVariable + variableName: COIN_COMMAND_OUTPUT_TIMEOUT + variableValue: "900" + disable_if: + condition: property + property: features + contains_value: UseAddressSanitizer + - type: EnvironmentVariable + variableName: COIN_COMMAND_OUTPUT_TIMEOUT + variableValue: "10800" + enable_if: + condition: property + property: features + contains_value: UseAddressSanitizer diff --git a/coin/instructions/prepare_configure_module_executable.yaml b/coin/instructions/prepare_configure_module_executable.yaml index 055870e8a6..a28359e3fd 100644 --- a/coin/instructions/prepare_configure_module_executable.yaml +++ b/coin/instructions/prepare_configure_module_executable.yaml @@ -12,14 +12,14 @@ instructions: instructions: - type: EnvironmentVariable variableName: CONFIGURE_EXECUTABLE - variableValue: "{{.InstallDir}}{{.Env.INSTALL_DIR_SUFFIX}}/bin/qt-configure-module" + variableValue: "{{.InstallDir}}{{.Env.INSTALL_DIR_SUFFIX}}{{.Env.CI_PATH_SEP}}bin{{.Env.CI_PATH_SEP}}qt-configure-module" disable_if: condition: property property: host.os equals_value: Windows - type: EnvironmentVariable variableName: CONFIGURE_EXECUTABLE - variableValue: "{{.InstallDir}}{{.Env.INSTALL_DIR_SUFFIX}}\\bin\\qt-configure-module.bat" + variableValue: "{{.InstallDir}}{{.Env.INSTALL_DIR_SUFFIX}}{{.Env.CI_PATH_SEP}}bin{{.Env.CI_PATH_SEP}}qt-configure-module.bat" enable_if: condition: property property: host.os @@ -32,14 +32,14 @@ instructions: instructions: - type: EnvironmentVariable variableName: CONFIGURE_EXECUTABLE - variableValue: "{{.InstallDir}}{{.Env.INSTALL_DIR_SUFFIX}}/bin/qt-cmake-private" + variableValue: "{{.InstallDir}}{{.Env.INSTALL_DIR_SUFFIX}}{{.Env.CI_PATH_SEP}}libexec{{.Env.CI_PATH_SEP}}qt-cmake-private" disable_if: condition: property property: host.os equals_value: Windows - type: EnvironmentVariable variableName: CONFIGURE_EXECUTABLE - variableValue: "{{.InstallDir}}{{.Env.INSTALL_DIR_SUFFIX}}\\bin\\qt-cmake-private.bat" + variableValue: "{{.InstallDir}}{{.Env.INSTALL_DIR_SUFFIX}}{{.Env.CI_PATH_SEP}}bin{{.Env.CI_PATH_SEP}}qt-cmake-private.bat" enable_if: condition: property property: host.os diff --git a/coin/instructions/qmake/ensure_pro_file.cmake b/coin/instructions/qmake/ensure_pro_file.cmake index 0dd8b4a8e7..d879128601 100644 --- a/coin/instructions/qmake/ensure_pro_file.cmake +++ b/coin/instructions/qmake/ensure_pro_file.cmake @@ -1,3 +1,6 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + # CMake script to ensure that a qmake project file exists. # # Usage: cmake -DPRO_FILE=.../project.pro -P .../ensure_pro_file.cmake diff --git a/coin/instructions/qmake_examples/build_qmake_examples_instructions.yaml b/coin/instructions/qmake_examples/build_qmake_examples_instructions.yaml index dc3417a05c..bbc31f7676 100644 --- a/coin/instructions/qmake_examples/build_qmake_examples_instructions.yaml +++ b/coin/instructions/qmake_examples/build_qmake_examples_instructions.yaml @@ -21,7 +21,11 @@ instructions: - condition: runtime env_var: COIN_CMAKE_ARGS contains_value: "QT_BUILD_EXAMPLES=ON" - # covers all cases for UseConfigure configs + # host case - condition: runtime - env_var: COIN_CONFIGURE_ARGS + env_var: CONFIGURE_ARGS + contains_value: "-make examples" + # target case + - condition: runtime + env_var: TARGET_CONFIGURE_ARGS contains_value: "-make examples" diff --git a/coin/module_config.yaml b/coin/module_config.yaml index 868b37f3dc..118881159b 100644 --- a/coin/module_config.yaml +++ b/coin/module_config.yaml @@ -4,6 +4,12 @@ accept_configuration: property: features not_contains_value: Disable +machine_type: + Build: + cores: 8 + Test: + cores: 4 + instructions: Build: - !include "{{qt/qtbase}}/coin_qtbase_build_template_v2.yaml" |