summaryrefslogtreecommitdiffstats
path: root/coin/instructions/cmake_build_and_upload_test_artifacts.yaml
blob: a2fd63fa7236e13f670c126d6f6d3a9bea06268b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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: 4800
    userMessageOnFailure: >
      Failed to build sources. In the current state bug can be everywhere.
  - type: UploadTestArtifact
    transferType: UploadModuleTestsArtifact
    archiveDirectory: "{{.BuildDir}}"
    maxTimeInSeconds: 1200
    maxTimeBetweenOutput: 1200