forked from darbyjohnston/DJV
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
277 lines (239 loc) · 8.72 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
275
276
277
trigger:
- master
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-18.04'
container:
image: aswftesting/ci-base:2020.1
steps:
- script: |
# Create a build directory
mkdir build
cd build
# ASWF container doesn't have lcov or nasm
sudo yum install -y epel-release
sudo yum install -y lcov nasm
# This seems to be sufficient to make OpenGL / GLX software rasterization work
sudo yum install -y mesa-dri-drivers
# OTIO build needs a git user
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
# Setup environment variables
export DJV_BUILD=$PWD
export PATH=$DJV_BUILD/install/bin:$PATH
export LD_LIBRARY_PATH=$DJV_BUILD/install/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$DJV_BUILD/install/lib:$PYTHONPATH
# Build CMake 3.18
echo "Building CMake..."
wget https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4.tar.gz
tar zxvf cmake-3.18.4.tar.gz
cd cmake-3.18.4
./configure --prefix=$DJV_BUILD/install --parallel=4
make -j 4
make install
cd ..
# Build DJV
echo "Building DJV..."
mkdir SuperBuild
cd SuperBuild
cmake ../../etc/SuperBuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$DJV_BUILD/install -DCMAKE_PREFIX_PATH=$DJV_BUILD/install -DDJV_THIRD_PARTY_OPTIONAL=FALSE -DDJV_BUILD_TINY=TRUE -DDJV_GCOV=TRUE -DDJV_GL_ES2=TRUE
# ASWF ci-base image already contains the SonarCloud tools in /usr/bin
build-wrapper-linux-x86-64 --out-dir ../bw-output cmake --build . -j 4
cd ..
# Run tests
echo "Running DJV tests..."
cd SuperBuild/DJV/src/DJV-build
# Need to request 24bit visual to get OpenGL
xvfb-run --server-args "-screen 0 640x480x24" cmake --build . --target test
cat Testing/Temporary/LastTest.log
sh ../../../../../etc/Util/gcov.sh ../../../../..
cd ../../../..
# Return to the original directory
cd ..
- job: Linux_Packaging
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
# Create a build directory
mkdir build
cd build
# Install software
sudo apt-get install libgl1-mesa-dev xorg-dev libasound2-dev
# OTIO build needs a git user
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
# Setup environment variables
export DJV_BUILD=$PWD
export PATH=$DJV_BUILD/install/bin:$PATH
export LD_LIBRARY_PATH=$DJV_BUILD/install/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$DJV_BUILD/install/lib:$PYTHONPATH
# Build CMake 3.18
echo "Building CMake..."
wget https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4.tar.gz
tar zxvf cmake-3.18.4.tar.gz
cd cmake-3.18.4
./configure --prefix=$DJV_BUILD/install --parallel=4
make -j 4
make install
cd ..
# Build DJV
echo "Building DJV..."
mkdir SuperBuild
cd SuperBuild
cmake ../../etc/SuperBuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$DJV_BUILD/install -DCMAKE_PREFIX_PATH=$DJV_BUILD/install
cmake --build . -j 4
cd ..
# Package DJV
echo "Packaging DJV..."
cd SuperBuild/DJV/src/DJV-build
sudo apt-get install rpm-build
cmake ../../../../.. -DCPACK_GENERATOR=RPM -DCPACK_PACKAGING_INSTALL_PREFIX=/usr/local/DJV2 -DDJV_THIRD_PARTY=TRUE
cmake --build . -j 4
cmake --build . --target package
cmake ../../../../.. -DCPACK_GENERATOR=DEB -DCPACK_PACKAGING_INSTALL_PREFIX=/usr/local/DJV2 -DDJV_THIRD_PARTY=TRUE
cmake --build . -j 4
cmake --build . --target package
cmake ../../../../.. -DCPACK_GENERATOR=TGZ -DCPACK_PACKAGING_INSTALL_PREFIX= -DDJV_THIRD_PARTY=TRUE
cmake --build . -j 4
cmake --build . --target package
cd ../../../..
# Return to the original directory
cd ..
- job: Windows
pool:
vmImage: 'windows-latest'
steps:
- script: |
REM Create a build directory
mkdir build
cd build
REM Setup environment variables
set DJV_BUILD=%CD%
set PATH=%DJV_BUILD%\install\bin;%PATH%
set PYTHONPATH=%DJV_BUILD%\install\lib;%PYTHONPATH%
REM Build DJV
echo "Building DJV..."
mkdir SuperBuild
cd SuperBuild
cmake ..\..\etc\SuperBuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=%DJV_BUILD%/install -DCMAKE_PREFIX_PATH=%DJV_BUILD%/install -DDJV_THIRD_PARTY_OPTIONAL=FALSE -DDJV_BUILD_TINY=TRUE -DDJV_GL_ES2=TRUE
cmake --build . --config Debug -j
cd ..
REM Return to the original directory
cd ..
- job: Windows_Packaging
pool:
vmImage: 'windows-latest'
steps:
- powershell: |
$ErrorActionPreference = "Stop"
$url = "https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/win64/nasm-2.14.02-win64.zip"
Invoke-WebRequest -Uri $url -OutFile nasm-2.14.02-win64.zip -UserAgent "NativeClient"
mkdir build
Expand-Archive nasm-2.14.02-win64.zip -DestinationPath build
displayName: 'Download NASM'
- script: |
REM Create a build directory
mkdir build
cd build
REM Setup environment variables
set DJV_BUILD=%CD%
set PATH=%DJV_BUILD%\nasm-2.14.02;%PATH%
set PATH=%DJV_BUILD%\install\bin;%DJV_DIR%\nasm-2.14.02;%PATH%
set PYTHONPATH=%DJV_BUILD%\install\lib;%PYTHONPATH%
REM Build DJV
echo "Building DJV..."
mkdir SuperBuild
cd SuperBuild
cmake ..\..\etc\SuperBuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%DJV_BUILD%/install -DCMAKE_PREFIX_PATH=%DJV_BUILD%/install
cmake --build . --config Release -j
cd ..
REM Package DJV
echo "Packaging DJV..."
cd SuperBuild\DJV\src\DJV-build
cmake ..\..\..\..\.. -DDJV_THIRD_PARTY=TRUE
cmake --build . --config Release -j
cmake --build . --config Release --target package
cd ..\..\..\..
REM Return to the original directory
cd ..
- job: macOS
pool:
vmImage: 'macOS-latest'
steps:
- script: |
# Create a build directory
mkdir build
cd build
# Setup environment variables
export DJV_BUILD=$PWD
export PATH=$DJV_BUILD/install/bin:$PATH
export DYLD_LIBRARY_PATH=$DJV_BUILD/install/lib:$DYLD_LIBRARY_PATH
export PYTHONPATH=$DJV_BUILD/install/lib:$PYTHONPATH
# Build CMake 3.18
echo "Building CMake..."
wget https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4.tar.gz
tar zxvf cmake-3.18.4.tar.gz
cd cmake-3.18.4
./configure --prefix=$DJV_BUILD/install --parallel=4
make -j 4
make install
cd ..
# Build DJV
echo "Building DJV..."
mkdir SuperBuild
cd SuperBuild
cmake ../../etc/SuperBuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$DJV_BUILD/install -DCMAKE_PREFIX_PATH=$DJV_BUILD/install -DDJV_THIRD_PARTY_OPTIONAL=FALSE -DDJV_BUILD_TINY=TRUE -DDJV_GL_ES2=TRUE -DCMAKE_FIND_FRAMEWORK="LAST"
cmake --build . -j 4
cd ..
# Run tests
echo "Running DJV tests..."
cd SuperBuild/DJV/src/DJV-build
# Fails with:
# Unable to create basic Accelerated OpenGL renderer.
# Core Image is now using the software OpenGL renderer. This will be slow.
# ERROR: Cannot create GLFW window.
#cmake --build . --target test
#cat Testing/Temporary/LastTest.log
cd ../../../..
# Return to the original directory
cd ..
- job: macOS_Packaging
pool:
vmImage: 'macOS-latest'
steps:
- script: |
# Create a build directory
mkdir build
cd build
# Setup environment variables
export DJV_BUILD=$PWD
export PATH=$DJV_BUILD/install/bin:$PATH
export DYLD_LIBRARY_PATH=$DJV_BUILD/install/lib:$DYLD_LIBRARY_PATH
export PYTHONPATH=$DJV_BUILD/install/lib:$PYTHONPATH
# Build CMake 3.18
echo "Building CMake..."
wget https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4.tar.gz
tar zxvf cmake-3.18.4.tar.gz
cd cmake-3.18.4
./configure --prefix=$DJV_BUILD/install --parallel=4
make -j 4
make install
cd ..
# Build DJV
echo "Building DJV..."
mkdir SuperBuild
cd SuperBuild
cmake ../../etc/SuperBuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$DJV_BUILD/install -DCMAKE_PREFIX_PATH=$DJV_BUILD/install -DCMAKE_FIND_FRAMEWORK="LAST"
cmake --build . -j 4
cd ..
# Packaging DJV
echo "Packaging DJV..."
cd SuperBuild/DJV/src/DJV-build
cmake ../../../../.. -DDJV_THIRD_PARTY=TRUE
cmake --build . -j 4
cmake --build . --target package
cd ../../../..
# Return to the original directory
cd ..