forked from Alpine-DAV/vtk-h
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
350 lines (327 loc) · 11.5 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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
###############################################################################
# Ascent CI Checks
###############################################################################
# Ref:
# https://aka.ms/yaml
# VTK-h ci tests
#####
# TO USE A NEW CONTAINER, UPDATE TAG NAME HERE AS PART OF YOUR PR!
#####
variables:
main_tag : alpinedav/ascent-ci:ubuntu-18-devel
cuda_tag : alpinedav/ascent-ci:ubuntu-18-cuda-10.1-devel
# only build merge target pr to develop
trigger: none
pr:
branches:
include:
- develop
# fast fail sanity checks
stages:
- stage: Sanity
jobs:
- job: BLT_Time_Travel_Check
pool:
vmImage: 'ubuntu-16.04'
steps:
- checkout: self
clean: boolean
submodules: recursive
- script: |
#######################################
# run our sanity check script
#######################################
git fetch
python scripts/ci/check_blt_time_travel.py
displayName: 'BLT Time Travel Check'
# main checks
- stage: Main
jobs:
###############################################################################
# Ubuntu build and test, using spack to build tpls
###############################################################################
- job: Main_Ubuntu_18
pool:
vmImage: 'ubuntu-16.04'
container: ${{ variables.main_tag }}
timeoutInMinutes: 0
variables:
COMPILER_CC: gcc
COMPILER_CXX: g++
COMPILER_FC: gfortran
strategy:
matrix:
shared:
BUILD_SHARED_LIBS: ON
CMAKE_BUILD_TYPE: Debug
ENABLE_FILTER_CONTOUR_TREE: OFF
VTKM_SPEC: ^vtk-m
static:
BUILD_SHARED_LIBS: OFF
CMAKE_BUILD_TYPE: Debug
ENABLE_FILTER_CONTOUR_TREE: OFF
VTKM_SPEC: ^vtk-m
sharedVTK-mMPI:
BUILD_SHARED_LIBS: ON
CMAKE_BUILD_TYPE: Debug
ENABLE_FILTER_CONTOUR_TREE: OFF
VTKM_SPEC: ^vtk-m+mpi
sharedVTK-mMPI-ctree:
BUILD_SHARED_LIBS: ON
CMAKE_BUILD_TYPE: Debug
ENABLE_FILTER_CONTOUR_TREE: ON
VTKM_SPEC: ^vtk-m+mpi
steps:
- checkout: self
clean: boolean
submodules: recursive
- script: |
##################
# setup build env
##################
# output env
cat etc/*rel*
env
# clean default paths
sudo rm -rf /usr/local/lib/android/
sudo rm -rf /usr/share/miniconda/
# add extra repo and update
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
# list pkgs we need
export APT_PKGS=binutils
export APT_PKGS="$APT_PKGS gcc"
export APT_PKGS="$APT_PKGS g++"
export APT_PKGS="$APT_PKGS gfortran"
export APT_PKGS="$APT_PKGS openmpi-bin"
export APT_PKGS="$APT_PKGS libopenmpi-dev"
export APT_PKGS="$APT_PKGS libncurses-dev"
export APT_PKGS="$APT_PKGS libssl-dev"
export APT_PKGS="$APT_PKGS zlib1g-dev"
# install pkgs we need
sudo apt-get -y install $APT_PKGS
displayName: 'Prepare build env'
- script: |
#################################
# run uber to build tpls
#################################
#
pwd
# echo system python details
which python
python --version
# setup spack spec
export SPACK_SPEC="%gcc+mpi ^[email protected] ${VTKM_SPEC}"
echo $SPACK_SPEC
# run uber to build tpls
python scripts/uberenv/uberenv.py --pull --spec "${SPACK_SPEC}" --spack-config-dir=scripts/uberenv/spack_configs/ci/ubuntu_18_devel/
displayName: 'Spack Build Tpls'
- script: |
#################################
# configure
#################################
# setup compiler env vars
export CC=${COMPILER_CC}
export CXX=${COMPILER_CXX}
export FC=${COMPILER_FC}
${CC} --version
# capture current path
export ROOT_DIR=`pwd`
# find spack generated host config file
export HOST_CONFIG=`ls ${ROOT_DIR}/uberenv_libs/*.cmake`
echo $HOST_CONFIG
# find spack installed cmake
export CMAKE_BIN_DIR=`ls -d ${ROOT_DIR}/uberenv_libs/spack/opt/spack/*/*/cmake*/bin`
export PATH=${CMAKE_BIN_DIR}:$PATH
echo $PATH
which cmake
cmake --version
# prepare build dir
mkdir build
cd build
# setup cmake options
export CMAKE_OPTS="-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
export CMAKE_OPTS="${CMAKE_OPTS} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}"
export CMAKE_OPTS="${CMAKE_OPTS} -DENABLE_FILTER_CONTOUR_TREE=${ENABLE_FILTER_CONTOUR_TREE}"
export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_INSTALL_PREFIX=../install"
# configure
cmake ${CMAKE_OPTS} -C ${HOST_CONFIG} ../src
displayName: 'Configure with CMake'
- script: |
#################################
# build
#################################
# build
cd build
make VERBOSE=1
displayName: 'Build'
- script: |
#################################
# test
#################################
# find spack installed cmake
export ROOT_DIR=`pwd`
export CMAKE_BIN_DIR=`ls -d ${ROOT_DIR}/uberenv_libs/spack/opt/spack/*/*/cmake*/bin`
export PATH=${CMAKE_BIN_DIR}:$PATH
which ctest
cd build
# run ctest
ctest -T test --output-on-failure -V
displayName: 'Run Unit Tests'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'cTest'
testResultsFiles: '**/Test.xml'
displayName: 'Unit Test Results'
condition: always()
- script: |
#################################
# install
#################################
cd build
make install
displayName: 'Install'
- script: |
###########################
# using with cmake example
###########################
pwd
ls -l
# find spack installed cmake
export ROOT_DIR=`pwd`
export CMAKE_BIN_DIR=`ls -d ${ROOT_DIR}/uberenv_libs/spack/opt/spack/*/*/cmake*/bin`
export PATH=${CMAKE_BIN_DIR}:$PATH
echo $PATH
which cmake
export VTKM_DIR=`ls -d ${ROOT_DIR}/uberenv_libs/spack/opt/spack/*/*/vtk-m*`
export VTKH_DIR=${ROOT_DIR}/install
cd install/examples/vtk-h/using-with-cmake
mkdir _test_build
cd _test_build
export EXAMPLE_CFG="-DVTKM_DIR=${VTKM_DIR} -DVTKH_DIR=${VTKH_DIR}"
echo $EXAMPLE_CFG
cmake ${EXAMPLE_CFG} ../
make VERBOSE=1
./example
displayName: 'Test vs Install (using-with-cmake)'
###############################################################################
# NVCC Linux build and install, using spack to build tpls
###############################################################################
- job: Main_Ubuntu_18_Cuda_10_2
pool:
vmImage: 'ubuntu-16.04'
container: ${{ variables.cuda_tag }}
timeoutInMinutes: 0
strategy:
matrix:
static_vtkh:
BUILD_SHARED_LIBS: OFF
CMAKE_BUILD_TYPE: Release
steps:
- checkout: self
clean: boolean
submodules: recursive
- script: |
#################################
# setup build env
#################################
# output env
cat etc/*rel*
env
whoami
sudo apt-get update
# list pkgs we need
export APT_PKGS=git
export APT_PKGS="$APT_PKGS python"
export APT_PKGS="$APT_PKGS gfortran"
export APT_PKGS="$APT_PKGS openmpi-bin"
export APT_PKGS="$APT_PKGS libopenmpi-dev"
export APT_PKGS="$APT_PKGS zlib1g-dev"
export APT_PKGS="$APT_PKGS curl"
# install pkgs we need
sudo apt-get -y install $APT_PKGS
displayName: 'Prepare build env'
- script: |
#################################
# run uber to build tpls
#################################
# echo system python details
which python
python --version
# setup spack spec (must be static)
export SPACK_SPEC="%gcc+mpi+cuda~openmp~shared"
export SPACK_SPEC="${SPACK_SPEC}${SPACK_SHARED_VARIANT} ^vtk-m+cuda${SPACK_SHARED_VARIANT}"
export SPACK_SPEC="${SPACK_SPEC} ^cmake~openssl~ncurses"
echo $SPACK_SPEC
# run uber to build tpls
python scripts/uberenv/uberenv.py --pull --spec "${SPACK_SPEC}" --spack-config-dir=scripts/uberenv/spack_configs/ci/ubuntu_18_cuda_10.1_devel/
displayName: 'Spack Build Tpls'
- script: |
#################################
# configure
#################################
# setup compiler env vars
export CC=gcc
export CXX=g++
export FC=gfortran
${CC} --version
# capture current path
export ROOT_DIR=`pwd`
# find spack generated host config file
export HOST_CONFIG=`ls ${ROOT_DIR}/uberenv_libs/*.cmake`
echo $HOST_CONFIG
# find spack installed cmake
export CMAKE_BIN_DIR=`ls -d ${ROOT_DIR}/uberenv_libs/spack/opt/spack/*/*/cmake*/bin`
export PATH=${CMAKE_BIN_DIR}:$PATH
echo $PATH
which cmake
cmake --version
# prepare build dir
mkdir build
cd build
# setup cmake options
export CMAKE_OPTS="-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
export CMAKE_OPTS="${CMAKE_OPTS} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}"
export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_INSTALL_PREFIX=../install"
# configure
cmake ${CMAKE_OPTS} -C ${HOST_CONFIG} ../src
displayName: 'Configure with CMake'
- script: |
#################################
# build
#################################
# build
cd build
make VERBOSE=1
displayName: 'Build'
- script: |
#################################
# install
#################################
cd build
make install
displayName: 'Install'
- script: |
#################################
# check install
#################################
ls install
displayName: 'Check Install'
failOnStderr: true
###############################################################################
# Docker build and test case, that leverages our script that calls Docker Build
###############################################################################
- job: Docker_Ubuntu
pool:
vmImage: 'ubuntu-16.04'
timeoutInMinutes: 0
steps:
- checkout: self
clean: boolean
submodules: recursive
- script: |
####################
# run docker build
####################
cd src/examples/docker/ubuntu/ && ./example_build.sh
displayName: 'Docker Build'