From d445112cc03d730d659d1eeaa84d963f85731ac5 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Thu, 14 Nov 2019 11:51:11 +0100 Subject: cmake: upload artifact for qtbase android build and etc Task-number: QTBUG-78945 Change-Id: I3361e63ed4830ac0e1ebb9d4b9495df09c45f476 Reviewed-by: Alexandru Croitor --- coin/instructions/call_host_cmake.yaml | 23 ++++++ coin/instructions/call_target_cmake.yaml | 23 ++++++ coin/instructions/cmake_cross_compilation.yaml | 58 --------------- ...ross_compilation_module_build_instructions.yaml | 81 ++++++++++++++++++++ ...ross_compilation_qtbase_build_instructions.yaml | 87 ++++++++++++++++++++++ .../coin_module_build_template_v2.yaml | 18 +++++ .../instructions/coin_module_test_template_v2.yaml | 16 ++++ .../coin_qtbase_build_template_v2.yaml | 18 +++++ coin/module_config.yaml | 32 +------- 9 files changed, 268 insertions(+), 88 deletions(-) create mode 100644 coin/instructions/call_host_cmake.yaml create mode 100644 coin/instructions/call_target_cmake.yaml delete mode 100644 coin/instructions/cmake_cross_compilation.yaml create mode 100644 coin/instructions/cmake_cross_compilation_module_build_instructions.yaml create mode 100644 coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml create mode 100644 coin/instructions/coin_module_build_template_v2.yaml create mode 100644 coin/instructions/coin_module_test_template_v2.yaml create mode 100644 coin/instructions/coin_qtbase_build_template_v2.yaml (limited to 'coin') diff --git a/coin/instructions/call_host_cmake.yaml b/coin/instructions/call_host_cmake.yaml new file mode 100644 index 0000000000..f626214f2b --- /dev/null +++ b/coin/instructions/call_host_cmake.yaml @@ -0,0 +1,23 @@ +type: Group +instructions: + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} {{.InstallDir}}\\host\\bin\\qt-cmake {{.Env.COIN_CMAKE_ARGS}}" + executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to call cmake. Contact Liang then. + enable_if: + condition: property + property: host.os + equals_value: Windows + - type: ExecuteCommand + command: "{{.InstallDir}}/host/bin/qt-cmake {{.Env.COIN_CMAKE_ARGS}}" + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to call cmake. Contact Liang then. + disable_if: + condition: property + property: host.os + equals_value: Windows diff --git a/coin/instructions/call_target_cmake.yaml b/coin/instructions/call_target_cmake.yaml new file mode 100644 index 0000000000..475cbf6d38 --- /dev/null +++ b/coin/instructions/call_target_cmake.yaml @@ -0,0 +1,23 @@ +type: Group +instructions: + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} {{.InstallDir}}\\target\\bin\\qt-cmake {{.Env.COIN_CMAKE_ARGS}}" + executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to call cmake. Contact Liang then. + enable_if: + condition: property + property: host.os + equals_value: Windows + - type: ExecuteCommand + command: "{{.InstallDir}}/target/bin/qt-cmake {{.Env.COIN_CMAKE_ARGS}}" + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to call cmake. Contact Liang then. + disable_if: + condition: property + property: host.os + equals_value: Windows diff --git a/coin/instructions/cmake_cross_compilation.yaml b/coin/instructions/cmake_cross_compilation.yaml deleted file mode 100644 index 2037a4d331..0000000000 --- a/coin/instructions/cmake_cross_compilation.yaml +++ /dev/null @@ -1,58 +0,0 @@ -type: Group -instructions: - - type: MakeDirectory - directory: .git - - type: MakeDirectory - directory: build - - type: ChangeDirectory - directory: "{{.BuildDir}}/build" - - type: MakeDirectory - directory: host - - type: MakeDirectory - directory: target - - type: SetBuildDirectory - directory: "{{.SourceDir}}/build/host" - - type: ChangeDirectory - directory: "{{.BuildDir}}" - - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}}/host -DBUILD_TESTING=OFF {{.SourceDir}}" - executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution - maxTimeInSeconds: 6000 - maxTimeBetweenOutput: 1200 - userMessageOnFailure: > - Failed to call cmake. Contact Liang then. - - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel" - maxTimeInSeconds: 6000 - maxTimeBetweenOutput: 1200 - userMessageOnFailure: > - Failed to build sources. In the current state bug can be everywhere. Contact Liang first. - - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake --install ." - maxTimeInSeconds: 6000 - maxTimeBetweenOutput: 1200 - userMessageOnFailure: > - Failed to install package. - - type: SetBuildDirectory - directory: "{{.SourceDir}}/build/target" - - type: ChangeDirectory - directory: "{{.BuildDir}}" - - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake {{.Env.TARGET_CONFIGURE_ARGS}} -DQT_HOST_PATH={{.InstallDir}}/host -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}}/target -DBUILD_TESTING=OFF {{.SourceDir}}" - executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution - maxTimeInSeconds: 6000 - maxTimeBetweenOutput: 1200 - userMessageOnFailure: > - Failed to call cmake. Contact Liang then. - - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel" - maxTimeInSeconds: 6000 - maxTimeBetweenOutput: 1200 - userMessageOnFailure: > - Failed to build sources. In the current state bug can be everywhere. Contact Liang first. - - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake --install ." - maxTimeInSeconds: 6000 - maxTimeBetweenOutput: 1200 - userMessageOnFailure: > - Failed to install package. diff --git a/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml b/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml new file mode 100644 index 0000000000..a816f6aa7d --- /dev/null +++ b/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml @@ -0,0 +1,81 @@ +type: Group +instructions: + - type: MakeDirectory + directory: .git + - type: MakeDirectory + directory: build + - type: ChangeDirectory + directory: "{{.BuildDir}}/build" + - type: MakeDirectory + directory: host + - type: MakeDirectory + directory: target + - type: SetBuildDirectory + directory: "{{.SourceDir}}/build/host" + - type: ChangeDirectory + directory: "{{.BuildDir}}" + - type: EnvironmentVariable + variableName: COIN_CMAKE_ARGS + variableValue: "-DBUILD_TESTING=OFF {{.SourceDir}}" + - !include "{{qt/qtbase}}/call_host_cmake.yaml" + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel" + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to build sources. In the current state bug can be everywhere. Contact Liang first. + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake --install ." + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to install package. + - type: EnvironmentVariable + variableName: DESTDIR + variableValue: "{{.InstallRoot}}" + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake --install ." + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to install package for archiving. + - type: EnvironmentVariable + variableName: DESTDIR + variableValue: "" + - type: SetBuildDirectory + directory: "{{.SourceDir}}/build/target" + - type: ChangeDirectory + directory: "{{.BuildDir}}" + - type: EnvironmentVariable + variableName: COIN_CMAKE_ARGS + variableValue: "-DBUILD_TESTING=OFF {{.SourceDir}}" + - !include "{{qt/qtbase}}/call_target_cmake.yaml" + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel" + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to build sources. In the current state bug can be everywhere. Contact Liang first. + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake --install ." + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to install package. + - type: EnvironmentVariable + variableName: DESTDIR + variableValue: "{{.InstallRoot}}" + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake --install ." + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to install package for archiving. + - type: EnvironmentVariable + variableName: DESTDIR + variableValue: "" + - type: UploadArtifact + archiveDirectory: "{{.InstallRoot}}/{{.AgentWorkingDir}}" + transferType: UploadModuleBuildArtifact + maxTimeInSeconds: 1200 + maxTimeBetweenOutput: 1200 diff --git a/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml b/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml new file mode 100644 index 0000000000..aa024d8c30 --- /dev/null +++ b/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml @@ -0,0 +1,87 @@ +type: Group +instructions: + - type: MakeDirectory + directory: .git + - type: MakeDirectory + directory: build + - type: ChangeDirectory + directory: "{{.BuildDir}}/build" + - type: MakeDirectory + directory: host + - type: MakeDirectory + directory: target + - type: SetBuildDirectory + directory: "{{.SourceDir}}/build/host" + - type: ChangeDirectory + directory: "{{.BuildDir}}" + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}}/host -DBUILD_TESTING=OFF {{.SourceDir}}" + executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to call cmake. Contact Liang then. + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel" + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to build sources. In the current state bug can be everywhere. Contact Liang first. + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake --install ." + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to install package. + - type: EnvironmentVariable + variableName: DESTDIR + variableValue: "{{.InstallRoot}}" + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake --install ." + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to install package for archiving. + - type: EnvironmentVariable + variableName: DESTDIR + variableValue: "" + - type: SetBuildDirectory + directory: "{{.SourceDir}}/build/target" + - type: ChangeDirectory + directory: "{{.BuildDir}}" + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake {{.Env.TARGET_CONFIGURE_ARGS}} -DQT_HOST_PATH={{.InstallDir}}/host -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}}/target -DBUILD_TESTING=OFF {{.SourceDir}}" + executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to call cmake. Contact Liang then. + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel" + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to build sources. In the current state bug can be everywhere. Contact Liang first. + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake --install ." + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to install package. + - type: EnvironmentVariable + variableName: DESTDIR + variableValue: "{{.InstallRoot}}" + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake --install ." + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to install package for archiving. + - type: EnvironmentVariable + variableName: DESTDIR + variableValue: "" + - type: UploadArtifact + archiveDirectory: "{{.InstallRoot}}/{{.AgentWorkingDir}}" + transferType: UploadModuleBuildArtifact + maxTimeInSeconds: 1200 + maxTimeBetweenOutput: 1200 diff --git a/coin/instructions/coin_module_build_template_v2.yaml b/coin/instructions/coin_module_build_template_v2.yaml new file mode 100644 index 0000000000..a05b4ba915 --- /dev/null +++ b/coin/instructions/coin_module_build_template_v2.yaml @@ -0,0 +1,18 @@ +type: Group +instructions: + - !include "{{qt/qtbase}}/prepare_building_env.yaml" + - type: Group + instructions: + - !include "{{qt/qtbase}}/cmake_module_build_instructions.yaml" + - !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml" + enable_if: + condition: property + property: host.os + equals_property: target.os + - type: Group + instructions: + - !include "{{qt/qtbase}}/cmake_cross_compilation_module_build_instructions.yaml" + disable_if: + condition: property + property: host.os + equals_property: target.os diff --git a/coin/instructions/coin_module_test_template_v2.yaml b/coin/instructions/coin_module_test_template_v2.yaml new file mode 100644 index 0000000000..a94ed9fd84 --- /dev/null +++ b/coin/instructions/coin_module_test_template_v2.yaml @@ -0,0 +1,16 @@ +type: Group +instructions: + - type: Group + instructions: + - !include "{{qt/qtbase}}/cmake_regular_test_instructions.yaml" + enable_if: + condition: property + property: host.os + equals_property: target.os + - type: EnvironmentVariable + variableName: Dummy + variableValue: dummy + disable_if: + condition: property + property: host.os + equals_property: target.os diff --git a/coin/instructions/coin_qtbase_build_template_v2.yaml b/coin/instructions/coin_qtbase_build_template_v2.yaml new file mode 100644 index 0000000000..de7a5b8e11 --- /dev/null +++ b/coin/instructions/coin_qtbase_build_template_v2.yaml @@ -0,0 +1,18 @@ +type: Group +instructions: + - !include "{{qt/qtbase}}/prepare_building_env.yaml" + - type: Group + instructions: + - !include "{{qt/qtbase}}/cmake_qtbase_build_instructions.yaml" + - !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml" + enable_if: + condition: property + property: host.os + equals_property: target.os + - type: Group + instructions: + - !include "{{qt/qtbase}}/cmake_cross_compilation_qtbase_build_instructions.yaml" + disable_if: + condition: property + property: host.os + equals_property: target.os diff --git a/coin/module_config.yaml b/coin/module_config.yaml index ab615583a5..5d50c02afe 100644 --- a/coin/module_config.yaml +++ b/coin/module_config.yaml @@ -6,35 +6,7 @@ accept_configuration: instructions: Build: - - !include "{{qt/qtbase}}/prepare_building_env.yaml" - - type: Group - instructions: - - !include "{{qt/qtbase}}/cmake_qtbase_build_instructions.yaml" - - !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml" - enable_if: - condition: property - property: host.os - equals_property: target.os - - type: Group - instructions: - - !include "{{qt/qtbase}}/cmake_cross_compilation.yaml" - disable_if: - condition: property - property: host.os - equals_property: target.os + - !include "{{qt/qtbase}}/coin_qtbase_build_template_v2.yaml" Test: - - type: Group - instructions: - - !include "{{qt/qtbase}}/cmake_regular_test_instructions.yaml" - enable_if: - condition: property - property: host.os - equals_property: target.os - - type: EnvironmentVariable - variableName: Dummy - variableValue: dummy - disable_if: - condition: property - property: host.os - equals_property: target.os + - !include "{{qt/qtbase}}/coin_module_test_template_v2.yaml" -- cgit v1.2.3