forked from topology-tool-kit/ttk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
629 lines (541 loc) · 22.6 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
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
# TODO could clone ttk-data and use a pvsm
# TODO could also try a docker deploy
trigger:
branches:
include:
- dev
jobs:
# ------------------------------
# Linux build
# ------------------------------
# VTK: No OpenGL rendering on this pipeline
# Test with GCC-6 and VTK 8.90 (Unofficial) Release
# Test with GCC-7 and VTK 9.0 Debug
- job:
condition: false # can be used to disable this pipeline
displayName: Ubuntu-VTK-Python3-OpenMP-Ninja
strategy:
matrix:
GCC-6-Release:
imageName: 'ubuntu-18.04'
CC: gcc-6
CXX: g++-6
BuildType: Release
SelfHost: false
GCC-7-Debug:
imageName: 'ubuntu-18.04'
CC: gcc-7
CXX: g++-7
BuildType: Debug
SelfHost: false
pool:
vmImage: $(imageName)
variables:
CMakeArgs: ''
CCACHE_DIR: $(Pipeline.Workspace)/ccache
LD_LIBRARY_PATH: $(Build.ArtifactStagingDirectory)/vtk-install/lib:$(Build.ArtifactStagingDirectory)/ttk-install/lib
VTKVersion: v9.0.0
VTKVPath: 9.0
# cmake will compains about unused variables
VTK8_NO_RENDERING: '-DVTK_Group_Rendering=OFF
-DVTK_RENDERING_BACKEND=None'
VTK9_NO_RENDERING: '-DVTK_GROUP_ENABLE_Rendering=NO'
# disable modules depending on rendering
TTK_MODULE_DISABLE: '-DVTK_MODULE_ENABLE_ttkAddFieldData=NO
-DVTK_MODULE_ENABLE_ttkCinemaWriter=NO
-DVTK_MODULE_ENABLE_ttkCinemaReader=NO
-DVTK_MODULE_ENABLE_ttkCinemaQuery=NO
-DVTK_MODULE_ENABLE_ttkCinemaImaging=NO
-DVTK_MODULE_ENABLE_ttkUserInterfaceBase=NO
-DVTK_MODULE_ENABLE_ttkWRLExporter=NO'
# used for dev
TTK_MODULE_TEST: ''
steps:
- script: |
echo 'Configure distribution'
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y ccache
sudo apt-get install -y ninja-build libc++-dev libc++abi-dev libc++abi1 libstdc++-7-dev libboost-all-dev gcc-7 g++-7 gcc-6 g++-6 python3 libomp-dev libomp5
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/$(CC) 100
sudo update-alternatives --set cc /usr/bin/$(CC)
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/$(CXX) 100
sudo update-alternatives --set c++ /usr/bin/$(CXX)
displayName: 'Install dependencies'
- task: Cache@2
inputs:
key: VTK | $(Agent.OS) | "$(VTKVersion)" | "v-11-16-20c"
path: $(Build.ArtifactStagingDirectory)/vtk-install
cacheHitVar: CACHE_RESTORED
displayName: Cache VTK build
- script: |
git clone --quiet https://gitlab.kitware.com/vtk/vtk.git
cd vtk
git checkout $(VTKVersion)
git submodule update --init --recursive
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: 'Clone VTK $(VTKVPath)'
- task: CMake@1
inputs:
workingDirectory: 'vtk/build'
cmakeArgs: '.. $(CMakeArgs)
$(VTK8_NO_RENDERING)
$(VTK9_NO_RENDERING)
-GNinja
-DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory)/vtk-install
-DCMAKE_BUILD_TYPE=$(BuildType)
-DVTK_BUILD_TESTING=OFF
-DVTK_WRAP_PYTHON=YES
-DVTK_PYTHON_VERSION=3'
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: 'Configure VTK $(VTKVPath)'
- script: |
cmake --build . --target install
workingDirectory: 'vtk/build'
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: 'Build and install VTK (No rendering)'
- task: Cache@2
inputs:
key: ccache | "$(Agent.OS)" | "$(Build.SourceVersion)"
restoreKeys: ccache | "$(Agent.OS)"
path: $(CCACHE_DIR)
displayName: ccache
- task: CMake@1
inputs:
workingDirectory: 'build/'
cmakeArgs: '.. $(CMakeArgs)
-GNinja
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory)/ttk-install
-DCMAKE_BUILD_TYPE=$(BuildType)
-DVTK_DIR=$(Build.ArtifactStagingDirectory)/vtk-install/lib/cmake/vtk-$(VTKVPath)
-DTTK_BUILD_PARAVIEW_PLUGINS=OFF
-DTTK_ENABLE_CPU_OPTIMIZATION=OFF
-DTTK_BUILD_STANDALONE_APPS=ON
$(TTK_MODULE_DISABLE)
$(TTK_MODULE_TEST)'
displayName: 'Configure TTK'
- script: |
cmake --build . --target install
workingDirectory: 'build/'
displayName: 'Build and install TTK'
- script: |
./bin/ttkHelloWorldCmd -i $(Build.SourcesDirectory)/examples/data/inputData.vtu
workingDirectory: '$(Build.ArtifactStagingDirectory)/ttk-install/'
displayName: 'Test TTK command line'
- task: CMake@1
inputs:
workingDirectory: 'build-example/'
cmakeArgs: '../examples/c++ $(CMakeArgs)
-GNinja
-DCMAKE_BUILD_TYPE=$(BuildType)
-DCMAKE_PREFIX_PATH=$(Build.ArtifactStagingDirectory)/ttk-install/lib/cmake'
displayName: 'Configure C++ Example'
- script: |
cmake --build .
workingDirectory: 'build-example/'
displayName: 'Build C++ Example'
- task: CMake@1
inputs:
workingDirectory: 'build-example-vtk/'
cmakeArgs: '../examples/vtk-c++ $(CMakeArgs)
-GNinja
-DCMAKE_BUILD_TYPE=$(BuildType)
-DVTK_DIR=$(Build.ArtifactStagingDirectory)/vtk-install/lib/cmake/vtk-$(VTKVPath)
-DCMAKE_PREFIX_PATH=$(Build.ArtifactStagingDirectory)/ttk-install/lib/cmake'
displayName: 'Configure TTKVTK Example'
- script: |
cmake --build .
workingDirectory: 'build-example-vtk/'
displayName: 'Build TTKVTK Example'
# ParaView
- job:
condition: true
displayName: Ubuntu-PV-Python3-Eigen-Make
timeoutInMinutes: 180
pool:
vmImage: 'ubuntu-18.04'
variables:
CMakeArgs: ''
CCACHE_DIR: $(Pipeline.Workspace)/ccache
LD_LIBRARY_PATH: $(Build.ArtifactStagingDirectory)/pv-install/lib:$(Build.ArtifactStagingDirectory)/ttk-install/lib
PV_VERSION: 'v5.8.1'
PV_V: '5.8'
TTK_MODULE_DISABLE: ''
# used for dev
TTK_MODULE_TEST: ''
strategy:
matrix:
GCC-7 Release:
CC: gcc-7
CXX: g++-7
BuildType: Release
SelfHost: false
steps:
- script: |
echo "Configure distribution"
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y ccache
sudo apt-get install -y libboost-all-dev libc++-dev libc++abi-dev libc++abi1 libstdc++-7-dev gcc-7 g++-7
sudo apt-get install -y libosmesa6-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev libeigen3-dev graphviz-dev python3 python3-sklearn libglew-dev
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/$(CC) 100
sudo update-alternatives --set cc /usr/bin/$(CC)
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/$(CXX) 100
sudo update-alternatives --set c++ /usr/bin/$(CXX)
displayName: 'Install dependencies'
- task: Cache@2
inputs:
key: ParaView | $(Agent.OS) | "$(PV_VERSION)" | "v-11-16-20c"
path: $(Build.ArtifactStagingDirectory)/pv-install
cacheHitVar: CACHE_RESTORED
displayName: Cache ParaView build
- script: |
wget https://www.paraview.org/files/v$(PV_V)/ParaView-$(PV_VERSION).tar.xz
xz -d ParaView-$(PV_VERSION).tar.xz
tar xvf ParaView-$(PV_VERSION).tar
mkdir ParaView-$(PV_VERSION)/build
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: 'Download and extract ParaView $(PV_VERSION)'
- script: |
./patch-paraview-5.8.1.sh ../../ParaView-$(PV_VERSION)
workingDirectory: 'paraview/patch'
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: 'Patch ParaView $(PV_VERSION)'
- task: CMake@1
inputs:
workingDirectory: 'ParaView-$(PV_VERSION)/build'
cmakeArgs: '.. $(CMakeArgs)
-DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory)/pv-install
-DCMAKE_BUILD_TYPE=$(BuildType)
-DPARAVIEW_BUILD_TESTING=OFF
-DPARAVIEW_ENABLE_PYTHON=ON
-DVTK_PYTHON_VERSION=3
-DPARAVIEW_BUILD_QT_GUI=NO
-DVTK_DEFAULT_RENDER_WINDOW_OFFSCREEN=ON
-DVTK_USE_X=OFF
-DVTK_MODULE_USE_EXTERNAL_VTK_glew=ON'
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: 'Configure ParaView $(PV_VERSION)'
- script: |
cmake --build . --target install -- -j 4
workingDirectory: 'ParaView-$(PV_VERSION)/build'
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: 'Build and install ParaView $(PV_VERSION)'
- task: Cache@2
inputs:
key: ccache | "$(Agent.OS)" | "$(Build.SourceVersion)"
restoreKeys: ccache | "$(Agent.OS)"
path: $(CCACHE_DIR)
displayName: ccache
- task: CMake@1
inputs:
workingDirectory: 'build/'
cmakeArgs: '.. -DCMAKE_BUILD_TYPE=$(BuildType) -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory)/ttk-install -DParaView_DIR=$(Build.ArtifactStagingDirectory)/pv-install/lib/cmake/paraview-$(PV_V) -DTTK_ENABLE_CPU_OPTIMIZATION=OFF -DTTK_BUILD_STANDALONE_APPS=ON $(TTK_MODULE_DISABLE) $(TTK_MODULE_TEST)'
displayName: 'Configure TTK'
- script: |
cmake --build . --target install -- -j 4
workingDirectory: 'build/'
displayName: 'Build and install TTK'
- script: |
./bin/ttkHelloWorldCmd -i $(Build.SourcesDirectory)/examples/data/inputData.vtu
workingDirectory: '$(Build.ArtifactStagingDirectory)/ttk-install/'
displayName: 'Test TTK Command line'
- task: CMake@1
inputs:
workingDirectory: 'build-example/'
cmakeArgs: '../examples/c++ $(CMakeArgs)
-DCMAKE_BUILD_TYPE=$(BuildType)
-DCMAKE_PREFIX_PATH=$(Build.ArtifactStagingDirectory)/ttk-install/lib/cmake'
displayName: 'Configure C++ Example'
- script: |
cmake --build .
workingDirectory: 'build-example/'
displayName: 'Build C++ Example'
- task: CMake@1
inputs:
workingDirectory: 'build-example-vtk/'
cmakeArgs: '../examples/vtk-c++ $(CMakeArgs)
-DCMAKE_BUILD_TYPE=$(BuildType)
-DParaView_DIR=$(Build.ArtifactStagingDirectory)/pv-install/lib/cmake/paraview-$(PV_V)
-DCMAKE_PREFIX_PATH=$(Build.ArtifactStagingDirectory)/ttk-install/lib/cmake'
displayName: 'Configure TTKVTK Example'
- script: |
cmake --build .
workingDirectory: 'build-example-vtk/'
displayName: 'Build TTKVTK Example'
- script: |
./ttkExample-c++ -i ../examples/data/inputData.off
if [ ! -f output.off ]; then
exit 1
fi
workingDirectory: 'build-example/'
displayName: 'Test C++ Example'
- script: |
./ttkExample-vtk-c++ -i ../examples/data/inputData.vtu
if [ ! -f curve.vtk ] || [ ! -f separatrices.vtp ] || [ ! -f segmentation.vtu ] ; then
exit 1
fi
workingDirectory: 'build-example-vtk/'
displayName: 'Test TTKVTK Example'
- script: |
export PYTHONPATH=$(Build.ArtifactStagingDirectory)/ttk-install/lib/python3.6/site-packages
$(Build.ArtifactStagingDirectory)/pv-install/bin/pvpython ./example.py ../data/inputData.vtu
if [ ! -f curve.vtk ] || [ ! -f separatrices.vtp ] || [ ! -f segmentation.vtu ] ; then
exit 1
fi
workingDirectory: 'examples/python/'
displayName: 'Test Python Example'
- script: |
export PV_PLUGIN_PATH=$(Build.ArtifactStagingDirectory)/ttk-install/bin/plugins
$(Build.ArtifactStagingDirectory)/pv-install/bin/pvpython ./example.py ../data/inputData.vtu
if [ ! -f curve.vtk ] || [ ! -f separatrices.vtp ] || [ ! -f segmentation.vtu ] ; then
exit 1
fi
workingDirectory: 'examples/pvpython/'
displayName: 'Test pvpython Example'
# ------------------------------
# Mac OS build
# ------------------------------
- job:
condition: true
displayName: MacOS-PV-Python3-OpenMP-Ninja
timeoutInMinutes: 240
variables:
CMakeArgs: ''
CCACHE_DIR: $(Pipeline.Workspace)/ccache
PV_VERSION: 'v5.8.1'
PV_V: '5.8'
TTK_MODULE_DISABLE: ''
# used for dev
TTK_MODULE_TEST: ''
pool:
vmImage: 'macOS-latest'
steps:
- script: |
brew install --cask xquartz
brew install wget libomp mesa glew boost ccache ninja python
python3.8 -m pip install scikit-learn packaging
displayName: 'Install dependencies'
- script: |
wget https://www.paraview.org/files/v$(PV_V)/ParaView-$(PV_VERSION).tar.xz
tar Jxvf ParaView-$(PV_VERSION).tar.xz
cd paraview/patch
./patch-paraview-5.8.1.sh $(Build.SourcesDirectory)/ParaView-$(PV_VERSION)
# switch to Xcode 11 since Xcode 12 breaks the ParaView build
sudo xcode-select -s "/Applications/Xcode_11.7.app"
displayName: 'Download & patch ParaView $(PV_VERSION)'
- task: Cache@2
inputs:
key: ccache | "$(Agent.OS)" | "$(Build.SourceVersion)"
restoreKeys: ccache | "$(Agent.OS)"
path: $(CCACHE_DIR)
displayName: ccache
- task: CMake@1
inputs:
workingDirectory: 'ParaView-$(PV_VERSION)/build'
cmakeArgs: '.. $(CMakeArgs)
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory)/pv-install
-DCMAKE_BUILD_TYPE=Release
-DPARAVIEW_USE_QT=OFF
-GNinja'
displayName: 'Configure ParaView'
- script: |
cmake --build . --target install
workingDirectory: 'ParaView-$(PV_VERSION)/build'
displayName: 'Build and install ParaView'
- task: CMake@1
inputs:
workingDirectory: 'build/'
cmakeArgs: '.. $(CMakeArgs)
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory)/ttk-install
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_PREFIX_PATH=$(Build.ArtifactStagingDirectory)/pv-install/lib/cmake
-DTTK_BUILD_STANDALONE_APPS=ON
-DTTK_ENABLE_CPU_OPTIMIZATION=OFF
-DTTK_ENABLE_OPENMP=OFF
$(TTK_MODULE_DISABLE)
$(TTK_MODULE_TEST)
-GNinja'
displayName: 'Configure TTK'
- script: |
cmake --build . --target install
workingDirectory: 'build/'
displayName: 'Build and install TTK'
- script: |
./bin/ttkHelloWorldCmd -i $(Build.SourcesDirectory)/examples/data/inputData.vtu
workingDirectory: '$(Build.ArtifactStagingDirectory)/ttk-install/'
displayName: 'Test TTK Command line'
- task: CMake@1
inputs:
workingDirectory: 'build-example/'
cmakeArgs: '../examples/c++ $(CMakeArgs)
-DCMAKE_BUILD_TYPE=$(BuildType)
-DCMAKE_PREFIX_PATH=$(Build.ArtifactStagingDirectory)/ttk-install/lib/cmake'
displayName: 'Configure C++ Example'
- script: |
cmake --build .
workingDirectory: 'build-example/'
displayName: 'Build C++ Example'
- task: CMake@1
inputs:
workingDirectory: 'build-example-vtk/'
cmakeArgs: '../examples/vtk-c++ $(CMakeArgs)
-DCMAKE_BUILD_TYPE=$(BuildType)
-DCMAKE_PREFIX_PATH=$(Build.ArtifactStagingDirectory)/ttk-install/lib/cmake;$(Build.ArtifactStagingDirectory)/pv-install/lib/cmake'
displayName: 'Configure TTKVTK Example'
- script: |
cmake --build .
workingDirectory: 'build-example-vtk/'
displayName: 'Build TTKVTK Example'
- script: |
./ttkExample-c++ -i ../examples/data/inputData.off
if [ ! -f output.off ]; then
exit 1
fi
workingDirectory: 'build-example/'
displayName: 'Test C++ Example'
- script: |
./ttkExample-vtk-c++ -i ../examples/data/inputData.vtu
if [ ! -f curve.vtk ] || [ ! -f separatrices.vtp ] || [ ! -f segmentation.vtu ] ; then
exit 1
fi
workingDirectory: 'build-example-vtk/'
displayName: 'Test TTKVTK Example'
- script: |
export PYTHONPATH=$(Build.ArtifactStagingDirectory)/ttk-install/lib/python3.8/site-packages:$(Build.ArtifactStagingDirectory)/pv-install/lib/python3.8/site-packages
export DYLD_LIBRARY_PATH=$(Build.ArtifactStagingDirectory)/pv-install/lib:$(Build.ArtifactStagingDirectory)/ttk-install/lib
$(Build.ArtifactStagingDirectory)/pv-install/bin/pvpython ./example.py ../data/inputData.vtu
if [ ! -f curve.vtk ] || [ ! -f separatrices.vtp ] || [ ! -f segmentation.vtu ] ; then
exit 1
fi
workingDirectory: 'examples/python/'
displayName: 'Test Python Example'
- script: |
export PV_PLUGIN_PATH=$(Build.ArtifactStagingDirectory)/ttk-install/bin/plugins
export DYLD_LIBRARY_PATH=$(Build.ArtifactStagingDirectory)/pv-install/lib:$(Build.ArtifactStagingDirectory)/ttk-install/lib
$(Build.ArtifactStagingDirectory)/pv-install/bin/pvpython ./example.py ../data/inputData.vtu
if [ ! -f curve.vtk ] || [ ! -f separatrices.vtp ] || [ ! -f segmentation.vtu ] ; then
exit 1
fi
workingDirectory: 'examples/pvpython/'
displayName: 'Test pvpython Example'
# ------------------------------
# Windows build
# ------------------------------
# VTK 9, no rendering
- job:
# disable Windows job as it runs longer than the 1h maximum timeout
# (and is redundant with the Windows GitHub Action test CI)
condition: false
displayName: Windows-VTK
strategy:
matrix:
Windows:
imageName: 'vs2017-win2016'
cCompiler: cl.exe
cxxCompiler: cl.exe
compilerInitialization: 'call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"'
VTKVersion: v9.0.0
VTKVPath: 9.0
BOOST_URL: https://sourceforge.net/projects/boost/files/boost-binaries/1.72.0/boost_1_72_0-msvc-14.2-64.exe
BOOST_ROOT_1_72_0: C:\hostedtoolcache\windows\Boost\1.72.0\x86_64
variables:
TTK_MODULE_DISABLE: '-DVTK_MODULE_ENABLE_ttkCinemaWriter=NO
-DVTK_MODULE_ENABLE_ttkCinemaQuery=NO'
# used for dev
TTK_MODULE_TEST: ''
pool:
vmImage: $(imageName)
steps:
- task: Cache@2
inputs:
key: VTK | $(Agent.OS) | "$(VTKVersion)" | "v-11-16-20c"
path: $(Build.ArtifactStagingDirectory)/vtk-install
cacheHitVar: CACHE_RESTORED
displayName: Cache VTK build
- bash: |
git clone --quiet https://gitlab.kitware.com/vtk/vtk.git
cd vtk
git checkout $(VTKVersion)
git submodule update --init --recursive
mkdir build
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: 'Clone VTK $(VTKVPath)'
- script: |
$(compilerInitialization)
cmake -DCMAKE_C_COMPILER:FILEPATH="$(cCompiler)" -DCMAKE_CXX_COMPILER="$(cxxCompiler)" -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_INSTALL_PREFIX="$(Build.ArtifactStagingDirectory)/vtk-install" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING:BOOL=OFF -DVTK_BUILD_TESTING=OFF -DVTK_GROUP_ENABLE_Rendering=NO -GNinja ..
workingDirectory: vtk/build
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: 'Configure VTK $(VTKVPath)'
- script: |
$(compilerInitialization)
cmake --build . --target install
workingDirectory: vtk/build
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: 'Build and install VTK'
- powershell: |
# Use the boost_1_72_0-msvc-14.1-64.exe for Windows 2016
(New-Object System.Net.WebClient).DownloadFile("$env:BOOST_URL", "$env:TEMP\boost.exe")
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=${env:BOOST_ROOT_1_72_0}"
displayName: 'Download & install a binary version of Boost 1.72.0'
- script: |
mkdir build
displayName: 'Create build directory'
# need to disable filters linked to rendering
- script: |
$(compilerInitialization)
set BOOST_ROOT=$(BOOST_ROOT_1_72_0)
cmake -DBoost_NO_BOOST_CMAKE=ON -DCMAKE_POLICY_DEFAULT_CMP0074=NEW -DCMAKE_POLICY_DEFAULT_CMP0092=NEW -DCMAKE_C_COMPILER:FILEPATH="$(cCompiler)" -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_CXX_COMPILER="$(cxxCompiler)" -DCMAKE_INSTALL_PREFIX="$(Build.ArtifactStagingDirectory)/ttk-install" -DVTK_DIR=$(Build.ArtifactStagingDirectory)/vtk-install/lib/cmake/vtk-$(VTKVPath) -DCMAKE_BUILD_TYPE:STRING=Release -DTTK_BUILD_PARAVIEW_PLUGINS=OFF $(TTK_MODULE_DISABLE) $(CMAKE_TEST) -GNinja ..
workingDirectory: build/
displayName: 'Configure TTK'
- script: |
$(compilerInitialization)
ninja
cmake --build . --target install
workingDirectory: build/
displayName: 'Build and install TTK'
- script: |
mkdir build-example
displayName: 'Create C++ example build directory'
- script: |
$(compilerInitialization)
set BOOST_ROOT=$(BOOST_ROOT_1_72_0)
cmake ../examples/c++ -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$(Build.ArtifactStagingDirectory)/ttk-install/lib/cmake
workingDirectory: 'build-example/'
displayName: 'Configure C++ Example'
- script: |
$(compilerInitialization)
ninja
workingDirectory: 'build-example/'
displayName: 'Build C++ Example'
- script: |
mkdir build-example-vtk
displayName: 'Create TTKVTK example build directory'
- script: |
$(compilerInitialization)
set BOOST_ROOT=$(BOOST_ROOT_1_72_0)
cmake ../examples/vtk-c++ -GNinja -DCMAKE_BUILD_TYPE=Release -DVTK_DIR=$(Build.ArtifactStagingDirectory)/vtk-install/lib/cmake/vtk-$(VTKVPath) -DCMAKE_PREFIX_PATH="$(Build.ArtifactStagingDirectory)/ttk-install/lib/cmake
workingDirectory: 'build-example-vtk/'
displayName: 'Configure TTKVTK Example'
- script: |
$(compilerInitialization)
ninja
workingDirectory: 'build-example-vtk/'
displayName: 'Build TTKVTK Example'
- bash: |
cmd.exe /C 'set PATH=$(Build.ArtifactStagingDirectory)/ttk-install/bin;%PATH% & ttkExample-c++.exe -i ../examples/data/inputData.off'
if [ ! -f output.off ]; then
exit 1
fi
workingDirectory: 'build-example/'
displayName: 'Test C++ Example'
- bash: |
cmd.exe /C 'set PATH=$(Build.ArtifactStagingDirectory)/vtk-install/bin;$(Build.ArtifactStagingDirectory)/ttk-install/bin;%PATH% & ttkExample-vtk-c++.exe -i ../examples/data/inputData.vtu'
if [ ! -f curve.vtk ] || [ ! -f separatrices.vtp ] || [ ! -f segmentation.vtu ] ; then
exit 1
fi
workingDirectory: 'build-example-vtk/'
displayName: 'Test TTKVTK Example'