From f03ac58b1ecc24f01cb83b275a9b6088f9483545 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Fri, 11 Oct 2019 15:13:48 +0200 Subject: [PATCH] cmake: add Android build Task-number: QTBUG-78945 Change-Id: I0c9d3cc7de6d3bfb346a77d95a6bbcad6d707a74 Reviewed-by: Simon Hausmann Reviewed-by: Qt CMake Build Bot --- .../instructions/cmake_cross_compilation.yaml | 58 +++++++++++++++++++ coin/module_config.yaml | 45 +++++++++++--- 2 files changed, 94 insertions(+), 9 deletions(-) create mode 100644 coin/instructions/cmake_cross_compilation.yaml diff --git a/coin/instructions/cmake_cross_compilation.yaml b/coin/instructions/cmake_cross_compilation.yaml new file mode 100644 index 0000000000..2037a4d331 --- /dev/null +++ b/coin/instructions/cmake_cross_compilation.yaml @@ -0,0 +1,58 @@ +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/module_config.yaml b/coin/module_config.yaml index 75607753cc..8db848012c 100644 --- a/coin/module_config.yaml +++ b/coin/module_config.yaml @@ -1,13 +1,40 @@ -version: 1 +version: 2 accept_configuration: condition: property - property: host.os - equals_property: target.os + property: features + not_contains_value: Disable -build_instructions: - - !include "{{qt/qtbase}}/prepare_building_env.yaml" - - !include "{{qt/qtbase}}/cmake_qtbase_build_instructions.yaml" - - !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml" +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 -test_instructions: - - !include "{{qt/qtbase}}/cmake_regular_test_instructions.yaml" + Test: + - type: Group + instructions: + - !include "{{qt/qtbase}}/cmake_regular_test_instructions.yaml" + enable_if: + condition: property + property: host.os + equals_value: target.os + - type: EnvironmentVariable + variableName: Dummy + variableValue: dummy + disable_if: + condition: property + property: host.os + equals_property: target.os