summaryrefslogtreecommitdiff
path: root/coin/instructions/build.yaml
blob: 23461dbcf4e47aa2d8d851e8ceba4ae19ad2b29a (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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
type: Group
instructions:
  - type: MakeDirectory
    directory: "{{.AgentWorkingDir}}/build/qt_temp"

  - type: Group
    instructions:
      - type: ExecuteCommand
        command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}/build/qt_temp/elfutils-release_0.175qt-linux-x86_64.7z http://master.qt.io/development_releases/prebuilt/elfutils/elfutils-release_0.175qt-linux-x86_64.7z"
        maxTimeInSeconds: 3600
        maxTimeBetweenOutput: 360
        userMessageOnFailure: "Failed to download elfutils package, check logs."
      - type: ExecuteCommand
        command: "/usr/bin/7z x -y {{.AgentWorkingDir}}/build/qt_temp/elfutils-release_0.175qt-linux-x86_64.7z -o{{.AgentWorkingDir}}/build/qt_temp/elfutils"
        maxTimeInSeconds: 3600
        maxTimeBetweenOutput: 360
        userMessageOnFailure: "Failed to extract elfutils package, check logs."
      - type: ExecuteCommand
        command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}/build/qt_temp/libclang.7z {{.Env.LLVM_BASE_URL}}-linux-Rhel8.2-gcc9.2-x86_64.7z"
        maxTimeInSeconds: 3600
        maxTimeBetweenOutput: 360
        userMessageOnFailure: "Failed to download LLVM package, check logs."
      - type: ExecuteCommand
        command: "/usr/bin/7z x -y {{.AgentWorkingDir}}/build/qt_temp/libclang.7z -o{{.AgentWorkingDir}}/build/qt_temp/"
        maxTimeInSeconds: 3600
        maxTimeBetweenOutput: 360
        userMessageOnFailure: "Failed to extract LLVM package, check logs."
      - type: ExecuteCommand
        command: "python3 -u {{.AgentWorkingDir}}/qt-creator/qt-creator/scripts/build.py --build-type {{.Env.QTC_BUILD_TYPE}} --src {{.AgentWorkingDir}}/qt-creator/qt-creator --build {{.AgentWorkingDir}}/qt-creator/qt-creator_build --qt-path {{.AgentWorkingDir}}/build/qt_install_dir --elfutils-path {{.AgentWorkingDir}}/build/qt_temp/elfutils --llvm-path {{.AgentWorkingDir}}/build/qt_temp/libclang --with-tests --no-zip --add-config=-DCMAKE_C_COMPILER_LAUNCHER=sccache --add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
        maxTimeInSeconds: 36000
        maxTimeBetweenOutput: 3600
        userMessageOnFailure: "Failed to run build.py, check logs."
      - type: ChangeDirectory
        directory: "{{.AgentWorkingDir}}/build/qtsdk/packaging-tools"
      - type: ExecuteCommand
        command: "python3 -m pipenv run python -u bld_sdktool.py --qt-url {{.Env.QTC_SDKTOOL_QT_BASE_URL}}{{.Env.QTC_SDKTOOL_QT_EXT}} --qt-build {{.AgentWorkingDir}}/build/sdktool/qt --src {{.AgentWorkingDir}}/qt-creator/qt-creator/src/tools/sdktool --build {{.AgentWorkingDir}}/build/sdktool/build --install {{.AgentWorkingDir}}/build/sdktool/install --make-command make"
        maxTimeInSeconds: 36000
        maxTimeBetweenOutput: 3600
        userMessageOnFailure: "Failed to build sdktool, check logs."
    enable_if:
      condition: and
      conditions:
        - condition: property
          property: host.os
          equals_value: Linux
        - condition: property
          property: target.compiler
          in_values: [GCC]

  - type: Group
    instructions:
      - type: ExecuteCommand
        command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}/build/qt_temp/libclang.7z {{.Env.LLVM_BASE_URL}}-macos-universal.7z"
        maxTimeInSeconds: 3600
        maxTimeBetweenOutput: 360
        userMessageOnFailure: "Failed to download LLVM package, check logs."
      - type: ExecuteCommand
        command: "/usr/local/bin/7z x -y {{.AgentWorkingDir}}/build/qt_temp/libclang.7z -o{{.AgentWorkingDir}}/build/qt_temp/"
        maxTimeInSeconds: 3600
        maxTimeBetweenOutput: 360
        userMessageOnFailure: "Failed to extract LLVM package, check logs."
      - type: ExecuteCommand
        command: "python3 -u {{.AgentWorkingDir}}/qt-creator/qt-creator/scripts/build.py --build-type {{.Env.QTC_BUILD_TYPE}} --src {{.AgentWorkingDir}}/qt-creator/qt-creator --build {{.AgentWorkingDir}}/qt-creator/qt-creator_build --qt-path {{.AgentWorkingDir}}/build/qt_install_dir --llvm-path {{.AgentWorkingDir}}/build/qt_temp/libclang --keychain-unlock-script /Users/qt/unlock-keychain.sh --with-tests --no-zip --add-config=-DCMAKE_C_COMPILER_LAUNCHER=sccache --add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
        maxTimeInSeconds: 36000
        maxTimeBetweenOutput: 3600
        userMessageOnFailure: "Failed to run build.py, check logs."
      - type: ChangeDirectory
        directory: "{{.AgentWorkingDir}}/build/qtsdk/packaging-tools"
      - type: ExecuteCommand
        command: "python3 -m pipenv run python -u bld_sdktool.py --qt-url {{.Env.QTC_SDKTOOL_QT_BASE_URL}}{{.Env.QTC_SDKTOOL_QT_EXT}} --qt-build {{.AgentWorkingDir}}/build/sdktool/qt --src {{.AgentWorkingDir}}/qt-creator/qt-creator/src/tools/sdktool --build {{.AgentWorkingDir}}/build/sdktool/build --install {{.AgentWorkingDir}}/build/sdktool/install --make-command make"
        maxTimeInSeconds: 36000
        maxTimeBetweenOutput: 3600
        userMessageOnFailure: "Failed to build sdktool, check logs."
    enable_if:
      condition: property
      property: host.os
      equals_value: MacOS

  - type: Group
    instructions:
      - type: ExecuteCommand
        command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\build\\qt_temp\\elfutils-release_0.175qt-windows-x86_64.7z http://master.qt.io/development_releases/prebuilt/elfutils/elfutils-release_0.175qt-windows-x86_64.7z"
        maxTimeInSeconds: 3600
        maxTimeBetweenOutput: 360
        userMessageOnFailure: "Failed to download elfutils package, check logs."
      - type: ExecuteCommand
        command: "C:\\Utils\\sevenzip\\7z.exe x -y {{.AgentWorkingDir}}\\build\\qt_temp\\elfutils-release_0.175qt-windows-x86_64.7z -o{{.AgentWorkingDir}}\\build\\qt_temp\\elfutils"
        maxTimeInSeconds: 3600
        maxTimeBetweenOutput: 360
        userMessageOnFailure: "Failed to extract elfutils package, check logs."
      - type: ExecuteCommand
        command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\build\\qt_temp\\Python38-win-x64.7z http://master.qt.io/development_releases/prebuilt/python/Python38-win-x64.7z"
        maxTimeInSeconds: 3600
        maxTimeBetweenOutput: 360
        userMessageOnFailure: "Failed to download python package, check logs."
      - type: ExecuteCommand
        command: "C:\\Utils\\sevenzip\\7z.exe x -y {{.AgentWorkingDir}}\\build\\qt_temp\\Python38-win-x64.7z -o{{.AgentWorkingDir}}\\build\\qt_temp\\python"
        maxTimeInSeconds: 3600
        maxTimeBetweenOutput: 360
        userMessageOnFailure: "Failed to extract python package, check logs."
      - type: ExecuteCommand
        command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\build\\qt_temp\\libclang.7z {{.Env.LLVM_BASE_URL}}-windows-vs2019_64.7z"
        maxTimeInSeconds: 3600
        maxTimeBetweenOutput: 360
        userMessageOnFailure: "Failed to download LLVM package, check logs."
      - type: ExecuteCommand
        command: "C:\\Utils\\sevenzip\\7z.exe x -y {{.AgentWorkingDir}}\\build\\qt_temp\\libclang.7z -o{{.AgentWorkingDir}}\\build\\qt_temp\\"
        maxTimeInSeconds: 3600
        maxTimeBetweenOutput: 360
        userMessageOnFailure: "Failed to extract LLVM package, check logs."
      - type: ExecuteCommand
        command: "python -u {{.AgentWorkingDir}}\\qt-creator\\qt-creator\\scripts\\build.py --build-type {{.Env.QTC_BUILD_TYPE}} --src {{.AgentWorkingDir}}\\qt-creator\\qt-creator --build {{.AgentWorkingDir}}\\qt-creator\\qt-creator_build --qt-path {{.AgentWorkingDir}}/build/qt_install_dir --python-path {{.AgentWorkingDir}}\\build\\qt_temp\\python --elfutils-path {{.AgentWorkingDir}}\\buid\\qt_temp\\elfutils --llvm-path {{.AgentWorkingDir}}\\build\\qt_temp\\libclang --with-tests --no-zip --add-config=-DCMAKE_C_COMPILER_LAUNCHER=sccache --add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=sccache --add-config=-DWITH_SCCACHE_SUPPORT=ON"
        maxTimeInSeconds: 36000
        maxTimeBetweenOutput: 3600
        userMessageOnFailure: "Failed to run build.py, check logs."
      - type: ChangeDirectory
        directory: "{{.AgentWorkingDir}}\\build\\qtsdk\\packaging-tools"
      - type: ExecuteCommand
        command: "python -m pipenv run python -u bld_sdktool.py --qt-url {{.Env.QTC_SDKTOOL_QT_BASE_URL}}{{.Env.QTC_SDKTOOL_QT_EXT}} --qt-build {{.AgentWorkingDir}}\\build\\sdktool\\qt --src {{.AgentWorkingDir}}\\qt-creator\\qt-creator\\src\\tools\\sdktool --build {{.AgentWorkingDir}}\\build\\sdktool\\build --install {{.AgentWorkingDir}}\\build\\sdktool\\install --make-command nmake"
        maxTimeInSeconds: 36000
        maxTimeBetweenOutput: 3600
        userMessageOnFailure: "Failed to build sdktool, check logs."
    enable_if:
      condition: and
      conditions:
        - condition: property
          property: target.compiler
          in_values: [MSVC2013, MSVC2015, MSVC2017, MSVC2019]
        - condition: property
          property: target.arch
          equals_value: X86_64

  - type: Group
    instructions:
      - type: MakeDirectory
        directory: "{{.AgentWorkingDir}}/build/qt_temp"
        maxTimeInSeconds: 3600
        maxTimeBetweenOutput: 360
        userMessageOnFailure: "Failed to create folder qt_temp, check logs."
      - type: ExecuteCommand
        command: "curl --fail -L --retry 5 --retry-delay 5 -o {{.AgentWorkingDir}}\\build\\qt_temp\\Python38-win-x86.7z http://master.qt.io/development_releases/prebuilt/python/Python38-win-x86.7z"
        maxTimeInSeconds: 3600
        maxTimeBetweenOutput: 360
        userMessageOnFailure: "Failed to download python package, check logs."
      - type: ExecuteCommand
        command: "C:\\Utils\\sevenzip\\7z.exe x -y {{.AgentWorkingDir}}\\build\\qt_temp\\Python38-win-x86.7z -o{{.AgentWorkingDir}}\\build\\qt_temp\\python"
        maxTimeInSeconds: 3600
        maxTimeBetweenOutput: 360
        userMessageOnFailure: "Failed to extract python package, check logs."
      - type: ExecuteCommand
        command: "python -u {{.AgentWorkingDir}}\\qt-creator\\qt-creator\\scripts\\build.py --build-type {{.Env.QTC_BUILD_TYPE}} --src {{.AgentWorkingDir}}\\qt-creator\\qt-creator --build {{.AgentWorkingDir}}\\qt-creator\\qt-creator_build --python-path {{.AgentWorkingDir}}\\buid\\qt_temp\\python --no-qtcreator --no-zip"
        maxTimeInSeconds: 36000
        maxTimeBetweenOutput: 3600
        userMessageOnFailure: "Failed to run build.py, check logs."
    enable_if:
      condition: and
      conditions:
        - condition: property
          property: target.compiler
          in_values: [MSVC2013, MSVC2015, MSVC2017, MSVC2019]
        - condition: property
          property: target.arch
          equals_value: X86

  - type: UploadArtifact
    archiveDirectory: "{{.AgentWorkingDir}}/qt-creator/qt-creator_build/build"
    transferType: UploadModuleBuildArtifact
    maxTimeInSeconds: 1800
    maxTimeBetweenOutput: 1800

enable_if:
  condition: property
  property: features
  not_contains_value: "Qt5"