-
Notifications
You must be signed in to change notification settings - Fork 52
/
pixi.toml
340 lines (292 loc) · 13.6 KB
/
pixi.toml
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
[project]
authors = ["Matt McCormick <[email protected]>"]
channels = ["conda-forge"]
description = "ITK-Wasm native build and test configuration."
name = "ITK-Wasm"
platforms = ["win-64", "linux-64", "linux-aarch64", "osx-arm64"]
version = "0.1.0"
license = "Apache-2.0"
readme = "README.md"
[activation]
scripts = ["itk_wasm_env.bash"]
[tasks.clean]
cmd = "git clean -fdx"
description = "Clean the workspace from build artifacts"
[tasks.pnpm-install]
cmd = "pnpm install"
description = "Install Node.js dependencies"
[tasks.build]
cmd = "pnpm run build"
description = "Build ITK-Wasm"
depends-on = ["pnpm-install", "build-itk-wasm", "build-native-compare-images", "build-native-compare-meshes", "build-native-compress-stringify", "build-native-dicom", "build-native-downsample", "build-native-mesh-io", "build-native-transform-io"]
[tasks.test]
cmd = "pnpm run test"
description = "Test ITK-Wasm"
depends-on = ["test-itk-wasm", "test-native-compare-images", "test-native-compare-meshes", "test-native-compress-stringify", "test-native-dicom", "test-native-downsample", "test-native-mesh-io", "test-native-transform-io"]
[tasks.compare-images-test-data-download]
cmd = "npx dam download test/data test/data.tar.gz $ITK_WASM_COMPARE_IMAGES_TEST_DATA_HASH $ITK_WASM_COMPARE_IMAGES_TEST_DATA_URLS"
cwd = "packages/compare-images"
depends-on = ["pnpm-install"]
outputs = ["packages/compare-images/test/data.tar.gz"]
description = "Download compare-images test data"
[tasks.compare-meshes-test-data-download]
cmd = "npx dam download test/data test/data.tar.gz $ITK_WASM_COMPARE_MESHES_TEST_DATA_HASH $ITK_WASM_COMPARE_MESHES_TEST_DATA_URLS"
cwd = "packages/compare-meshes"
depends-on = ["pnpm-install"]
outputs = ["packages/compare-meshes/test/data.tar.gz"]
description = "Download compare-meshes test data"
[tasks.compress-stringify-test-data-download]
cmd = "npx dam download test/data test/data.tar.gz $ITK_WASM_COMPRESS_STRINGIFY_TEST_DATA_HASH $ITK_WASM_COMPRESS_STRINGIFY_TEST_DATA_URLS"
cwd = "packages/compress-stringify"
depends-on = ["pnpm-install"]
outputs = ["packages/compress-stringify/test/data.tar.gz"]
description = "Download compress-stringify test data"
[tasks.dicom-test-data-download]
cmd = "npx dam download test/data test/data.tar.gz $ITK_WASM_DICOM_TEST_DATA_HASH $ITK_WASM_DICOM_TEST_DATA_URLS"
cwd = "packages/dicom"
depends-on = ["pnpm-install"]
outputs = ["packages/dicom/test/data.tar.gz"]
description = "Download DICOM test data"
[tasks.downsample-test-data-download]
cmd = "npx dam download test/data test/data.tar.gz $ITK_WASM_DOWNSAMPLE_TEST_DATA_HASH $ITK_WASM_DOWNSAMPLE_TEST_DATA_URLS"
cwd = "packages/downsample"
depends-on = ["pnpm-install"]
outputs = ["packages/downsample/test/data.tar.gz"]
description = "Download downsample test data"
[tasks.mesh-io-test-data-download]
cmd = "npx dam download test/data test/data.tar.gz $ITK_WASM_MESH_IO_TEST_DATA_HASH $ITK_WASM_MESH_IO_TEST_DATA_URLS"
cwd = "packages/mesh-io"
depends-on = ["pnpm-install"]
outputs = ["packages/mesh-io/test/data.tar.gz"]
description = "Download mesh-io test data"
[tasks.transform-io-test-data-download]
cmd = "npx dam download test/data test/data.tar.gz $ITK_WASM_TRANSFORM_IO_TEST_DATA_HASH $ITK_WASM_TRANSFORM_IO_TEST_DATA_URLS"
cwd = "packages/transform-io"
depends-on = ["pnpm-install"]
outputs = ["packages/transform-io/test/data.tar.gz"]
description = "Download transform-io test data"
[tasks.export-itk-wasm-env-vars]
cmd = "bash -c ./itk_wasm_env.bash && env | grep ITK_WASM | grep -v TEST > ./src/docker/itk-wasm-base/itk_wasm_env_vars.sh"
outputs = ["src/docker/itk-wasm-base/itk_wasm_env_vars.*"]
inputs = ["itk_wasm_env.*"]
description = "Provide ITK_WASM environmental variables to the Docker image"
[tasks.update-default-image-tag]
cmd = "sed -i \"s/const defaultImageTag = '.*'/const defaultImageTag = '$ITK_WASM_DEV_DOCKER_TAG'/g\" packages/core/typescript/itk-wasm/src/cli/default-image-tag.js"
outputs = ["packages/core/typescript/itk-wasm/src/cli/default-image-tag.*"]
description = "Update the default Docker image tag"
[tasks.build-docker-images]
cmd = "src/docker/build.sh"
description = "Build the ITK-Wasm docker images"
depends-on = ["clean", "export-itk-wasm-env-vars", "update-default-image-tag"]
[dependencies]
pnpm = ">=9.12.2,<10"
nodejs = ">=22.6.0,<23"
[target.win-64.dependencies]
m2w64-jq = ">=1.6.0,<2"
[target.unix.dependencies]
jq = ">=1.7.1,<2"
[feature.native.tasks.clone-itk]
cmd = ["stat", "$ITK_WASM_ITK_SOURCE_DIR", ">/dev/null", "||",
"git", "clone",
"--branch=$ITK_WASM_ITK_BRANCH",
"$ITK_WASM_ITK_REPOSITORY",
"$ITK_WASM_ITK_SOURCE_DIR"]
# Note: pixi does not seem to reliably support activation environmental variables in task inputs / outputs
outputs = ["native/ITK/LICENSE"]
description = "Fetch ITK's source code"
[feature.native.tasks.switch-dcmtk]
cmd = ["sed", "-i", "-e",
"/^set(DCMTK_GIT_REPOSITORY/c\\set(DCMTK_GIT_REPOSITORY \"$ITK_WASM_DCMTK_REPOSITORY\")",
"$ITK_WASM_ITK_SOURCE_DIR/Modules/ThirdParty/DCMTK/DCMTKGitTag.cmake",
"&&",
"sed", "-i", "-e",
"/^set(DCMTK_GIT_TAG/c\\set(DCMTK_GIT_TAG \"$ITK_WASM_DCMTK_GIT_TAG\")",
"$ITK_WASM_ITK_SOURCE_DIR/Modules/ThirdParty/DCMTK/DCMTKGitTag.cmake"]
depends-on = ["clone-itk"]
description = "Switch DCMTK to the WASM branch"
[feature.native.tasks.configure-itk]
cmd = '''cmake -B$ITK_WASM_ITK_BUILD_DIR -S$ITK_WASM_ITK_SOURCE_DIR -GNinja
-DCMAKE_CXX_STANDARD:STRING=20
-DCMAKE_BUILD_TYPE:STRING=Debug
-DBUILD_EXAMPLES:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
-DBUILD_SHARED_LIBS:BOOL=OFF
-DBUILD_STATIC_LIBS:BOOL=ON
-DITK_LEGACY_REMOVE:BOOL=ON
-DITK_BUILD_DEFAULT_MODULES:BOOL=ON
-DITKGroup_IO:BOOL=ON
-DH5_HAVE_GETPWUID:BOOL=OFF
-DModule_ITKIOMINC:BOOL=ON
-DModule_MGHIO:BOOL=ON
-DModule_IOMeshSWC:BOOL=ON
-DModule_IOScanco:BOOL=ON
-DModule_IOFDF:BOOL=ON
-DModule_ITKDCMTK:BOOL=ON
-DModule_ITKImageFunction:BOOL=ON
-DModule_MinimalPathExtraction:BOOL=ON
-DModule_MorphologicalContourInterpolation:BOOL=ON
-DModule_SmoothingRecursiveYvvGaussianFilter:BOOL=ON
-DModule_Cuberille:BOOL=ON
-DModule_TotalVariation:BOOL=ON
-DModule_IOMeshSTL:BOOL=ON
-DModule_GenericLabelInterpolator:BOOL=ON
-DModule_MeshToPolyData:BOOL=ON
-DModule_ITKIOTransformMINC:BOOL=ON
-DDO_NOT_BUILD_ITK_TEST_DRIVER:BOOL=ON
-DOPJ_USE_THREAD:BOOL=OFF
-DDCMTK_WITH_THREADS:BOOL=OFF
-DDCMTK_BUILD_APPS:BOOL=OFF
-DNO_FLOAT_EXCEPTIONS:BOOL=ON
-DITK_MSVC_STATIC_RUNTIME_LIBRARY=ON'''
depends-on = ["switch-dcmtk"]
# Note: pixi does not seem to reliably support activation environmental variables in task inputs / outputs
# outputs = ["$ITK_WASM_ITK_BUILD_DIR/CMakeFiles/"]
outputs = ["native/ITK-build/CMakeFiles/**"]
description = "Configure ITK"
[feature.native.tasks.build-itk]
cmd = "cmake --build $ITK_WASM_ITK_BUILD_DIR"
depends-on = ["configure-itk"]
outputs = ["native/ITK-build/**"]
description = "Build ITK"
[feature.native.tasks.configure-itk-wasm]
cmd = '''cmake -B$ITK_WASM_NATIVE_WORKSPACE/ITK-Wasm-build -S. -GNinja
-DITK_DIR:PATH=$ITK_WASM_ITK_BUILD_DIR
-DBUILD_TESTING:BOOL=ON
-DCMAKE_CXX_STANDARD:STRING=20
-DCMAKE_BUILD_TYPE:STRING=Debug'''
depends-on = ["build-itk"]
outputs = ["native/ITK-Wasm-build/CMakeFiles/"]
description = "Configure ITK-Wasm"
[feature.native.tasks.build-itk-wasm]
cmd = "cmake --build $ITK_WASM_NATIVE_WORKSPACE/ITK-Wasm-build"
depends-on = ["configure-itk-wasm"]
description = "Build ITK-Wasm"
[feature.native.tasks.test-itk-wasm]
cmd = "ctest --test-dir $ITK_WASM_NATIVE_WORKSPACE/ITK-Wasm-build"
depends-on = ["build-itk-wasm"]
description = "Test ITK-Wasm"
[feature.native.tasks.configure-native-compare-images]
cmd = '''cmake -B$ITK_WASM_NATIVE_WORKSPACE/compare-images-build -Spackages/compare-images -GNinja
-DITK_DIR:PATH=$ITK_WASM_ITK_BUILD_DIR
-DBUILD_TESTING:BOOL=ON
-DCMAKE_CXX_STANDARD:STRING=20
-DCMAKE_BUILD_TYPE:STRING=Debug'''
depends-on = ["build-itk-wasm", "compare-images-test-data-download"]
outputs = ["native/compare-images-build/CMakeFiles/"]
description = "Configure compare-images native binaries"
[feature.native.tasks.build-native-compare-images]
cmd = "cmake --build $ITK_WASM_NATIVE_WORKSPACE/compare-images-build"
depends-on = ["configure-native-compare-images"]
description = "Build compare-images native binaries"
[feature.native.tasks.test-native-compare-images]
cmd = "ctest --test-dir $ITK_WASM_NATIVE_WORKSPACE/compare-images-build"
depends-on = ["build-native-compare-images"]
description = "Test compare-images native binaries"
[feature.native.tasks.configure-native-compare-meshes]
cmd = '''cmake -B$ITK_WASM_NATIVE_WORKSPACE/compare-meshes-build -Spackages/compare-meshes -GNinja
-DITK_DIR:PATH=$ITK_WASM_ITK_BUILD_DIR
-DBUILD_TESTING:BOOL=ON
-DCMAKE_CXX_STANDARD:STRING=20
-DCMAKE_BUILD_TYPE:STRING=Debug'''
depends-on = ["build-itk-wasm", "compare-meshes-test-data-download"]
outputs = ["native/compare-meshes-build/CMakeFiles/"]
description = "Configure compare-meshes native binaries"
[feature.native.tasks.build-native-compare-meshes]
cmd = "cmake --build $ITK_WASM_NATIVE_WORKSPACE/compare-meshes-build"
depends-on = ["configure-native-compare-meshes"]
description = "Build compare-meshes native binaries"
[feature.native.tasks.test-native-compare-meshes]
cmd = "ctest --test-dir $ITK_WASM_NATIVE_WORKSPACE/compare-meshes-build"
depends-on = ["build-native-compare-meshes"]
description = "Test compare-meshes native binaries"
[feature.native.tasks.configure-native-compress-stringify]
cmd = '''cmake -B$ITK_WASM_NATIVE_WORKSPACE/compress-stringify-build -Spackages/compress-stringify -GNinja
-DITK_DIR:PATH=$ITK_WASM_ITK_BUILD_DIR
-DBUILD_TESTING:BOOL=ON
-DCMAKE_CXX_STANDARD:STRING=20
-DCMAKE_BUILD_TYPE:STRING=Debug'''
depends-on = ["build-itk-wasm", "compress-stringify-test-data-download"]
outputs = ["native/compress-stringify-build/CMakeFiles/"]
description = "Configure compress-stringify native binaries"
[feature.native.tasks.build-native-compress-stringify]
cmd = "cmake --build $ITK_WASM_NATIVE_WORKSPACE/compress-stringify-build"
depends-on = ["configure-native-compress-stringify"]
description = "Build compress-stringify native binaries"
[feature.native.tasks.test-native-compress-stringify]
cmd = "ctest --test-dir $ITK_WASM_NATIVE_WORKSPACE/compress-stringify-build"
depends-on = ["build-native-compress-stringify"]
description = "Test compress-stringify native binaries"
[feature.native.tasks.configure-native-dicom]
cmd = '''cmake -B$ITK_WASM_NATIVE_WORKSPACE/dicom-build -Spackages/dicom -GNinja
-DITK_DIR:PATH=$ITK_WASM_ITK_BUILD_DIR
-DBUILD_TESTING:BOOL=ON
-DCMAKE_CXX_STANDARD:STRING=20
-DCMAKE_BUILD_TYPE:STRING=Debug'''
depends-on = ["build-itk-wasm", "dicom-test-data-download"]
outputs = ["native/dicom-build/CMakeFiles/"]
description = "Configure dicom native binaries"
[feature.native.tasks.build-native-dicom]
cmd = "cmake --build $ITK_WASM_NATIVE_WORKSPACE/dicom-build"
depends-on = ["configure-native-dicom"]
description = "Build dicom native binaries"
[feature.native.tasks.test-native-dicom]
cmd = "ctest --test-dir $ITK_WASM_NATIVE_WORKSPACE/dicom-build"
depends-on = ["build-native-dicom"]
description = "Test dicom native binaries"
[feature.native.tasks.configure-native-downsample]
cmd = '''cmake -B$ITK_WASM_NATIVE_WORKSPACE/downsample-build -Spackages/downsample -GNinja
-DITK_DIR:PATH=$ITK_WASM_ITK_BUILD_DIR
-DBUILD_TESTING:BOOL=ON
-DCMAKE_CXX_STANDARD:STRING=20
-DCMAKE_BUILD_TYPE:STRING=Debug'''
depends-on = ["build-itk-wasm", "downsample-test-data-download"]
outputs = ["native/downsample-build/CMakeFiles/"]
description = "Configure downsample native binaries"
[feature.native.tasks.build-native-downsample]
cmd = "cmake --build $ITK_WASM_NATIVE_WORKSPACE/downsample-build"
depends-on = ["configure-native-downsample"]
description = "Build downsample native binaries"
[feature.native.tasks.test-native-downsample]
cmd = "ctest --test-dir $ITK_WASM_NATIVE_WORKSPACE/downsample-build"
depends-on = ["build-native-downsample"]
description = "Test downsample native binaries"
[feature.native.tasks.configure-native-mesh-io]
cmd = '''cmake -B$ITK_WASM_NATIVE_WORKSPACE/mesh-io-build -Spackages/mesh-io -GNinja
-DITK_DIR:PATH=$ITK_WASM_ITK_BUILD_DIR
-DBUILD_TESTING:BOOL=ON
-DCMAKE_CXX_STANDARD:STRING=20
-DCMAKE_BUILD_TYPE:STRING=Debug'''
depends-on = ["build-itk-wasm", "mesh-io-test-data-download"]
outputs = ["native/mesh-io-build/CMakeFiles/"]
description = "Configure mesh-io native binaries"
[feature.native.tasks.build-native-mesh-io]
cmd = "cmake --build $ITK_WASM_NATIVE_WORKSPACE/mesh-io-build"
depends-on = ["configure-native-mesh-io"]
description = "Build mesh-io native binaries"
[feature.native.tasks.test-native-mesh-io]
cmd = "ctest --test-dir $ITK_WASM_NATIVE_WORKSPACE/mesh-io-build"
depends-on = ["build-native-mesh-io"]
description = "Test mesh-io native binaries"
[feature.native.tasks.configure-native-transform-io]
cmd = '''cmake -B$ITK_WASM_NATIVE_WORKSPACE/transform-io-build -Spackages/transform-io -GNinja
-DITK_DIR:PATH=$ITK_WASM_ITK_BUILD_DIR
-DBUILD_TESTING:BOOL=ON
-DCMAKE_CXX_STANDARD:STRING=20
-DCMAKE_BUILD_TYPE:STRING=Debug'''
depends-on = ["build-itk-wasm", "transform-io-test-data-download"]
outputs = ["native/transform-io-build/CMakeFiles/"]
description = "Configure transform-io native binaries"
[feature.native.tasks.build-native-transform-io]
cmd = "cmake --build $ITK_WASM_NATIVE_WORKSPACE/transform-io-build"
depends-on = ["configure-native-transform-io"]
description = "Build transform-io native binaries"
[feature.native.tasks.test-native-transform-io]
cmd = "ctest --test-dir $ITK_WASM_NATIVE_WORKSPACE/transform-io-build"
depends-on = ["build-native-transform-io"]
description = "Test transform-io native binaries"
[feature.native.dependencies]
cmake = ">=3.30.2,<4"
cxx-compiler = ">=1.7.0,<2"
ninja = ">=1.12.1,<2"
[environments]
native = ["native"]