File: ci.yml

package info (click to toggle)
elastix 5.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 42,480 kB
  • sloc: cpp: 68,403; lisp: 4,118; python: 1,013; xml: 182; sh: 177; makefile: 33
file content (185 lines) | stat: -rw-r--r-- 6,947 bytes parent folder | download
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
variables:
  ITKv5_VERSION: v5.4.0
  ITK_GIT_URL: https://github.com/InsightSoftwareConsortium/ITK
  ITK_SOURCE_DIR: $(Agent.BuildDirectory)/ITK-source
  ITK_BINARY_DIR: $(Agent.BuildDirectory)/ITK-build
  ELASTIX_SOURCE_DIR: $(Build.Repository.LocalPath)
  ELASTIX_BINARY_DIR: $(Agent.BuildDirectory)/Elastix-build

trigger:
  paths:
    exclude:
    - '*.md'
    - LICENSE
    - .github/workflows/*
    - dox/doxygen/*
    - tools/*
pr:
  paths:
    exclude:
    - '*.md'
    - LICENSE
    - .github/workflows/*
    - dox/doxygen/*
    - tools/*

jobs:
- job: Windows
  timeoutInMinutes: 0
  pool:
    vmImage: 'windows-2022'
  strategy:
    matrix:
      ITKv5:
        itk.version: $(ITKv5_VERSION)
  steps:
  - script: |
      git clone $(ITK_GIT_URL) --branch $(itk.version) --depth 1 "$(ITK_SOURCE_DIR)"
    displayName: Clone ITK
  - script: |
      mkdir "$(ITK_BINARY_DIR)"
      mkdir "$(ELASTIX_BINARY_DIR)"
      mkdir externalproject-build
    displayName: Make build directories
  - task: CMake@1
    displayName: 'CMake Generate ITK'
    inputs:
      cmakeArgs: -G "Visual Studio 17 2022" -T host=x64 -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DITK_LEGACY_REMOVE=ON "$(ITK_SOURCE_DIR)"
      workingDirectory: "$(ITK_BINARY_DIR)"
  - task: CMake@1
    displayName: 'CMake Build ITK'
    inputs:
      cmakeArgs: --build . --config Release -j 2
      workingDirectory: "$(ITK_BINARY_DIR)"
  - task: CMake@1
    displayName: 'CMake Generate Elastix'
    inputs:
      cmakeArgs: -G "Visual Studio 17 2022" -T host=x64 -DITK_DIR="$(ITK_BINARY_DIR)" -DBUILD_TESTING=ON -DELASTIX_USE_GTEST=ON -DUSE_ALL_COMPONENTS=ON "$(ELASTIX_SOURCE_DIR)"
      workingDirectory: "$(ELASTIX_BINARY_DIR)"
  - task: CMake@1
    displayName: 'CMake Build Elastix'
    inputs:
      cmakeArgs: --build . --config Release -j 2
      workingDirectory: "$(ELASTIX_BINARY_DIR)"
  - task: CMake@1
    displayName: 'CMake Generate externalproject'
    inputs:
      cmakeArgs: -G "Visual Studio 17 2022" -T host=x64 -DElastix_DIR=$(ELASTIX_BINARY_DIR) "$(ELASTIX_SOURCE_DIR)/dox/externalproject"
      workingDirectory: $(Agent.BuildDirectory)/externalproject-build
  - task: CMake@1
    displayName: 'CMake Build externalproject'
    inputs:
      cmakeArgs: --build . --config Release
      workingDirectory: $(Agent.BuildDirectory)/externalproject-build
  - bash: ../../../externalproject-build/Release/elastix_translation_example
    displayName: 'Run externalproject'
    workingDirectory: $(Agent.BuildDirectory)\Elastix-build\bin\Release
  - bash: python -m pip install -r "$(ELASTIX_SOURCE_DIR)/Testing/PythonTests/requirements.txt"
    displayName: 'Install PythonTests requirements'
  - bash: ctest -C Release -VV -j 2 -E "elastix_run_example_COMPARE_IM|elastix_run_3DCT_lung.MI.bspline.ASGD.001_COMPARE_TP"
    displayName: 'CTest Elastix'
    workingDirectory: $(ELASTIX_BINARY_DIR)
- job: Ubuntu
  timeoutInMinutes: 0
  pool:
    vmImage: 'ubuntu-20.04'
  strategy:
    matrix:
      ITKv5:
        itk.version: $(ITKv5_VERSION)
  steps:
  - script: |
      git clone $(ITK_GIT_URL) --branch $(itk.version) --depth 1 "$(ITK_SOURCE_DIR)"
  - script: |
      mkdir $(ITK_BINARY_DIR)
      mkdir $(ELASTIX_BINARY_DIR)
      mkdir externalproject-build
    displayName: Clone ITK
  - task: CMake@1
    displayName: 'CMake Generate ITK'
    inputs:
      cmakeArgs: -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DITK_LEGACY_REMOVE=ON $(ITK_SOURCE_DIR)
      workingDirectory: $(ITK_BINARY_DIR)
  - task: CMake@1
    displayName: 'CMake Build ITK'
    inputs:
      cmakeArgs: --build . --config Release -j 2
      workingDirectory: $(ITK_BINARY_DIR)
  - task: CMake@1
    displayName: 'CMake Generate Elastix'
    inputs:
      cmakeArgs: -DITK_DIR=$(ITK_BINARY_DIR) -DBUILD_TESTING=ON -DELASTIX_USE_GTEST=ON -DUSE_ALL_COMPONENTS=ON $(ELASTIX_SOURCE_DIR)
      workingDirectory: $(ELASTIX_BINARY_DIR)
  - task: CMake@1
    displayName: 'CMake Build Elastix'
    inputs:
      cmakeArgs: --build . --config Release -j 2
      workingDirectory: $(ELASTIX_BINARY_DIR)
  - task: CMake@1
    displayName: 'CMake Generate externalproject'
    inputs:
      cmakeArgs: -DElastix_DIR=$(Agent.BuildDirectory)/Elastix-build $(ELASTIX_SOURCE_DIR)/dox/externalproject
      workingDirectory: $(Agent.BuildDirectory)/externalproject-build
  - task: CMake@1
    displayName: 'CMake Build externalproject'
    inputs:
      cmakeArgs: --build .
      workingDirectory: $(Agent.BuildDirectory)/externalproject-build
  - bash: $(Agent.BuildDirectory)/externalproject-build/elastix_translation_example
    displayName: 'Run externalproject'
  - bash: python -m pip install -r "$(ELASTIX_SOURCE_DIR)/Testing/PythonTests/requirements.txt"
    displayName: 'Install PythonTests requirements'
  - bash: ctest -C Release -VV -j 2 -E "elastix_run_example_COMPARE_IM|elastix_run_3DCT_lung.MI.bspline.ASGD.001_COMPARE_TP"
    displayName: 'CTest Elastix'
    workingDirectory: $(ELASTIX_BINARY_DIR)
- job: macOS
  timeoutInMinutes: 0
  pool:
    vmImage: 'macOS-12'
  strategy:
    matrix:
      ITKv5:
        itk.version: $(ITKv5_VERSION)
  steps:
  - script: |
      git clone $(ITK_GIT_URL) --branch $(itk.version) --depth 1 "$(ITK_SOURCE_DIR)"
    displayName: Clone ITK
  - script: |
      mkdir $(ITK_BINARY_DIR)
      mkdir $(ELASTIX_BINARY_DIR)
      mkdir externalproject-build
    displayName: Make build directories
  - task: CMake@1
    displayName: 'CMake Generate ITK'
    inputs:
      cmakeArgs: -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DITK_LEGACY_REMOVE=ON $(ITK_SOURCE_DIR)
      workingDirectory: $(ITK_BINARY_DIR)
  - task: CMake@1
    displayName: 'CMake Build ITK'
    inputs:
      cmakeArgs: --build . --config Release -j 2
      workingDirectory: $(ITK_BINARY_DIR)
  - task: CMake@1
    displayName: 'CMake Generate Elastix'
    inputs:
      cmakeArgs: -DITK_DIR=$(ITK_BINARY_DIR) -DBUILD_TESTING=ON -DELASTIX_USE_GTEST=ON -DUSE_ALL_COMPONENTS=ON $(Build.Repository.LocalPath)
      workingDirectory: $(ELASTIX_BINARY_DIR)
  - task: CMake@1
    displayName: 'CMake Build Elastix'
    inputs:
      cmakeArgs: --build . --config Release -j 2
      workingDirectory: $(ELASTIX_BINARY_DIR)
  - task: CMake@1
    displayName: 'CMake Generate externalproject'
    inputs:
      cmakeArgs: -DElastix_DIR=$(Agent.BuildDirectory)/Elastix-build $(ELASTIX_SOURCE_DIR)/dox/externalproject
      workingDirectory: $(Agent.BuildDirectory)/externalproject-build
  - task: CMake@1
    displayName: 'CMake Build externalproject'
    inputs:
      cmakeArgs: --build .
      workingDirectory: $(Agent.BuildDirectory)/externalproject-build
  - bash: $(Agent.BuildDirectory)/externalproject-build/elastix_translation_example
    displayName: 'Run externalproject'
    # Note: On macOS, we have not yet found how to successfully install requirements.txt for Python, so for the time being, we skip the tests.
    # See also https://github.com/SuperElastix/elastix/issues/739