summaryrefslogtreecommitdiffstats
path: root/coin/module_config.yaml
blob: 565dd525545898472f5d2a81f2f16eed98722b56 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
version: 1
accept_configuration:
  condition: property
  property: host.os
  equals_property: target.os

call_cmake_instructions: &call_cmake
  type: Group
  instructions:
    - type: ExecuteCommand
      command: "{{.Env.ENV_PREFIX}} {{.InstallDir}}\\bin\\qt-cmake {{.SourceDir}}/tests"
      maxTimeInSeconds: 6000
      maxTimeBetweenOutput: 120
      userMessageOnFailure: >
        Failed to call cmake. Contact Liang then.
      enable_if:
        condition: property
        property: host.os
        equals_value: Windows
    - type: ExecuteCommand
      command: "{{.InstallDir}}/bin/qt-cmake {{.SourceDir}}/tests"
      maxTimeInSeconds: 6000
      maxTimeBetweenOutput: 120
      userMessageOnFailure: >
        Failed to call cmake. Contact Liang then.
      disable_if:
        condition: property
        property: host.os
        equals_value: Windows

build_and_upload_test_artifacts_instruction: &build_and_upload_test_artifacts
  type: Group
  instructions:
    - type: ChangeDirectory
      directory: "{{.SourceDir}}/tests"
    - *call_cmake
    - type: ExecuteCommand
      command: "{{.Env.ENV_PREFIX}} cmake --build ."
      maxTimeInSeconds: 6000
      maxTimeBetweenOutput: 120
      userMessageOnFailure: >
        Failed to build sources. In the current state bug can be everywhere. Contact Liang first.
    - type: UploadTestArtifact
      transferType: UploadModuleTestsArtifact
      archiveDirectory: "{{.SourceDir}}/tests"
      maxTimeInSeconds: 1200
      maxTimeBetweenOutput: 1200
  disable_if:
      condition: property
      property: configureArgs
      contains_value: "-DBUILD_SHARED_LIBS=OFF"

regular_specific_test_instructions: &regular_test_instructions
  type: Group
  instructions:
    - type: InstallTestBinaryArchive
      relativeStoragePath: "{{.Env.MODULE_ARTIFACTS_RELATIVE_STORAGE_PATH}}/tests.tar.gz"
      directory: "{{.SourceDir}}/tests"
      maxTimeInSeconds: 1200
      maxTimeBetweenOutput: 1200
      userMessageOnFailure: >
        Failed to install tests archive.
    - type: ChangeDirectory
      directory: "{{.SourceDir}}/tests"
    - type: ExecuteCommand
      command: "ctest -V --rerun-failed"
      ignoreExitCode: true
      maxTimeInSeconds: 7200
      maxTimeBetweenOutput: 900
      userMessageOnFailure: >
        Failed to run tests.
  disable_if:
      condition: property
      property: configureArgs
      contains_value: "-DBUILD_SHARED_LIBS=OFF"


build_instructions:
  - type: MakeDirectory
    directory: .git
  - type: SetBuildDirectory
    directory: "{{.SourceDir}}"
  - type: ChangeDirectory
    directory: "{{.BuildDir}}"
  - !include "{{qt/qtbase}}/prepare_building_env.yaml"
  - type: ExecuteCommand
    command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}} -DBUILD_TESTING=OFF {{.SourceDir}}"
    executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
    maxTimeInSeconds: 6000
    maxTimeBetweenOutput: 120
    userMessageOnFailure: >
      Failed to call cmake. Contact Liang then.
  - type: ExecuteCommand
    command: "{{.Env.ENV_PREFIX}} cmake --build ."
    maxTimeInSeconds: 6000
    maxTimeBetweenOutput: 120
    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: 120
    userMessageOnFailure: >
      Failed to install package.
  - type: EnvironmentVariable
    variableName: DESTDIR
    variableValue: "{{.InstallRoot}}"
  - type: ExecuteCommand
    command: "{{.Env.ENV_PREFIX}} cmake --install ."
    maxTimeInSeconds: 6000
    maxTimeBetweenOutput: 120
    userMessageOnFailure: >
      Failed to install package for archiving.
  - type: SignPackage
    enable_if:
      condition: property
      property: host.os
      equals_value: Windows
    directory: "{{.InstallRoot}}/{{.AgentWorkingDir}}"
    maxTimeInSeconds: 1200
    maxTimeBetweenOutput: 1200
  - type: UploadArtifact
    archiveDirectory: "{{.InstallRoot}}/{{.AgentWorkingDir}}"
    transferType: UploadModuleBuildArtifact
    maxTimeInSeconds: 1200
    maxTimeBetweenOutput: 1200
  - *build_and_upload_test_artifacts

test_instructions:
  - *regular_test_instructions