summaryrefslogtreecommitdiffstats
path: root/coin/instructions/coin_module_axivion_template_v2.yaml
blob: 87d32f5d37d11340a0eab23ba01f841db333076e (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
analysis_instructions_axivion: &analysis_instructions_axivion
  type: Group
  instructions:
    - type: Group
      instructions:
      - type: EnvironmentVariable
        variableName: AXIVION_CHAINLOAD_TOOLCHAIN_FILE
        variableValue: "{{.AgentWorkingDir}}/install/lib/cmake/Qt6/qt.toolchain.cmake"
      - type: EnvironmentVariable
        variableName: CMAKE_PREFIX_PATH
        variableValue: "{{.AgentWorkingDir}}/install/lib/cmake"
        enable_if:
          condition: runtime
          env_var: TESTED_MODULE_COIN
          not_equals_value: "qtbase"
    - type: Group
      instructions:
      - type: Rename
        sourcePath: "{{.SourceDir}}/coin/axivion/ci_config_{{.Env.TARGET_OS_COIN}}.json"
        targetPath: "{{.Env.HOME}}/axivion/ci_config.json"
        userMessageOnFailure: "Moving ci_config.json failed. Make sure you have included the file in coin/axivion/ -folder"
      - type: SetBuildDirectory
        directory: "{{.SourceDir}}"
      - type: ChangeDirectory
        directory: "{{.BuildDir}}"
      - type: ExecuteCommand
        command: ["../../../axivion/start_analysis.sh"]
        maxTimeInSeconds: 28800
        maxTimeBetweenOutput: 28800
        userMessageOnFailure: "Failed to run analysis"

build_environment_axivion: &build_environment_axivion
  type: Group
  instructions:
    - type: ExecuteCommand
      command: ["sudo", "mkdir", "-p","/data/axivion"]
      maxTimeInSeconds: 100
      maxTimeBetweenOutput: 100
      userMessageOnFailure: "Create mount point for results failed"
    - type: ExecuteCommand
      command: ["sudo", "mount", "-t", "nfs", "-o", "rw,nfsvers=3", "10.212.0.93:/data/axivion", "/data/axivion"]
      maxTimeInSeconds: 100
      maxTimeBetweenOutput: 100
      userMessageOnFailure: "Mount failed"
    - type: ExecuteCommand
      command: ["rm","-rf","{{.SourceDir}}"]
      maxTimeInSeconds: 100
      maxTimeBetweenOutput: 100
      userMessageOnFailure: "Failed to remove source directory"
    - type: MakeDirectory
      directory: "{{.SourceDir}}"
    - type: ChangeDirectory
      directory: "{{.SourceDir}}"
    - type: ExecuteCommand
      command: ["git", "clone", "--jobs={{.NumCPU}}", "-n","--depth=50", "git://{{.Env.QT_COIN_GIT_DAEMON}}/qt-project/qt/{{.Env.TESTED_MODULE_COIN}}","."]
      maxTimeInSeconds: 900
      maxTimeBetweenOutput: 900
      userMessageOnFailure: "Failed to clone repository"
    - type: ExecuteCommand
      command: ["git", "fetch", "--recurse-submodules", "origin", "{{.Env.TESTED_MODULE_REVISION_COIN}}"]
      maxTimeInSeconds: 900
      maxTimeBetweenOutput: 900
      userMessageOnFailure: "Failed to fetch sources"
    - type: ExecuteCommand
      command: ["git", "checkout", "--force", "{{.Env.TESTED_MODULE_REVISION_COIN}}"]
      maxTimeInSeconds: 900
      maxTimeBetweenOutput: 900
      userMessageOnFailure: "Failed to checkout sources"
    - type: ExecuteCommand
      command: ["git", "submodule", "update", "--init", "--recursive"]
      maxTimeInSeconds: 1800
      maxTimeBetweenOutput: 900
      userMessageOnFailure: "Failed to initialize git submodules"
    - type: Group
      instructions:
      - !include "{{qt/qtbase}}/cmake_module_build_instructions.yaml"
      enable_if:
        condition: runtime
        env_var: TESTED_MODULE_COIN
        not_equals_value: "qtbase"
    - type: Group
      instructions:
      - !include "{{qt/qtbase}}/cmake_qtbase_build_instructions.yaml"
      enable_if:
        condition: runtime
        env_var: TESTED_MODULE_COIN
        equals_value: "qtbase"

type: Group
instructions:
  - !include "{{qt/qtbase}}/prepare_building_env.yaml"
  - *build_environment_axivion
  - *analysis_instructions_axivion
enable_if:
  condition: runtime
  env_var: AXIVION_ANALYSIS
  equals_value: "1"