Skip to content

Commit a16e5fb

Browse files
committed
build(transform-io): add pixi native build and test config
1 parent 7fc138f commit a16e5fb

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

itk_wasm_env.bash

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ export ITK_WASM_DOWNSAMPLE_TEST_DATA_URLS=${ITK_WASM_DOWNSAMPLE_TEST_DATA_URLS:-
4242

4343
export ITK_WASM_MESH_IO_TEST_DATA_HASH=${ITK_WASM_MESH_IO_TEST_DATA_HASH:-$(cat packages/mesh-io/package.json | jq -e -r '."itk-wasm"."test-data-hash"')}
4444
export ITK_WASM_MESH_IO_TEST_DATA_URLS=${ITK_WASM_MESH_IO_TEST_DATA_URLS:-$(cat packages/mesh-io/package.json | jq -e -r '."itk-wasm"."test-data-urls" | join(" ")')}
45+
46+
export ITK_WASM_TRANSFORM_IO_TEST_DATA_HASH=${ITK_WASM_TRANSFORM_IO_TEST_DATA_HASH:-$(cat packages/mesh-io/package.json | jq -e -r '."itk-wasm"."test-data-hash"')}
47+
export ITK_WASM_TRANSFORM_IO_TEST_DATA_URLS=${ITK_WASM_TRANSFORM_IO_TEST_DATA_URLS:-$(cat packages/mesh-io/package.json | jq -e -r '."itk-wasm"."test-data-urls" | join(" ")')}

pixi.toml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ description = "Install Node.js dependencies"
2222
[tasks.build]
2323
cmd = "pnpm run build"
2424
description = "Build ITK-Wasm"
25-
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"]
25+
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"]
2626

2727
[tasks.test]
2828
cmd = "pnpm run test"
2929
description = "Test ITK-Wasm"
30-
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"]
30+
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"]
3131

3232
[tasks.compare-images-test-data-download]
3333
cmd = "npx dam download test/data test/data.tar.gz $ITK_WASM_COMPARE_IMAGES_TEST_DATA_HASH $ITK_WASM_COMPARE_IMAGES_TEST_DATA_URLS"
@@ -71,6 +71,13 @@ depends-on = ["pnpm-install"]
7171
outputs = ["packages/mesh-io/test/data.tar.gz"]
7272
description = "Download mesh-io test data"
7373

74+
[tasks.transform-io-test-data-download]
75+
cmd = "npx dam download test/data test/data.tar.gz $ITK_WASM_TRANSFORM_IO_TEST_DATA_HASH $ITK_WASM_TRANSFORM_IO_TEST_DATA_URLS"
76+
cwd = "packages/transform-io"
77+
depends-on = ["pnpm-install"]
78+
outputs = ["packages/transform-io/test/data.tar.gz"]
79+
description = "Download transform-io test data"
80+
7481
[tasks.export-itk-wasm-env-vars]
7582
cmd = "bash -c ./itk_wasm_env.bash && env | grep ITK_WASM | grep -v TEST > ./src/docker/itk-wasm-base/itk_wasm_env_vars.sh"
7683
outputs = ["src/docker/itk-wasm-base/itk_wasm_env_vars.*"]
@@ -144,7 +151,8 @@ cmd = '''cmake -B$ITK_WASM_ITK_BUILD_DIR -S$ITK_WASM_ITK_SOURCE_DIR -GNinja
144151
-DModule_TotalVariation:BOOL=ON
145152
-DModule_IOMeshSTL:BOOL=ON
146153
-DModule_GenericLabelInterpolator:BOOL=ON
147-
-DModule_MeshToPolyData=ON
154+
-DModule_MeshToPolyData:BOOL=ON
155+
-DModule_ITKIOTransformMINC:BOOL=ON
148156
-DDO_NOT_BUILD_ITK_TEST_DRIVER:BOOL=ON
149157
-DOPJ_USE_THREAD:BOOL=OFF
150158
-DDCMTK_WITH_THREADS:BOOL=OFF
@@ -303,6 +311,26 @@ cmd = "ctest --test-dir $ITK_WASM_NATIVE_WORKSPACE/mesh-io-build"
303311
depends-on = ["build-native-mesh-io"]
304312
description = "Test mesh-io native binaries"
305313

314+
[feature.native.tasks.configure-native-transform-io]
315+
cmd = '''cmake -B$ITK_WASM_NATIVE_WORKSPACE/transform-io-build -Spackages/transform-io -GNinja
316+
-DITK_DIR:PATH=$ITK_WASM_ITK_BUILD_DIR
317+
-DBUILD_TESTING:BOOL=ON
318+
-DCMAKE_CXX_STANDARD:STRING=20
319+
-DCMAKE_BUILD_TYPE:STRING=Debug'''
320+
depends-on = ["build-itk-wasm", "transform-io-test-data-download"]
321+
outputs = ["native/transform-io-build/CMakeFiles/"]
322+
description = "Configure transform-io native binaries"
323+
324+
[feature.native.tasks.build-native-transform-io]
325+
cmd = "cmake --build $ITK_WASM_NATIVE_WORKSPACE/transform-io-build"
326+
depends-on = ["configure-native-transform-io"]
327+
description = "Build transform-io native binaries"
328+
329+
[feature.native.tasks.test-native-transform-io]
330+
cmd = "ctest --test-dir $ITK_WASM_NATIVE_WORKSPACE/transform-io-build"
331+
depends-on = ["build-native-transform-io"]
332+
description = "Test transform-io native binaries"
333+
306334
[feature.native.dependencies]
307335
cmake = ">=3.30.2,<4"
308336
cxx-compiler = ">=1.7.0,<2"

0 commit comments

Comments
 (0)