Skip to content

Commit

Permalink
build(compress-stringify): add native pixi build-test configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Sep 12, 2024
1 parent 4697ee5 commit a2681ec
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
3 changes: 3 additions & 0 deletions itk_wasm_env.bash
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@ export ITK_WASM_COMPARE_IMAGES_TEST_DATA_URLS=${ITK_WASM_COMPARE_IMAGES_TEST_DAT
export ITK_WASM_COMPARE_MESHES_TEST_DATA_HASH=${ITK_WASM_COMPARE_MESHES_TEST_DATA_HASH:-$(cat packages/compare-meshes/package.json | jq -e -r '."itk-wasm"."test-data-hash"')}
export ITK_WASM_COMPARE_MESHES_TEST_DATA_URLS=${ITK_WASM_COMPARE_MESHES_TEST_DATA_URLS:-$(cat packages/compare-meshes/package.json | jq -e -r '."itk-wasm"."test-data-urls" | join(" ")')}

export ITK_WASM_COMPRESS_STRINGIFY_TEST_DATA_HASH=${ITK_WASM_COMPRESS_STRINGIFY_TEST_DATA_HASH:-$(cat packages/compress-stringify/package.json | jq -e -r '."itk-wasm"."test-data-hash"')}
export ITK_WASM_COMPRESS_STRINGIFY_TEST_DATA_URLS=${ITK_WASM_COMPRESS_STRINGIFY_TEST_DATA_URLS:-$(cat packages/compress-stringify/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(" ")')}
4 changes: 4 additions & 0 deletions packages/compress-stringify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"itk-wasm": {
"emscripten-docker-image": "itkwasm/emscripten:latest",
"wasi-docker-image": "itkwasm/wasi:latest",
"test-data-hash": "bafkreiha6oye3fd5cxfadnua5r2jlkaco2xuyeek454d2ihiffsx7rauqe",
"test-data-urls": [
"https://placeholder"
],
"typescript-package-name": "@itk-wasm/compress-stringify",
"python-package-name": "itkwasm-compress-stringify",
"package-description": "Zstandard compression and decompression and base64 encoding and decoding in WebAssembly.",
Expand Down
27 changes: 27 additions & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ 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.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"
Expand Down Expand Up @@ -215,6 +222,26 @@ 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-mesh-io]
cmd = '''cmake -B$ITK_WASM_NATIVE_WORKSPACE/mesh-io-build -Spackages/mesh-io -GNinja
-DITK_DIR:PATH=$ITK_WASM_ITK_BUILD_DIR
Expand Down

0 comments on commit a2681ec

Please sign in to comment.