forked from AcademySoftwareFoundation/OpenColorIO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
274 lines (245 loc) · 7.53 KB
/
azure-pipelines.yml
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.
#
# azure-pipelines build file
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema
trigger:
batch: true
branches:
include:
- master
- RB-*
pr:
autoCancel: true
branches:
include:
- master
- RB-*
# TODO: Replace nightly build with PR SonarCloud check once quality gate is
# passing.
schedules:
- cron: "0 0 * * 0"
displayName: Full weekly build (always)
branches:
include:
- master
always: true
- cron: "0 0 * * 1-6"
displayName: Full nightly build (if changed)
branches:
include:
- master
variables:
- group: sonar
jobs:
# ------------------------------------------------------------------------------
# Linux
# ------------------------------------------------------------------------------
# Note: 'agentImage' is the Microsoft-hosted agent. 'containerImage' is the
# Docker container where the build occurs.
# Note: 'containerImage' images are hosted on DockerHub.
- job: Linux
strategy:
matrix:
CentOS 7 VFX CY2019:
containerImage: aswfstaging/ci-ocio:2019
useSSE: ON
buildType: Release
cxxCompiler: g++
cCompiler: gcc
CentOS 7 VFX CY2019 (no SSE):
containerImage: aswfstaging/ci-ocio:2019
useSSE: OFF
buildType: Release
cxxCompiler: g++
cCompiler: gcc
CentOS 7 Clang 7:
containerImage: aswfstaging/ci-ocio:2019
useSSE: ON
buildType: Release
cxxCompiler: clang++
cCompiler: clang
CentOS 7 Clang 7 (Debug):
containerImage: aswfstaging/ci-ocio:2019
useSSE: ON
buildType: Debug
cxxCompiler: clang++
cCompiler: clang
pool:
vmImage: 'ubuntu-16.04'
container: $[ variables['containerImage'] ]
steps:
- template: share/ci/templates/checkout.yml
- template: share/ci/templates/configure.yml
parameters:
useSSE: $(useSSE)
buildType: $(buildType)
cxxCompiler: $(cxxCompiler)
cCompiler: $(cCompiler)
- template: share/ci/templates/build.yml
parameters:
buildType: $(buildType)
cxxCompiler: $(cxxCompiler)
cCompiler: $(cCompiler)
cmakeOpts: -- -j2
# ----------------------------------
# Latest dependency tags (cron only)
# ----------------------------------
- job: Latest
strategy:
matrix:
Linux CentOS 7 VFX CY2019:
containerImage: aswfstaging/ci-base:2019
cxxCompiler: g++
cCompiler: gcc
Linux CentOS 7 Clang 7:
containerImage: aswfstaging/ci-base:2019
cxxCompiler: clang++
cCompiler: clang
pool:
vmImage: 'ubuntu-16.04'
container: $[ variables['containerImage'] ]
condition: in(variables['Build.Reason'], 'Manual', 'Schedule')
steps:
- template: share/ci/templates/checkout.yml
- bash: |
share/ci/scripts/linux/install_expat.sh latest
share/ci/scripts/linux/install_lcms2.sh latest
share/ci/scripts/linux/install_yaml-cpp.sh latest
share/ci/scripts/linux/install_pystring.sh latest
share/ci/scripts/linux/install_openexr.sh latest
share/ci/scripts/linux/install_oiio.sh latest
share/ci/scripts/linux/install_sphinx.sh latest
displayName: Install dependencies
- template: share/ci/templates/configure.yml
parameters:
installExtPkgs: NONE
cxxCompiler: $(cxxCompiler)
cCompiler: $(cCompiler)
- template: share/ci/templates/build.yml
parameters:
cxxCompiler: $(cxxCompiler)
cCompiler: $(cCompiler)
cmakeOpts: -- -j2
# --------------------------------------
# SonarCloud static analysis (cron only)
# --------------------------------------
- job: SonarCloud
strategy:
matrix:
Linux CentOS 7 VFX CY2019:
containerImage: aswfstaging/ci-ocio:2019
pool:
vmImage: 'ubuntu-16.04'
container: $[ variables['containerImage'] ]
condition: in(variables['Build.Reason'], 'Manual', 'Schedule')
steps:
- template: share/ci/templates/checkout.yml
- template: share/ci/templates/configure.yml
parameters:
cxxFlags: -g -O0 -fprofile-arcs -ftest-coverage
cmakeOpts: |
-DCMAKE_EXE_LINKER_FLAGS="-lgcov" \
-DCMAKE_CXX_OUTPUT_EXTENSION_REPLACE=ON
- template: share/ci/templates/build_sonar.yml
# ------------------------------------------------------------------------------
# macOS
# ------------------------------------------------------------------------------
- job: macOS
strategy:
matrix:
10.14 AppleClang 10.0:
agentImage: 'macOS-10.14'
buildType: Release
10.14 AppleClang 10.0 (Debug):
agentImage: 'macOS-10.14'
buildType: Debug
10.13 AppleClang 10.0:
agentImage: 'macOS-10.13'
buildType: Release
pool:
vmImage: $(agentImage)
steps:
- template: share/ci/templates/checkout.yml
- bash: |
share/ci/scripts/macos/install.sh
share/ci/scripts/macos/install_python.sh 2.7.16
displayName: Install dependencies
- template: share/ci/templates/configure.yml
parameters:
buildType: $(buildType)
cmakeOpts: |
-DPYTHON_INCLUDE_DIR=$(python-config --prefix)/include/python2.7 \
-DPYTHON_LIBRARY=$(python-config --prefix)/lib/libpython2.7.dylib \
-DPYTHON_EXECUTABLE=$(which python2)
- template: share/ci/templates/build.yml
parameters:
buildType: $(buildType)
cmakeOpts: -- -j2
# ------------------------------------------------------------------------------
# Windows
# ------------------------------------------------------------------------------
# TODO: Install pythonXX_d.lib (or work around it being needed) to support Debug
# build testing with Python bindings and docs enabled.
- job: Windows
strategy:
matrix:
2016 MSVC 14.16:
agentImage: 'vs2017-win2016'
buildType: Release
buildSharedLibs: ON
buildPython: ON
buildDocs: ON
installPython: false
2016 MSVC 14.16 (static):
agentImage: 'vs2017-win2016'
buildType: Release
buildSharedLibs: OFF
buildPython: ON
buildDocs: OFF
installPython: false
2016 MSVC 14.16 (Debug):
agentImage: 'vs2017-win2016'
buildType: Debug
buildSharedLibs: ON
buildPython: OFF
buildDocs: OFF
installPython: false
2012 MSVC 14.0:
agentImage: 'vs2015-win2012r2'
buildType: Release
buildSharedLibs: ON
buildPython: ON
buildDocs: ON
installPython: true
pool:
vmImage: $(agentImage)
steps:
- template: share/ci/templates/checkout.yml
- powershell: |
share/ci/scripts/windows/install_cmake.ps1 3.11.0
displayName: Install CMake
- powershell: |
share/ci/scripts/windows/install_python.ps1 2.7.16
displayName: Install Python
condition: and(succeeded(), eq(variables['installPython'], 'true'))
- task: UsePythonVersion@0
inputs:
versionSpec: '2.7'
addToPath: true
architecture: 'x64'
displayName: Configure Python
condition: and(succeeded(), eq(variables['installPython'], 'false'))
- template: share/ci/templates/configure.yml
parameters:
buildType: $(buildType)
buildSharedLibs: $(buildSharedLibs)
buildPython: $(buildPython)
buildDocs: $(buildDocs)
verbose: ON
cmakeOpts: |
-DCMAKE_GENERATOR_PLATFORM=x64 \
-DPYTHON_EXECUTABLE=$(which python)
- template: share/ci/templates/build.yml
parameters:
buildType: $(buildType)