-
Notifications
You must be signed in to change notification settings - Fork 994
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coin: Add instructions to build standalone examples
If a qt5.git configuration is marked with the StandaloneTests feature, tell CMake not to build the examples in-tree, and instead use qt-internal-configure-examples to build the examples out-of-tree. This brings a couple of improvements: - higher chance of building examples as ExternalProjects without issues - ability to use deployment api in examples, without installing the examples into a main install prefix The new coin instructions files use a copy of the standalone tests instructions as a base. Task-number: QTBUG-90820 Task-number: QTBUG-96232 Change-Id: If89e6da0b327a38b9c2738f58aa1b5b5fb9fda37 Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
- Loading branch information
Showing
10 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
type: Group | ||
instructions: | ||
- type: ChangeDirectory | ||
directory: "{{.BuildDir}}" | ||
- type: ExecuteCommand | ||
command: "{{.Env.EXAMPLES_ENV_PREFIX}} {{.Env.INSTALL_DIR_FOR_EXAMPLES}}\\bin\\qt-internal-configure-examples {{.Env.COIN_CMAKE_ARGS}}" | ||
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution | ||
maxTimeInSeconds: 6000 | ||
maxTimeBetweenOutput: 1200 | ||
userMessageOnFailure: > | ||
Failed to call configure examples. | ||
enable_if: | ||
condition: property | ||
property: host.os | ||
equals_value: Windows | ||
- type: ExecuteCommand | ||
command: "{{.Env.EXAMPLES_ENV_PREFIX}} {{.Env.INSTALL_DIR_FOR_EXAMPLES}}/libexec/qt-internal-configure-examples {{.Env.COIN_CMAKE_ARGS}}" | ||
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution | ||
maxTimeInSeconds: 6000 | ||
maxTimeBetweenOutput: 1200 | ||
userMessageOnFailure: > | ||
Failed to call configure examples. | ||
disable_if: | ||
condition: property | ||
property: host.os | ||
equals_value: Windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
16 changes: 16 additions & 0 deletions
16
coin/instructions/cmake_build_standalone_examples_host.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
30 changes: 30 additions & 0 deletions
30
coin/instructions/cmake_build_standalone_examples_target.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters