cmake: add Android build

Task-number: QTBUG-78945
Change-Id: I0c9d3cc7de6d3bfb346a77d95a6bbcad6d707a74
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
This commit is contained in:
Liang Qi 2019-10-11 15:13:48 +02:00
parent 9bd6cec74d
commit f03ac58b1e
2 changed files with 94 additions and 9 deletions

View File

@ -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.

View File

@ -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