diff options
Diffstat (limited to 'coin')
43 files changed, 1586 insertions, 276 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/README.md b/coin/instructions/README.md index aaefe3696f..f366642395 100644 --- a/coin/instructions/README.md +++ b/coin/instructions/README.md @@ -18,3 +18,61 @@ the ability to build and run tests for ``qemu`` cross-compiling configurations. * ``coin_module_test_template_v3`` changed the run test instructions to not ignore the exit code and thus enforce that tests pass in the CI. + +# Environment variable description and usage + +The following environment variables are used in Coin instructions when building Qt, tests, etc: + +`CONFIGURE_ARGS` - contains platform-specific ``configure-style`` arguments + (e.g. `-shared`), that will be passed to a qtbase configure call +`CMAKE_ARGS` - contains platform-specific ``CMake-style`` arguments + (e.g. `-DOPENSSL_ROOT_DIR=Foo`) that will be passed to a qtbase + configure call +`NON_QTBASE_CONFIGURE_ARGS` - contains platform-specific ``configure-style`` arguments + that will be passed to a non-qtbase qt-configure-module call +`NON_QTBASE_CMAKE_ARGS` - contains platform-specific ``CMake-style`` arguments + that will be passed to a non-qtbase qt-configure-module call +`COMMON_CMAKE_ARGS` - platform-independent ``CMake-style`` args set in + `prepare_building_env.yaml` that apply to qtbase configurations + only. +`COMMON_NON_QTBASE_CMAKE_ARGS` - platform-independent ``CMake-style`` args set in + `prepare_building_env.yaml` that apply to + configuration of repos other than qtbase +`COMMON_TEST_CMAKE_ARGS` - platform-independent ``CMake-style`` args set in + `prepare_building_env.yaml` that apply to configuration of + all standalone tests + +All of the above apply to host builds only. + +There is a a set of environment variables that apply to target builds when cross-compiling which +mirror the ones above. They are: + +`TARGET_CONFIGURE_ARGS` +`TARGET_CMAKE_ARGS` +`NON_QTBASE_TARGET_CONFIGURE_ARGS` +`NON_QTBASE_TARGET_CMAKE_ARGS` + +`COMMON_TARGET_CMAKE_ARGS` +`COMMON_NON_QTBASE_TARGET_CMAKE_ARGS` +`COMMON_TARGET_TEST_CMAKE_ARGS` + +Currently, there are no common ``configure-style`` variables for configuring +repos or tests, only ``CMake-style` ones. + + +`COIN_CMAKE_ARGS` contains the final set of cmake args that is passed to +`configure` / `qt-configure-module`, it is built up from the variables above + any additional values added +by custom instructions, like specification of `CMAKE_INSTALL_PREFIX` etc. + +`INSTALL_DIR_SUFFIX` is used to append either `/host` or `/target` suffixes to install paths in +instructions when cross-building. + +`CONFIGURE_EXECUTABLE` contains a platform-specific path to `configure` / `qt-configure-module` +or `cmake`/ `qt-cmake` depending on whether `UseConfigure` feature is enabled. + +`CONFIGURE_ENV_PREFIX` contains the value of either `ENV_PREFIX` or `TARGET_ENV_PREFIX` depending on +whether it's a cross-build configure call. The values are used when configuring and building, to ensure +that things like compilers are found correctly. + +We use `unixPathSeparators` to pass an install prefix with forward slashes even on Windows, +to avoid escaping issues when using configure. diff --git a/coin/instructions/call_cmake.yaml b/coin/instructions/call_cmake_for_standalone_examples.yaml index 96227c1f6a..eb811cbea4 100644 --- a/coin/instructions/call_cmake.yaml +++ b/coin/instructions/call_cmake_for_standalone_examples.yaml @@ -1,23 +1,25 @@ type: Group instructions: + - type: ChangeDirectory + directory: "{{.BuildDir}}" - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} {{.InstallDir}}\\bin\\qt-cmake-private {{.Env.COIN_CMAKE_ARGS}}" + 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 cmake. + Failed to call configure examples. enable_if: condition: property property: host.os equals_value: Windows - type: ExecuteCommand - command: "{{.InstallDir}}/bin/qt-cmake-private {{.Env.COIN_CMAKE_ARGS}}" + 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 cmake. + Failed to call configure examples. disable_if: condition: property property: host.os diff --git a/coin/instructions/call_host_cmake.yaml b/coin/instructions/call_configure_module.yaml index 4182f9b622..e3b28503aa 100644 --- a/coin/instructions/call_host_cmake.yaml +++ b/coin/instructions/call_configure_module.yaml @@ -1,7 +1,8 @@ type: Group instructions: + - !include "{{qt/qtbase}}/prepare_configure_module_executable.yaml" - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} {{.InstallDir}}\\host\\bin\\qt-cmake-private {{.Env.COIN_CMAKE_ARGS}}" + command: "{{.Env.CONFIGURE_ENV_PREFIX}} {{.Env.CONFIGURE_EXECUTABLE}} {{.SourceDir}} {{.Env.COIN_CONFIGURE_ARGS}} -- {{.Env.COIN_CMAKE_ARGS}}" executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution maxTimeInSeconds: 6000 maxTimeBetweenOutput: 1200 @@ -9,10 +10,10 @@ instructions: Failed to call cmake. enable_if: condition: property - property: host.os - equals_value: Windows + property: features + contains_value: UseConfigure - type: ExecuteCommand - command: "{{.InstallDir}}/host/bin/qt-cmake-private {{.Env.COIN_CMAKE_ARGS}}" + command: "{{.Env.CONFIGURE_ENV_PREFIX}} {{.Env.CONFIGURE_EXECUTABLE}} {{.SourceDir}} {{.Env.COIN_CONFIGURE_ARGS}} {{.Env.COIN_CMAKE_ARGS}}" executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution maxTimeInSeconds: 6000 maxTimeBetweenOutput: 1200 @@ -20,5 +21,5 @@ instructions: Failed to call cmake. disable_if: condition: property - property: host.os - equals_value: Windows + property: features + contains_value: UseConfigure diff --git a/coin/instructions/call_configure_qtbase.yaml b/coin/instructions/call_configure_qtbase.yaml new file mode 100644 index 0000000000..c08d7151ca --- /dev/null +++ b/coin/instructions/call_configure_qtbase.yaml @@ -0,0 +1,27 @@ +type: Group +instructions: + - !include "{{qt/qtbase}}/prepare_configure_executable.yaml" + - type: ExecuteCommand + # There is no SourceDir on purpose, because configure is called directly from qtbase, + # so the script knows it's own source dir. + command: "{{.Env.CONFIGURE_ENV_PREFIX}} {{.Env.CONFIGURE_EXECUTABLE}} {{.Env.COIN_CONFIGURE_ARGS}} -- {{.Env.COIN_CMAKE_ARGS}}" + executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to call cmake. + enable_if: + condition: property + property: features + contains_value: UseConfigure + - type: ExecuteCommand + command: "{{.Env.CONFIGURE_ENV_PREFIX}} {{.Env.CONFIGURE_EXECUTABLE}} {{.SourceDir}} {{.Env.COIN_CONFIGURE_ARGS}} {{.Env.COIN_CMAKE_ARGS}}" + executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to call cmake. + disable_if: + condition: property + property: features + contains_value: UseConfigure 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_cmake.yaml b/coin/instructions/call_target_cmake.yaml deleted file mode 100644 index e8dc7f3f97..0000000000 --- a/coin/instructions/call_target_cmake.yaml +++ /dev/null @@ -1,24 +0,0 @@ -type: Group -instructions: - - type: ExecuteCommand - command: "{{.Env.TARGET_ENV_PREFIX}} {{.InstallDir}}\\target\\bin\\qt-cmake-private {{.Env.COIN_CMAKE_ARGS}}" - executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution - maxTimeInSeconds: 6000 - maxTimeBetweenOutput: 1200 - userMessageOnFailure: > - Failed to call cmake. - enable_if: - condition: property - property: host.os - equals_value: Windows - - type: ExecuteCommand - command: "{{.Env.TARGET_ENV_PREFIX}} {{.InstallDir}}/target/bin/qt-cmake-private {{.Env.COIN_CMAKE_ARGS}}" - executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution - maxTimeInSeconds: 6000 - maxTimeBetweenOutput: 1200 - userMessageOnFailure: > - Failed to call cmake. - disable_if: - condition: property - property: host.os - equals_value: Windows 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 e4cb9bfb19..7fa663e4d2 100644 --- a/coin/instructions/cmake_build_and_upload_test_artifacts.yaml +++ b/coin/instructions/cmake_build_and_upload_test_artifacts.yaml @@ -10,14 +10,14 @@ instructions: directory: "{{.BuildDir}}" - type: AppendToEnvironmentVariable variableName: COIN_CMAKE_ARGS - variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -S {{.SourceDir}} -B ." + variableValue: " -S {{.SourceDir}} -B ." disable_if: condition: runtime env_var: COIN_CMAKE_ARGS equals_value: null - type: EnvironmentVariable variableName: COIN_CMAKE_ARGS - variableValue: "-DCMAKE_AUTOGEN_VERBOSE=ON -S {{.SourceDir}} -B ." + variableValue: "-S {{.SourceDir}} -B ." enable_if: condition: runtime env_var: COIN_CMAKE_ARGS @@ -48,13 +48,22 @@ 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" maxTimeInSeconds: 6000 maxTimeBetweenOutput: 4800 userMessageOnFailure: > - Failed to build sources. In the current state bug can be everywhere. + Failed to build sources. - type: UploadTestArtifact transferType: UploadModuleTestsArtifact archiveDirectory: "{{.BuildDir}}" 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 847d095da9..bc16368fc2 100644 --- a/coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml +++ b/coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml @@ -10,9 +10,14 @@ instructions: variableValue: "{{.InstallDir}}" - type: EnvironmentVariable variableName: COIN_CMAKE_ARGS - variableValue: "{{.Env.TEST_CONFIGURE_ARGS}}" + 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 b34d408f4a..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.TARGET_TEST_CONFIGURE_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 8df1720be6..a62ab0f48e 100644 --- a/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml +++ b/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml @@ -30,20 +30,62 @@ instructions: directory: "{{.SourceDir}}/build/host" - type: ChangeDirectory directory: "{{.BuildDir}}" + + - type: EnvironmentVariable + variableName: COIN_CONFIGURE_ARGS + variableValue: "{{.Env.NON_QTBASE_CONFIGURE_ARGS}}" - type: EnvironmentVariable variableName: COIN_CMAKE_ARGS - # The lack of space between the non qtbase configure args and the rest of the args is important! - variableValue: "{{.Env.NON_QTBASE_CONFIGURE_ARGS}} -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON {{.SourceDir}}" - - !include "{{qt/qtbase}}/call_host_cmake.yaml" + variableValue: "{{.Env.NON_QTBASE_CMAKE_ARGS}} {{.Env.COMMON_NON_QTBASE_CMAKE_ARGS}}" + - type: EnvironmentVariable + variableName: CONFIGURE_ENV_PREFIX + variableValue: "{{.Env.ENV_PREFIX}}" + - !include "{{qt/qtbase}}/prepare_install_dir_suffix_host.yaml" + - !include "{{qt/qtbase}}/call_configure_module.yaml" + - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel -v" + command: "{{.Env.CONFIGURE_ENV_PREFIX}} cmake --build . --parallel -v" maxTimeInSeconds: "{{.Env.CMAKE_BUILD_TIMEOUT}}" maxTimeBetweenOutput: "{{.Env.CMAKE_BUILD_OUTPUT_TIMEOUT}}" userMessageOnFailure: > - Failed to build sources. In the current state bug can be everywhere. + Failed to build sources. + - type: EnvironmentVariable + variableName: COIN_CMAKE_INSTALL_DIR + variableValue: "{{.InstallDir}}{{.Env.CI_PATH_SEP}}host" - type: EnvironmentVariable - variableName: COIN_CMAKE_INSTALL_SCRIPT_PATH - variableValue: "{{.InstallDir}}/host" + 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 @@ -60,20 +102,62 @@ instructions: directory: "{{.SourceDir}}/build/target" - type: ChangeDirectory directory: "{{.BuildDir}}" + + - type: EnvironmentVariable + variableName: COIN_CONFIGURE_ARGS + variableValue: "{{.Env.NON_QTBASE_TARGET_CONFIGURE_ARGS}}" - type: EnvironmentVariable variableName: COIN_CMAKE_ARGS - # The lack of space between the non qtbase configure args and the rest of the args is important! - variableValue: "{{.Env.NON_QTBASE_TARGET_CONFIGURE_ARGS}} -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON {{.SourceDir}}" - - !include "{{qt/qtbase}}/call_target_cmake.yaml" + variableValue: "{{.Env.NON_QTBASE_TARGET_CMAKE_ARGS}} {{.Env.COMMON_NON_QTBASE_TARGET_CMAKE_ARGS}}" + - type: EnvironmentVariable + variableName: CONFIGURE_ENV_PREFIX + variableValue: "{{.Env.TARGET_ENV_PREFIX}}" + - !include "{{qt/qtbase}}/prepare_install_dir_suffix_target.yaml" + - !include "{{qt/qtbase}}/call_configure_module.yaml" + - type: ExecuteCommand - command: "{{.Env.TARGET_ENV_PREFIX}} cmake --build . --parallel -v" + command: "{{.Env.CONFIGURE_ENV_PREFIX}} cmake --build . --parallel -v" maxTimeInSeconds: "{{.Env.CMAKE_BUILD_TIMEOUT}}" maxTimeBetweenOutput: "{{.Env.CMAKE_BUILD_OUTPUT_TIMEOUT}}" userMessageOnFailure: > - Failed to build sources. In the current state bug can be everywhere. + Failed to build sources. + - type: EnvironmentVariable + variableName: COIN_CMAKE_INSTALL_DIR + variableValue: "{{.InstallDir}}{{.Env.CI_PATH_SEP}}target" - type: EnvironmentVariable - variableName: COIN_CMAKE_INSTALL_SCRIPT_PATH - variableValue: "{{.InstallDir}}/target" + 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 @@ -90,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 9ca8d4e672..84dc535b61 100644 --- a/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml +++ b/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml @@ -16,22 +16,62 @@ instructions: directory: "{{.SourceDir}}/build/host" - type: ChangeDirectory directory: "{{.BuildDir}}" + + - type: EnvironmentVariable + variableName: COIN_CONFIGURE_ARGS + variableValue: "{{.Env.CONFIGURE_ARGS}}" + - type: EnvironmentVariable + variableName: COIN_CMAKE_ARGS + # Use unix separators even on Windows, to avoid escaping issues the in configure script. + variableValue: "{{.Env.CMAKE_ARGS}} {{.Env.COMMON_CMAKE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{unixPathSeparators .InstallDir}}/host" + - type: EnvironmentVariable + variableName: CONFIGURE_ENV_PREFIX + variableValue: "{{.Env.ENV_PREFIX}}" + - !include "{{qt/qtbase}}/call_configure_qtbase.yaml" + - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}}/host -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON {{.SourceDir}}" - executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution - maxTimeInSeconds: 6000 - maxTimeBetweenOutput: 1200 - userMessageOnFailure: > - Failed to call cmake. - - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel -v" + command: "{{.Env.CONFIGURE_ENV_PREFIX}} cmake --build . --parallel -v" maxTimeInSeconds: 6000 maxTimeBetweenOutput: 4800 userMessageOnFailure: > - Failed to build sources. In the current state bug can be everywhere. + 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 @@ -48,36 +88,77 @@ instructions: directory: "{{.SourceDir}}/build/target" - type: ChangeDirectory directory: "{{.BuildDir}}" + - type: AppendToEnvironmentVariable - variableName: TARGET_CONFIGURE_ARGS + variableName: TARGET_CMAKE_ARGS variableValue: " -DQT_HOST_PATH={{.AgentWorkingDir}}/install" disable_if: condition: property property: platformDependency equals_value: null - type: AppendToEnvironmentVariable - variableName: TARGET_CONFIGURE_ARGS + variableName: TARGET_CMAKE_ARGS variableValue: " -DQT_HOST_PATH={{.InstallDir}}/host" enable_if: condition: property property: platformDependency equals_value: null + + - type: EnvironmentVariable + variableName: COIN_CONFIGURE_ARGS + variableValue: "{{.Env.TARGET_CONFIGURE_ARGS}}" + - type: EnvironmentVariable + variableName: COIN_CMAKE_ARGS + # Use unix separators even on Windows, to avoid escaping issues in the configure script. + variableValue: "{{.Env.TARGET_CMAKE_ARGS}} {{.Env.COMMON_TARGET_CMAKE_ARGS}} -DCMAKE_STAGING_PREFIX:PATH={{unixPathSeparators .InstallDir}}/target" + - type: EnvironmentVariable + variableName: CONFIGURE_ENV_PREFIX + variableValue: "{{.Env.TARGET_ENV_PREFIX}}" + - !include "{{qt/qtbase}}/call_configure_qtbase.yaml" + - type: ExecuteCommand - command: "{{.Env.TARGET_ENV_PREFIX}} cmake {{.Env.TARGET_CONFIGURE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}}/target -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON {{.SourceDir}}" - executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution - maxTimeInSeconds: 6000 - maxTimeBetweenOutput: 1200 - userMessageOnFailure: > - Failed to call cmake. - - type: ExecuteCommand - command: "{{.Env.TARGET_ENV_PREFIX}} cmake --build . --parallel -v" + command: "{{.Env.CONFIGURE_ENV_PREFIX}} cmake --build . --parallel -v" maxTimeInSeconds: 6000 maxTimeBetweenOutput: 4800 userMessageOnFailure: > - Failed to build sources. In the current state bug can be everywhere. + 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 @@ -94,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_documentation_build.yaml b/coin/instructions/cmake_documentation_build.yaml index 2675e63c48..9630b503a1 100644 --- a/coin/instructions/cmake_documentation_build.yaml +++ b/coin/instructions/cmake_documentation_build.yaml @@ -1,19 +1,19 @@ type: Group instructions: - type: ChangeDirectory - directory: "{{.SourceDir}}" + directory: "{{.SourceDir}}_build" # If documentation feature is present, Coin installs top-level documentation # built by product(qt5) build into <module_name>_doc_build/doc. Coin will # silently omit installing the top-level documentations if not built by the product. - type: ExecuteCommand - command: "rsync -a {{.SourceDir}}_doc_build/doc {{.SourceDir}}" + command: "rsync -a {{.SourceDir}}_doc_build/doc {{.SourceDir}}_build" maxTimeInSeconds: 300 maxTimeBetweenOutput: 300 userMessageOnFailure: Failed to copy top-level docs to build dir. # Filter list is created to exclude everything else than the # generated documentation from the documentation archive. - type: CreateFileListFromDirectory - directory: "{{.SourceDir}}/doc" + directory: "{{.SourceDir}}_build/doc" filterListFileName: "doc_build_filter" userMessageOnFailure: "Failed to create filter list for docs" - type: ExecuteCommand @@ -22,7 +22,7 @@ instructions: maxTimeBetweenOutput: 1200 userMessageOnFailure: Failed to generate documentation. - type: UploadArtifact - archiveDirectory: "{{.SourceDir}}/doc" + archiveDirectory: "{{.SourceDir}}_build/doc" transferType: UploadModuleDocumentation filterListFileName: "doc_build_filter" maxTimeInSeconds: 1200 diff --git a/coin/instructions/cmake_module_build_instructions.yaml b/coin/instructions/cmake_module_build_instructions.yaml index b53e6a8375..a589941701 100644 --- a/coin/instructions/cmake_module_build_instructions.yaml +++ b/coin/instructions/cmake_module_build_instructions.yaml @@ -1,16 +1,27 @@ type: Group instructions: + - type: ChangeDirectory + directory: "{{.SourceDir}}" - type: MakeDirectory directory: .git + - type: MakeDirectory + directory: "{{.SourceDir}}_build" - type: SetBuildDirectory - directory: "{{.SourceDir}}" + directory: "{{.SourceDir}}_build" - type: ChangeDirectory directory: "{{.BuildDir}}" + + - type: EnvironmentVariable + variableName: COIN_CONFIGURE_ARGS + variableValue: "{{.Env.NON_QTBASE_CONFIGURE_ARGS}}" - type: EnvironmentVariable variableName: COIN_CMAKE_ARGS - # The lack of space between the non qtbase configure args and the rest of the args is important! - variableValue: "{{.Env.NON_QTBASE_CONFIGURE_ARGS}} -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON {{.SourceDir}}" - - !include "{{qt/qtbase}}/call_cmake.yaml" + variableValue: "{{.Env.NON_QTBASE_CMAKE_ARGS}} {{.Env.COMMON_NON_QTBASE_CMAKE_ARGS}}" + - type: EnvironmentVariable + variableName: CONFIGURE_ENV_PREFIX + variableValue: "{{.Env.ENV_PREFIX}}" + - !include "{{qt/qtbase}}/call_configure_module.yaml" + - type: EnvironmentVariable variableName: CMAKE_BUILD_TIMEOUT variableValue: "6000" @@ -26,14 +37,38 @@ instructions: env_var: CMAKE_BUILD_OUTPUT_TIMEOUT equals_value: null - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel -v" + command: "{{.Env.CONFIGURE_ENV_PREFIX}} cmake --build . --parallel -v" maxTimeInSeconds: "{{.Env.CMAKE_BUILD_TIMEOUT}}" maxTimeBetweenOutput: "{{.Env.CMAKE_BUILD_OUTPUT_TIMEOUT}}" userMessageOnFailure: > - Failed to build sources. In the current state bug can be everywhere. + 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 @@ -41,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 @@ -55,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 b7ba32daff..01eb7f3264 100644 --- a/coin/instructions/cmake_qtbase_build_instructions.yaml +++ b/coin/instructions/cmake_qtbase_build_instructions.yaml @@ -1,27 +1,71 @@ type: Group instructions: + - type: ChangeDirectory + directory: "{{.SourceDir}}" - type: MakeDirectory directory: .git + - type: MakeDirectory + directory: "{{.SourceDir}}_build" - type: SetBuildDirectory - directory: "{{.SourceDir}}" + directory: "{{.SourceDir}}_build" - type: ChangeDirectory directory: "{{.BuildDir}}" + + - type: EnvironmentVariable + variableName: COIN_CONFIGURE_ARGS + variableValue: "{{.Env.CONFIGURE_ARGS}}" + - type: EnvironmentVariable + variableName: COIN_CMAKE_ARGS + # Use unix separators even on Windows, to avoid escaping issues in the configure script. + variableValue: "{{.Env.CMAKE_ARGS}} {{.Env.COMMON_CMAKE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{unixPathSeparators .InstallDir}}" + - type: EnvironmentVariable + variableName: CONFIGURE_ENV_PREFIX + variableValue: "{{.Env.ENV_PREFIX}}" + - !include "{{qt/qtbase}}/call_configure_qtbase.yaml" + - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}} -DQT_BUILD_TESTS=OFF {{.SourceDir}}" - executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution - maxTimeInSeconds: 6000 - maxTimeBetweenOutput: 1200 - userMessageOnFailure: > - Failed to call cmake. - - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel -v" + command: "{{.Env.CONFIGURE_ENV_PREFIX}} cmake --build . --parallel -v" maxTimeInSeconds: 6000 maxTimeBetweenOutput: 1200 userMessageOnFailure: > - Failed to build sources. In the current state bug can be everywhere. + 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 @@ -29,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 @@ -43,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 fecf283905..a7039b5015 100644 --- a/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml +++ b/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml @@ -10,23 +10,33 @@ instructions: equals_value: Windows - type: EnvironmentVariable variableName: TESTRUNNER - variableValue: "python3 {{.SourceDir}}/coin_ctest_runner.py" + variableValue: "{{.Env.LIBEXEC_INSTALL_DIR}}qt-testrunner.py --" + # Running wasm tests with the coin testrunner is not yet implemented disable_if: - condition: or - conditions: - - condition: property - property: host.os - equals_value: Windows - - condition: property - property: features - contains_value: AndroidTestRun - - type: EnvironmentVariable + condition: property + property: target.osVersion + in_values: [WebAssembly] + - type: AppendToEnvironmentVariable variableName: TESTRUNNER - variableValue: "{{.SourceDir}}\\coin_ctest_runner.py" + variableValue: " {{.SourceDir}}/coin_qnx_qemu_runner.sh" enable_if: condition: property - property: host.os - equals_value: Windows + property: target.osVersion + in_values: [QNX_710] + - type: Group + enable_if: + condition: property + property: features + contains_value: UseAddressSanitizer + instructions: + - type: EnvironmentVariable + variableName: ASAN_OPTIONS + 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. + variableName: TESTRUNNER + variableValue: "{{.Env.LIBEXEC_INSTALL_DIR}}sanitizer-testrunner.py" - type: EnvironmentVariable variableName: COIN_CTEST_RESULTSDIR variableValue: "{{.AgentWorkingDir}}\\testresults" @@ -41,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 --rerun-failed --force-new-ctest-process --repeat until-pass:5" + 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" @@ -51,17 +76,49 @@ 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. - type: Group instructions: + # Qttestrunner does not work with bic tests. + - type: EnvironmentVariable + variableName: TESTRUNNER + variableValue: "" - type: EnvironmentVariable variableName: QT_MODULE_TO_TEST variableValue: "{{.SourceDir}}" diff --git a/coin/instructions/cmake_setup_running_qnxqemu_tests_env_vars.yaml b/coin/instructions/cmake_setup_running_qnxqemu_tests_env_vars.yaml index 031e3eb4c1..0fb9768a15 100644 --- a/coin/instructions/cmake_setup_running_qnxqemu_tests_env_vars.yaml +++ b/coin/instructions/cmake_setup_running_qnxqemu_tests_env_vars.yaml @@ -1,40 +1,20 @@ type: Group instructions: - type: WriteFile + filename: "{{.SourceDir}}/coin_qnx_qemu_runner.sh" + fileMode: 493 fileContents: | - #!/usr/bin/python3 - import subprocess - import calendar - import datetime - import time - import sys - import os - import re + #!/bin/sh - file=os.path.basename(sys.argv[1]) - timestamp = str(round(time.time() * 1000)) - resultdir = os.getenv('COIN_CTEST_RESULTSDIR') - results_file = resultdir + "/testresults/" + file +"-" + timestamp + ".xml,xml" - testargs = [" -o", results_file, "-o", "-,txt"] - if re.search("testlib.selftests.tst_selftests", sys.argv[1]): - testargs = [] - testcmd = sys.argv[1] - testcmd += ' '.join(testargs) - qemuargs = os.getenv('TESTARGS') - sshcmd, ldenv, backend, qpa = qemuargs.split() - testdir = sys.argv[1][::-1].split('/', 1)[1][::-1] - testcmd = "cd " + testdir + ";" + ldenv + " " + backend + " " + qpa + " " + testcmd - proc = subprocess.run(["ssh", sshcmd, testcmd]) - exit(proc.returncode) - filename: "{{.SourceDir}}/coin_qnx_qemu_runner.py" - fileMode: 755 - - type: ExecuteCommand - command: "chmod 755 {{.SourceDir}}/coin_qnx_qemu_runner.py" - maxTimeInSeconds: 10 - maxTimeBetweenOutput: 10 - userMessageOnFailure: > - Failed to change file permission. - disable_if: - condition: property - property: host.os - equals_value: Windows + # Many tests require changing into their directory, in order to find + # files they depend on. + testdir=`dirname "$1"` + + # The remote SSH server executes everything we send under "sh -c". So + # the only way to preserve arguments is to shell-quote them and send + # them as a single string. We use python's shlex module for that. + + quoted_args=`python3 -c 'import sys, shlex; print(shlex.join(sys.argv[1:]))' "$@"` + + ssh "$QNX_QEMU_SSH" \ + cd "$testdir" \; $QNX_TEST_ENV "$quoted_args" diff --git a/coin/instructions/cmake_setup_running_tests_env_vars.yaml b/coin/instructions/cmake_setup_running_tests_env_vars.yaml index c1a83eae07..b9387d74c6 100644 --- a/coin/instructions/cmake_setup_running_tests_env_vars.yaml +++ b/coin/instructions/cmake_setup_running_tests_env_vars.yaml @@ -5,38 +5,6 @@ instructions: - type: EnvironmentVariable variableName: QTEST_ENVIRONMENT variableValue: "ci" - - type: WriteFile - fileContents: | - #!/usr/bin/python3 - import subprocess - import calendar - import datetime - import time - import sys - import os - import re - from os.path import expanduser - home = expanduser("~") - - file=os.path.basename(sys.argv[1]) - timestamp = str(round(time.time() * 1000)) - results_file = home + "/work/testresults/" + file +"-" + timestamp + ".xml,xml" - testargs = ["-o", results_file, "-o", "-,txt"] - if re.search("testlib.selftests.tst_selftests", sys.argv[1]): - testargs = [] - exit(subprocess.call([sys.argv[1]] + testargs)) - filename: "{{.SourceDir}}/coin_ctest_runner.py" - fileMode: 755 - - type: ExecuteCommand - command: "chmod 755 {{.SourceDir}}/coin_ctest_runner.py" - maxTimeInSeconds: 10 - maxTimeBetweenOutput: 10 - userMessageOnFailure: > - Failed to change file permission. - disable_if: - condition: property - property: host.os - equals_value: Windows - type: Group instructions: - type: EnvironmentVariable 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 c4e87b927d..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] + 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 448a9ca9af..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" - maxTimeInSeconds: 300 + command: "{{.Env.ANDROID_EMULATOR_RUNNER}}" + maxTimeInSeconds: 600 maxTimeBetweenOutput: 300 - userMessageOnFailure: "Failed to start emulator, check logs." + 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_docs.yaml b/coin/instructions/coin_module_test_docs.yaml index f42b6ae08f..b2ae01677e 100644 --- a/coin/instructions/coin_module_test_docs.yaml +++ b/coin/instructions/coin_module_test_docs.yaml @@ -14,10 +14,15 @@ instructions: command: "cp -rfs /opt/qt-doctools/. {{.InstallDir}}" userMessageOnFailure: > Failed to create links to provisioned binaries. + - type: EnvironmentVariable variableName: COIN_CMAKE_ARGS - variableValue: "-DQT_BUILD_TESTS=OFF {{.SourceDir}}" - - !include "{{qt/qtbase}}/call_cmake.yaml" + variableValue: "-DQT_BUILD_TESTS=OFF" + - type: EnvironmentVariable + variableName: CONFIGURE_ENV_PREFIX + variableValue: "{{.Env.ENV_PREFIX}}" + - !include "{{qt/qtbase}}/call_configure_module.yaml" + - type: ExecuteCommand command: "{{.Env.ENV_PREFIX}} cmake --build . --target generate_docs -v" ignoreExitCode: false diff --git a/coin/instructions/coin_module_test_qnx_start_emulator.yaml b/coin/instructions/coin_module_test_qnx_start_emulator.yaml index 39a44f7f99..486b689847 100644 --- a/coin/instructions/coin_module_test_qnx_start_emulator.yaml +++ b/coin/instructions/coin_module_test_qnx_start_emulator.yaml @@ -6,11 +6,11 @@ instructions: fileContents: | #!/bin/bash RESULT=1 # 0 upon success - TIMEOUT=60 + TIMEOUT=240 COUNT=0 QEMUPID=0 QEMUIPADDR="{{.Env.QNX_QEMU_IPADDR}}" - mkqnximage --type=qemu --hostname=QNX_QEMU_CI --graphics=no --ip=${QEMUIPADDR} --build --run=-h </dev/null &>/dev/null & disown + mkqnximage --type=qemu --graphics=no --ip=${QEMUIPADDR} --build --run=-h </dev/null &>/dev/null & disown while [[ "QEMUPID" -eq 0 ]] do @@ -56,22 +56,12 @@ instructions: done exit $RESULT filename: "{{.Env.QNX_QEMU}}/start_qnx_qemu.sh" - fileMode: 755 + fileMode: 493 - type: ChangeDirectory directory: "{{.Env.QNX_QEMU}}" - type: ExecuteCommand - command: "chmod 755 {{.Env.QNX_QEMU}}/start_qnx_qemu.sh" - maxTimeInSeconds: 10 - maxTimeBetweenOutput: 10 - userMessageOnFailure: > - Failed to change file permission. - disable_if: - condition: property - property: host.os - equals_value: Windows - - type: ExecuteCommand command: "{{.Env.QNX_QEMU}}/start_qnx_qemu.sh" - maxTimeInSeconds: 100 + maxTimeInSeconds: 300 maxTimeBetweenOutput: 100 userMessageOnFailure: > Failed to start QNX qemu, check logs. 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/coin_qtbase_test_docs.yaml b/coin/instructions/coin_qtbase_test_docs.yaml index 824d8c5677..2498f9b393 100644 --- a/coin/instructions/coin_qtbase_test_docs.yaml +++ b/coin/instructions/coin_qtbase_test_docs.yaml @@ -14,13 +14,16 @@ instructions: command: "cp -rfs /opt/qt-doctools/. {{.InstallDir}}" userMessageOnFailure: > Failed to create links to provisioned binaries. - - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}} -DQT_BUILD_TESTS=OFF {{.SourceDir}}" - executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution - maxTimeInSeconds: 6000 - maxTimeBetweenOutput: 1200 - userMessageOnFailure: > - Failed to call cmake. + + - type: EnvironmentVariable + variableName: COIN_CMAKE_ARGS + # Use unix separators even on Windows, to avoid escaping issues in the configure script. + variableValue: "-DQT_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX:PATH={{unixPathSeparators .InstallDir}}" + - type: EnvironmentVariable + variableName: CONFIGURE_ENV_PREFIX + variableValue: "{{.Env.ENV_PREFIX}}" + - !include "{{qt/qtbase}}/call_configure_qtbase.yaml" + - type: ExecuteCommand command: "{{.Env.ENV_PREFIX}} cmake --build . --target generate_docs -v" ignoreExitCode: false 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 c4d7b2bf59..a3ac5c3f0b 100644 --- a/coin/instructions/prepare_building_env.yaml +++ b/coin/instructions/prepare_building_env.yaml @@ -8,6 +8,33 @@ instructions: variableName: CMAKE_GENERATOR variableValue: Ninja + # Set path separator based on host platform. + # \ on Windows (double \\ for escaping the backslash) + # / on UNIX + - type: EnvironmentVariable + variableName: CI_PATH_SEP + variableValue: "\\" + enable_if: + condition: property + property: host.os + equals_value: Windows + - type: EnvironmentVariable + variableName: CI_PATH_SEP + variableValue: "/" + disable_if: + condition: property + property: host.os + equals_value: Windows + + # Enable Axivion_analysis for Qt + - type: EnvironmentVariable + variableName: AXIVION_ANALYSIS + variableValue: "1" + enable_if: + condition: property + property: features + contains_value: Axivion + # Export ICC specific env. variables - type: Group @@ -28,14 +55,14 @@ instructions: - type: Group instructions: - type: PrependToEnvironmentVariable - variableName: CONFIGURE_ARGS + variableName: COMMON_CMAKE_ARGS variableValue: "-DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc " enable_if: condition: property property: host.compiler contains_value: ICC - type: PrependToEnvironmentVariable - variableName: CONFIGURE_ARGS + variableName: COMMON_CMAKE_ARGS variableValue: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ " enable_if: condition: or @@ -47,14 +74,14 @@ instructions: property: host.compiler contains_value: Mingw - type: PrependToEnvironmentVariable - variableName: CONFIGURE_ARGS + variableName: COMMON_CMAKE_ARGS variableValue: "-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe " enable_if: condition: property property: host.compiler contains_value: MSVC - type: PrependToEnvironmentVariable - variableName: CONFIGURE_ARGS + variableName: COMMON_CMAKE_ARGS variableValue: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ " enable_if: condition: property @@ -64,10 +91,10 @@ instructions: condition: and conditions: - condition: runtime - env_var: CONFIGURE_ARGS + env_var: COMMON_CMAKE_ARGS contains_value: "-DCMAKE_C_COMPILER=" - condition: runtime - env_var: CONFIGURE_ARGS + env_var: COMMON_CMAKE_ARGS contains_value: "-DCMAKE_CXX_COMPILER=" @@ -106,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. @@ -265,7 +309,7 @@ instructions: instructions: # Need to unset QMAKESPEC, so that the pre-installed boot2qt mkspec is not picked up. - type: WriteFile - fileContents: "#!/bin/bash\nunset LD_LIBRARY_PATH\n. {{.Env.QT_YOCTO_ENVSETUP}}\nexport PATH={{.Env.QT_CMAKE_DIR}}:$PATH;\nunset QMAKESPEC\n$*" + fileContents: "#!/bin/bash\nunset LD_LIBRARY_PATH\n. {{.Env.QT_YOCTO_ENVSETUP}}\nexport PATH={{.Env.QT_CMAKE_DIR}}:$PATH;\nunset QMAKESPEC\n\"$@\"" filename: "{{.Env.HOME}}/prefix.sh" fileMode: 493 maxTimeInSeconds: 20 @@ -280,14 +324,22 @@ instructions: enable_if: condition: property property: target.osVersion - in_values: [QEMU, QNX_710] + in_values: [QEMU] - type: EnvironmentVariable variableName: TARGET_ENV_PREFIX variableValue: "" disable_if: condition: property property: target.osVersion - in_values: [QEMU, QNX_710] + 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 @@ -305,28 +357,38 @@ instructions: variableName: TARGET_ENV_PREFIX variableValue: "c:\\users\\qt\\prefix.bat" - # QNX variables + # VxWorks - type: Group enable_if: condition: property - property: target.os - equals_value: QNX + 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: + condition: and + conditions: + - condition: property + property: host.os + equals_value: Linux + - condition: property + property: target.os + equals_value: QNX instructions: - - type: WriteFile - fileContents: "#!/bin/bash\nexport TESTARGS={{.Env.TESTARGS}}\nexport TESTRUNNER={{.Env.TESTRUNNER}}\nexport COIN_CTEST_RESULTSDIR={{.Env.COIN_CTEST_RESULTSDIR}}\n$*" - filename: "{{.Env.HOME}}/prefix.sh" - fileMode: 493 - maxTimeInSeconds: 20 - maxTimeBetweenOutput: 20 - type: EnvironmentVariable variableName: QNX_TARGET variableValue: "{{.Env.QNX_710}}/target/qnx7" - type: EnvironmentVariable variableName: QNX_CONFIGURATION_EXCLUSIVE - variableValue: "{{.Env.QNX_710}}/.qnx" + variableValue: "{{.Env.HOME}}/.qnx" - type: EnvironmentVariable variableName: QNX_CONFIGURATION - variableValue: "{{.Env.QNX_710}}/.qnx" + variableValue: "{{.Env.HOME}}/.qnx" - type: PrependToEnvironmentVariable variableName: PATH variableValue: "{{.Env.QNX_710}}/host/linux/x86_64/usr/bin:" @@ -335,52 +397,211 @@ instructions: variableValue: "{{.Env.QNX_710}}/host/common/bin:" - type: PrependToEnvironmentVariable variableName: PATH - variableValue: "{{.Env.QNX_710}}/.qnx:" + variableValue: "{{.Env.HOME}}/.qnx:" - type: EnvironmentVariable variableName: QNX_HOST variableValue: "{{.Env.QNX_710}}/host/linux/x86_64" - type: AppendToEnvironmentVariable variableName: PATH variableValue: ":{{.Env.QEMUARMV7_TOOLCHAIN_SYSROOT}}/../x86_64-pokysdk-linux/usr/bin:" - enable_if: - condition: property - property: host.os - equals_value: Linux + + - type: Group + enable_if: + condition: and + conditions: + - condition: property + property: host.os + equals_value: Windows + - condition: property + property: target.os + equals_value: QNX + instructions: + - type: EnvironmentVariable + variableName: QNX_TARGET + variableValue: "{{.Env.QNX_710_CMAKE}}/target/qnx7" + - type: EnvironmentVariable + variableName: QNX_CONFIGURATION_EXCLUSIVE + variableValue: "{{.Env.HOMEPATH}}\\.qnx" + - type: EnvironmentVariable + variableName: QNX_CONFIGURATION + variableValue: "{{.Env.HOMEPATH}}\\.qnx" + - type: PrependToEnvironmentVariable + variableName: PATH + variableValue: "{{.Env.QNX_710}}\\host\\win64\\x86_64\\usr\\bin;" + - type: PrependToEnvironmentVariable + variableName: PATH + variableValue: "{{.Env.QNX_710}}\\host\\common\\bin;" + - type: PrependToEnvironmentVariable + variableName: PATH + variableValue: "{{.Env.HOMEPATH}}\\.qnx;" + - type: EnvironmentVariable + variableName: QNX_HOST + variableValue: "{{.Env.QNX_710}}\\host\\win64\\x86_64" # Enable warnings are errors - type: Group instructions: - type: AppendToEnvironmentVariable - variableName: CONFIGURE_ARGS + variableName: COMMON_CMAKE_ARGS + variableValue: " -DWARNINGS_ARE_ERRORS=ON" + - type: AppendToEnvironmentVariable + variableName: COMMON_TARGET_CMAKE_ARGS variableValue: " -DWARNINGS_ARE_ERRORS=ON" enable_if: condition: property property: features contains_value: WarningsAreErrors + - type: Group + enable_if: + condition: property + property: features + contains_value: UseAddressSanitizer + instructions: + - type: AppendToEnvironmentVariable + variableName: COMMON_CMAKE_ARGS + variableValue: " -DFEATURE_sanitize_address=ON" + disable_if: + condition: property + property: features + contains_value: UseConfigure + - type: AppendToEnvironmentVariable + variableName: CONFIGURE_ARGS + variableValue: " -sanitize address" + enable_if: + condition: property + property: features + contains_value: UseConfigure + + - type: Group + instructions: + - type: AppendToEnvironmentVariable + variableName: COMMON_CMAKE_ARGS + variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS" + - type: AppendToEnvironmentVariable + variableName: COMMON_NON_QTBASE_CMAKE_ARGS + variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS" + - 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 + variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS" + - type: AppendToEnvironmentVariable + variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS + variableValue: " -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON -DCMAKE_MESSAGE_LOG_LEVEL=STATUS" + - 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 instructions: - type: AppendToEnvironmentVariable - variableName: CONFIGURE_ARGS + variableName: COMMON_CMAKE_ARGS + variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" + - type: AppendToEnvironmentVariable + variableName: COMMON_NON_QTBASE_CMAKE_ARGS variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" - type: AppendToEnvironmentVariable - variableName: NON_QTBASE_CONFIGURE_ARGS + variableName: COMMON_TEST_CMAKE_ARGS variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" - type: AppendToEnvironmentVariable - variableName: TEST_CONFIGURE_ARGS + variableName: COMMON_EXAMPLES_CMAKE_ARGS + variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" + + - type: AppendToEnvironmentVariable + variableName: COMMON_TARGET_CMAKE_ARGS variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" - type: AppendToEnvironmentVariable - variableName: TARGET_CONFIGURE_ARGS + variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS variableValue: " -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" - type: AppendToEnvironmentVariable - variableName: NON_QTBASE_TARGET_CONFIGURE_ARGS + 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 contains_value: Sccache + # 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 + variableName: COMMON_CMAKE_ARGS + variableValue: " -DQT_INTERNAL_EXAMPLES_INSTALL_PREFIX={{unixPathSeparators .BuildDir}}/installed_examples" + - 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 + conditions: + # qtbase host case + - condition: runtime + env_var: CONFIGURE_ARGS + contains_value: "QT_BUILD_EXAMPLES=ON" + # qtbase target case + - condition: runtime + env_var: TARGET_CONFIGURE_ARGS + contains_value: "QT_BUILD_EXAMPLES=ON" + # non-qtbase host case + - condition: runtime + env_var: NON_QTBASE_CONFIGURE_ARGS + contains_value: "QT_BUILD_EXAMPLES=ON" + # non-qtbase target case + - condition: runtime + env_var: NON_QTBASE_TARGET_CONFIGURE_ARGS + contains_value: "QT_BUILD_EXAMPLES=ON" + # Same as above, but for configurations marked with UseConfigure + # qtbase host case + - condition: runtime + env_var: CONFIGURE_ARGS + contains_value: "-make examples" + # qtbase target case + - condition: runtime + env_var: TARGET_CONFIGURE_ARGS + contains_value: "-make examples" + # non-qtbase host case + - condition: runtime + env_var: NON_QTBASE_CONFIGURE_ARGS + contains_value: "-make examples" + # non-qtbase target case + - condition: runtime + env_var: NON_QTBASE_TARGET_CONFIGURE_ARGS + contains_value: "-make examples" + - type: SetEnvironmentFromScript command: [C:\Utils\emsdk\emsdk_env.bat] userMessageOnFailure: "Failed to set emscripten environment" @@ -395,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_executable.yaml b/coin/instructions/prepare_configure_executable.yaml new file mode 100644 index 0000000000..e053028237 --- /dev/null +++ b/coin/instructions/prepare_configure_executable.yaml @@ -0,0 +1,35 @@ +# Call either cmake or configure depending on whether the +# UseConfigure platform configuration feature is set. +# We should remove the cmake branch, once all platform configurations +# are ported to use configure. +type: Group +instructions: + - type: Group + enable_if: + condition: property + property: features + contains_value: UseConfigure + instructions: + - type: EnvironmentVariable + variableName: CONFIGURE_EXECUTABLE + variableValue: "{{.SourceDir}}/configure" + disable_if: + condition: property + property: host.os + equals_value: Windows + - type: EnvironmentVariable + variableName: CONFIGURE_EXECUTABLE + variableValue: "{{.SourceDir}}\\configure.bat" + enable_if: + condition: property + property: host.os + equals_value: Windows + - type: Group + disable_if: + condition: property + property: features + contains_value: UseConfigure + instructions: + - type: EnvironmentVariable + variableName: CONFIGURE_EXECUTABLE + variableValue: "cmake" diff --git a/coin/instructions/prepare_configure_module_executable.yaml b/coin/instructions/prepare_configure_module_executable.yaml new file mode 100644 index 0000000000..a28359e3fd --- /dev/null +++ b/coin/instructions/prepare_configure_module_executable.yaml @@ -0,0 +1,46 @@ +# Call either qt-cmake or qt-configure-module depending on whether the +# UseConfigure platform configuration feature is set. +# We should remove the cmake branch, once all platform configurations +# are ported to use configure. +type: Group +instructions: + - type: Group + enable_if: + condition: property + property: features + contains_value: UseConfigure + instructions: + - type: EnvironmentVariable + variableName: CONFIGURE_EXECUTABLE + 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}}{{.Env.CI_PATH_SEP}}bin{{.Env.CI_PATH_SEP}}qt-configure-module.bat" + enable_if: + condition: property + property: host.os + equals_value: Windows + - type: Group + disable_if: + condition: property + property: features + contains_value: UseConfigure + instructions: + - type: EnvironmentVariable + variableName: CONFIGURE_EXECUTABLE + 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}}{{.Env.CI_PATH_SEP}}bin{{.Env.CI_PATH_SEP}}qt-cmake-private.bat" + enable_if: + condition: property + property: host.os + equals_value: Windows diff --git a/coin/instructions/prepare_install_dir_suffix_host.yaml b/coin/instructions/prepare_install_dir_suffix_host.yaml new file mode 100644 index 0000000000..30cf77a6c1 --- /dev/null +++ b/coin/instructions/prepare_install_dir_suffix_host.yaml @@ -0,0 +1,16 @@ +type: Group +instructions: + - type: EnvironmentVariable + variableName: INSTALL_DIR_SUFFIX + variableValue: "/host" + disable_if: + condition: property + property: host.os + equals_value: Windows + - type: EnvironmentVariable + variableName: INSTALL_DIR_SUFFIX + variableValue: "\\host" + enable_if: + condition: property + property: host.os + equals_value: Windows diff --git a/coin/instructions/prepare_install_dir_suffix_target.yaml b/coin/instructions/prepare_install_dir_suffix_target.yaml new file mode 100644 index 0000000000..e53519430e --- /dev/null +++ b/coin/instructions/prepare_install_dir_suffix_target.yaml @@ -0,0 +1,16 @@ +type: Group +instructions: + - type: EnvironmentVariable + variableName: INSTALL_DIR_SUFFIX + variableValue: "/target" + disable_if: + condition: property + property: host.os + equals_value: Windows + - type: EnvironmentVariable + variableName: INSTALL_DIR_SUFFIX + variableValue: "\\target" + enable_if: + condition: property + property: host.os + equals_value: Windows 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 7b8a6376f9..bbc31f7676 100644 --- a/coin/instructions/qmake_examples/build_qmake_examples_instructions.yaml +++ b/coin/instructions/qmake_examples/build_qmake_examples_instructions.yaml @@ -21,3 +21,11 @@ instructions: - condition: runtime env_var: COIN_CMAKE_ARGS contains_value: "QT_BUILD_EXAMPLES=ON" + # host case + - condition: runtime + 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" |