-
Notifications
You must be signed in to change notification settings - Fork 15
/
azure-pipelines.yml
171 lines (167 loc) · 5.46 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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
jobs:
- job: ubuntu
pool:
vmImage: 'Ubuntu-20.04'
steps:
- script: |
sudo apt-get update
sudo apt-get install -y ninja-build libinsighttoolkit4-dev
displayName: Apt install dependencies
- script: |
mkdir build.debug
mkdir build.release
displayName: Make Build Directories
- task: CMake@1
inputs:
workingDirectory: 'build.debug'
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Debug ..'
- task: CMake@1
inputs:
workingDirectory: 'build.release'
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Release ..'
- script: |
cd build.debug
ninja
displayName: 'Run ninja, debug'
- script: |
cd build.debug
ctest
displayName: 'Run tests, debug'
- script: |
cd build.release
ninja
displayName: 'Run ninja, release'
- script: |
cd build.release
ctest
displayName: 'Run tests, release'
- job: macos
pool:
vmImage: 'macOS-latest'
steps:
- script: |
#brew tap bathomas/homebrew-bat
#brew install ninja insighttoolkit
brew install ninja qt5
# brew install itk
Qt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5
echo "Qt5_DIR = $Qt5_DIR"
ls $Qt5_DIR
echo "##vso[task.setvariable variable=Qt5_DIR;isOutput=true]$Qt5_DIR"
displayName: Brew install dependencies
- script: |
git clone -b release --single-branch https://github.com/InsightSoftwareConsortium/ITK.git
mkdir build.ITK
mkdir install
cdir=`pwd`
cd build.ITK
ITK_CMAKE_FLAGS="-DITK_BUILD_DEFAULT_MODULES:BOOL=OFF
-DITKGroup_IO:BOOL=OFF
-DModule_ITKIOBMP:BOOL=ON
-DModule_ITKIOGDCM:BOOL=ON
-DModule_ITKIOGIPL:BOOL=ON
-DModule_ITKIOJPEG:BOOL=ON
-DModule_ITKIOJPEG2000:BOOL=ON
-DModule_ITKIOMeta:BOOL=ON
-DModule_ITKIONIFTI:BOOL=ON
-DModule_ITKIONRRD:BOOL=ON
-DModule_ITKIOPNG:BOOL=ON
-DModule_ITKIORAW:BOOL=ON
-DModule_ITKIOTIFF:BOOL=ON
-DModule_ITKImageGrid:BOOL=ON
-DITKGroup_Filtering:BOOL=ON
-DModule_ITKReview:BOOL=ON"
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${cdir}/install -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF $ITK_CMAKE_FLAGS ../ITK
displayName: Configure ITK
- script: |
mkdir build.debug
mkdir build.release
displayName: Make Build Directories
- script: |
cd build.ITK
ninja && ninja install
displayName: 'Build ITK with ninja, release'
- task: CMake@1
inputs:
workingDirectory: 'build.debug'
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Debug -DQt5_DIR=/usr/local/opt/qt@5/lib/cmake/Qt5 -DCMAKE_INSTALL_PREFIX=../install ..'
- task: CMake@1
inputs:
workingDirectory: 'build.release'
runInsideShell: true
cmakeArgs: '-G Ninja -DCMAKE_BUILD_TYPE=Release -DQt5_DIR=/usr/local/opt/qt@5/lib/cmake/Qt5 -DCMAKE_INSTALL_PREFIX=../install ..'
- script: |
cd build.debug
ninja
displayName: 'Run ninja, debug'
- script: |
cd build.debug
ctest
displayName: 'Run tests, debug'
- script: |
cd build.release
ninja
displayName: 'Run ninja, release'
- script: |
cd build.release
ctest
displayName: 'Run tests, release'
- job: Windows_VS2022_x64
pool:
vmImage: 'windows-2022'
steps:
- script: |
git clone -b release --single-branch https://github.com/InsightSoftwareConsortium/ITK.git
mkdir build.ITK
cd build.ITK
set ITK_CMAKE_FLAGS=-DITK_BUILD_DEFAULT_MODULES:BOOL=OFF ^
-DITKGroup_IO:BOOL=OFF ^
-DModule_ITKIOBMP:BOOL=ON ^
-DModule_ITKIOGDCM:BOOL=ON ^
-DModule_ITKIOGIPL:BOOL=ON ^
-DModule_ITKIOJPEG:BOOL=ON ^
-DModule_ITKIOJPEG2000:BOOL=ON ^
-DModule_ITKIOMeta:BOOL=ON ^
-DModule_ITKIONIFTI:BOOL=ON ^
-DModule_ITKIONRRD:BOOL=ON ^
-DModule_ITKIOPNG:BOOL=ON ^
-DModule_ITKIORAW:BOOL=ON ^
-DModule_ITKIOTIFF:BOOL=ON ^
-DModule_ITKImageGrid:BOOL=ON ^
-DITKGroup_Filtering:BOOL=ON ^
-DModule_ITKReview:BOOL=ON
cmake -G "Visual Studio 17" -A "x64" -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF %ITK_CMAKE_FLAGS% ../ITK
displayName: Configure ITK
- task: MSBuild@1
inputs:
solution: 'build.ITK/INSTALL.vcxproj'
maximumCpuCount: true
platform: 'x64'
configuration: 'Release'
displayName: Build ITK
- script: mkdir build.common
displayName: Make Build Directory
- script: |
cd build.common
cmake -G "Visual Studio 17" -A "x64" -DCMAKE_BUILD_TYPE=Release ..
displayName: Configure PETPVC
- task: MSBuild@1
inputs:
solution: 'build.common/ALL_BUILD.vcxproj'
maximumCpuCount: true
platform: 'x64'
configuration: 'Release'
displayName: 'Build PETPVC'
- task: MSBuild@1
inputs:
solution: 'build.common/RUN_TESTS.vcxproj'
maximumCpuCount: true
platform: 'x64'
configuration: 'Release'
displayName: 'Run tests'