diff --git a/itk_wasm_env.bash b/itk_wasm_env.bash index bd65f582d..c3cb7f0a6 100755 --- a/itk_wasm_env.bash +++ b/itk_wasm_env.bash @@ -28,5 +28,8 @@ mkdir -p ${ITK_WASM_ITK_BUILD_DIR} || die "Could not create ITK build directory" export ITK_WASM_DICOM_TEST_DATA_HASH=${ITK_WASM_DICOM_TEST_DATA_HASH:-$(cat packages/dicom/package.json | jq -e -r '."itk-wasm"."test-data-hash"')} export ITK_WASM_DICOM_TEST_DATA_URLS=${ITK_WASM_DICOM_TEST_DATA_URLS:-$(cat packages/dicom/package.json | jq -e -r '."itk-wasm"."test-data-urls" | join(" ")')} +export ITK_WASM_COMPARE_IMAGES_TEST_DATA_HASH=${ITK_WASM_COMPARE_IMAGES_TEST_DATA_HASH:-$(cat packages/compare-images/package.json | jq -e -r '."itk-wasm"."test-data-hash"')} +export ITK_WASM_COMPARE_IMAGES_TEST_DATA_URLS=${ITK_WASM_COMPARE_IMAGES_TEST_DATA_URLS:-$(cat packages/compare-images/package.json | jq -e -r '."itk-wasm"."test-data-urls" | join(" ")')} + 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"')} 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(" ")')} diff --git a/packages/compare-images/package.json b/packages/compare-images/package.json index 1e0fc36cc..ce6f4d797 100644 --- a/packages/compare-images/package.json +++ b/packages/compare-images/package.json @@ -8,6 +8,10 @@ "itk-wasm": { "emscripten-docker-image": "itkwasm/emscripten:latest", "wasi-docker-image": "itkwasm/wasi:latest", + "test-data-hash": "bafybeiafli6egtmkcgany65po64w67hpqnmgwr5utqo6ycbbz7k5l33llu", + "test-data-urls": [ + "https://github.com/InsightSoftwareConsortium/ITK-Wasm/releases/download/itk-wasm-v1.0.0-b.171/compare-images-test-data.tar.gz" + ], "typescript-package-name": "@itk-wasm/compare-images", "python-package-name": "itkwasm-compare-images", "package-description": "Compare images with a tolerance for regression testing.", diff --git a/pixi.toml b/pixi.toml index afcc35976..72a6ce514 100644 --- a/pixi.toml +++ b/pixi.toml @@ -22,6 +22,13 @@ depends-on = ["pnpm-install"] outputs = ["packages/dicom/test/data.tar.gz"] description = "Download DICOM test data" +[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.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" @@ -161,6 +168,26 @@ 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-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-mesh-io] cmd = '''cmake -B$ITK_WASM_NATIVE_WORKSPACE/mesh-io-build -Spackages/mesh-io -GNinja -DITK_DIR:PATH=$ITK_WASM_ITK_BUILD_DIR