Skip to content

Commit d7a1ee3

Browse files
committed
test(image-io): add native configure-build-test configuration
1 parent 2e1048e commit d7a1ee3

File tree

4 files changed

+80
-33
lines changed

4 files changed

+80
-33
lines changed

itk_wasm_env.bash

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ export ITK_WASM_DICOM_TEST_DATA_URLS=${ITK_WASM_DICOM_TEST_DATA_URLS:-$(cat pack
4040
export ITK_WASM_DOWNSAMPLE_TEST_DATA_HASH=${ITK_WASM_DOWNSAMPLE_TEST_DATA_HASH:-$(cat packages/downsample/package.json | jq -e -r '."itk-wasm"."test-data-hash"')}
4141
export ITK_WASM_DOWNSAMPLE_TEST_DATA_URLS=${ITK_WASM_DOWNSAMPLE_TEST_DATA_URLS:-$(cat packages/downsample/package.json | jq -e -r '."itk-wasm"."test-data-urls" | join(" ")')}
4242

43+
export ITK_WASM_IMAGE_IO_TEST_DATA_HASH=${ITK_WASM_IMAGE_IO_TEST_DATA_HASH:-$(cat packages/mesh-io/package.json | jq -e -r '."itk-wasm"."test-data-hash"')}
44+
export ITK_WASM_IMAGE_IO_TEST_DATA_URLS=${ITK_WASM_IMAGE_IO_TEST_DATA_URLS:-$(cat packages/mesh-io/package.json | jq -e -r '."itk-wasm"."test-data-urls" | join(" ")')}
45+
4346
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"')}
4447
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(" ")')}
4548

packages/image-io/pixi.lock

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/image-io/pixi.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pillow = ">=10.4.0,<12"
8484
pyodide-py = ">=0.26.3, <0.27"
8585
pytest-pyodide = ">=0.58.3, <0.59"
8686
itk-webassemblyinterface = ">=1.0b175, <2"
87-
itkwasm = ">=1.0b179, <2"
87+
itkwasm = ">=1.0b185, <2"
8888
itkwasm-image-io-wasi = { path = "python/itkwasm-image-io-wasi", editable = true }
8989

9090
[feature.python.tasks.test-wasi]

pixi.toml

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,29 @@ 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", "build-native-transform-io"]
25+
depends-on = ["pnpm-install",
26+
"build-itk-wasm",
27+
"build-native-compare-images",
28+
"build-native-compare-meshes",
29+
"build-native-compress-stringify",
30+
"build-native-dicom",
31+
"build-native-downsample",
32+
"build-native-image-io",
33+
"build-native-mesh-io",
34+
"build-native-transform-io"]
2635

2736
[tasks.test]
2837
cmd = "pnpm run test --filter !create-itk-wasm"
2938
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", "test-native-transform-io"]
39+
depends-on = ["test-itk-wasm",
40+
"test-native-compare-images",
41+
"test-native-compare-meshes",
42+
"test-native-compress-stringify",
43+
"test-native-dicom",
44+
"test-native-downsample",
45+
"test-native-image-io",
46+
"test-native-mesh-io",
47+
"test-native-transform-io"]
3148

3249
[tasks.compare-images-test-data-download]
3350
cmd = "npx dam download test/data test/data.tar.gz $ITK_WASM_COMPARE_IMAGES_TEST_DATA_HASH $ITK_WASM_COMPARE_IMAGES_TEST_DATA_URLS"
@@ -64,6 +81,13 @@ depends-on = ["pnpm-install"]
6481
outputs = ["packages/downsample/test/data.tar.gz"]
6582
description = "Download downsample test data"
6683

84+
[tasks.image-io-test-data-download]
85+
cmd = "npx dam download test/data test/data.tar.gz $ITK_WASM_IMAGE_IO_TEST_DATA_HASH $ITK_WASM_IMAGE_IO_TEST_DATA_URLS"
86+
cwd = "packages/image-io"
87+
depends-on = ["pnpm-install"]
88+
outputs = ["packages/image-io/test/data.tar.gz"]
89+
description = "Download image-io test data"
90+
6791
[tasks.mesh-io-test-data-download]
6892
cmd = "npx dam download test/data test/data.tar.gz $ITK_WASM_MESH_IO_TEST_DATA_HASH $ITK_WASM_MESH_IO_TEST_DATA_URLS"
6993
cwd = "packages/mesh-io"
@@ -297,6 +321,26 @@ cmd = "ctest --test-dir $ITK_WASM_NATIVE_WORKSPACE/downsample-build"
297321
depends-on = ["build-native-downsample"]
298322
description = "Test downsample native binaries"
299323

324+
[feature.native.tasks.configure-native-image-io]
325+
cmd = '''cmake -B$ITK_WASM_NATIVE_WORKSPACE/image-io-build -Spackages/image-io -GNinja
326+
-DITK_DIR:PATH=$ITK_WASM_ITK_BUILD_DIR
327+
-DBUILD_TESTING:BOOL=ON
328+
-DCMAKE_CXX_STANDARD:STRING=20
329+
-DCMAKE_BUILD_TYPE:STRING=Debug'''
330+
depends-on = ["build-itk-wasm", "image-io-test-data-download"]
331+
outputs = ["native/image-io-build/CMakeFiles/"]
332+
description = "Configure image-io native binaries"
333+
334+
[feature.native.tasks.build-native-image-io]
335+
cmd = "cmake --build $ITK_WASM_NATIVE_WORKSPACE/image-io-build"
336+
depends-on = ["configure-native-image-io"]
337+
description = "Build image-io native binaries"
338+
339+
[feature.native.tasks.test-native-image-io]
340+
cmd = "ctest --test-dir $ITK_WASM_NATIVE_WORKSPACE/image-io-build"
341+
depends-on = ["build-native-image-io"]
342+
description = "Test image-io native binaries"
343+
300344
[feature.native.tasks.configure-native-mesh-io]
301345
cmd = '''cmake -B$ITK_WASM_NATIVE_WORKSPACE/mesh-io-build -Spackages/mesh-io -GNinja
302346
-DITK_DIR:PATH=$ITK_WASM_ITK_BUILD_DIR

0 commit comments

Comments
 (0)