80705298ca
Add infrastructure to build cmake auto tests in the CI when targeting iOS. Currently the are only CI instructions for qtbase. More work is needed to make it work for other repos. With this change, we will build a single Widgets application targeting the iOS simulator. We can't target the device SDK in the CI because signing fails due to a missing signing certificate and provisioning profile. The Coin instructions will now set a QT_BUILD_ENVIRONMENT=ci env var whose value will be checked in _qt_internal_test_expect_pass, to ensure we build for the simulator SDK when using a universal Qt. Without this, xcodebuild will try to build with the device SDK and fail to build the project. Pick-to: 6.2 Task-number: QTBUG-95839 Change-Id: Ib39c9527b107b2004746ccbdc9d9d1d658f88c76 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
63 lines
2.3 KiB
YAML
63 lines
2.3 KiB
YAML
type: Group
|
|
instructions:
|
|
- type: ChangeDirectory
|
|
directory: "{{.SourceDir}}"
|
|
- type: MakeDirectory
|
|
directory: "{{.SourceDir}}_standalone_tests"
|
|
- type: SetBuildDirectory
|
|
directory: "{{.SourceDir}}_standalone_tests"
|
|
- type: ChangeDirectory
|
|
directory: "{{.BuildDir}}"
|
|
- type: AppendToEnvironmentVariable
|
|
variableName: COIN_CMAKE_ARGS
|
|
variableValue: " -DCMAKE_AUTOGEN_VERBOSE=ON -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 ."
|
|
enable_if:
|
|
condition: runtime
|
|
env_var: COIN_CMAKE_ARGS
|
|
equals_value: null
|
|
|
|
# Set an informational build environment env var during the an integration's build phase.
|
|
# It can be checked during Qt and standalone tests configuration (so configure,
|
|
# qt-configure-module and qt-internal-configure-tests time).
|
|
# It's currently needed for some CMake autotest iOS-specific decisions, but it could be useful
|
|
# for other scenarios as well.
|
|
#
|
|
# A related QTEST_ENVIRONMENT env var is set during an integration's test phase.
|
|
#
|
|
# Note that CMake auto tests are configured and built during the /test/ phase, NOT the build
|
|
# phase.
|
|
# BUT, the options that will be passed to the project cmake invocation in the test phase, are
|
|
# decided during the /build/ phase.
|
|
- type: EnvironmentVariable
|
|
variableName: QT_BUILD_ENVIRONMENT
|
|
variableValue: "ci"
|
|
|
|
# Inform CMake to build just a minimal set of tests for static Qt builds.
|
|
- type: AppendToEnvironmentVariable
|
|
variableName: COIN_CMAKE_ARGS
|
|
variableValue: " -DQT_BUILD_MINIMAL_STATIC_TESTS=ON"
|
|
enable_if:
|
|
condition: property
|
|
property: features
|
|
contains_value: "MinimalStaticTests"
|
|
|
|
- !include "{{qt/qtbase}}/call_cmake_for_standalone_tests.yaml"
|
|
- type: ExecuteCommand
|
|
command: "{{.Env.TESTS_ENV_PREFIX}} cmake --build . --parallel -v"
|
|
maxTimeInSeconds: 6000
|
|
maxTimeBetweenOutput: 1200
|
|
userMessageOnFailure: >
|
|
Failed to build sources. In the current state bug can be everywhere.
|
|
- type: UploadTestArtifact
|
|
transferType: UploadModuleTestsArtifact
|
|
archiveDirectory: "{{.BuildDir}}"
|
|
maxTimeInSeconds: 1200
|
|
maxTimeBetweenOutput: 1200
|