Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm ci #1

Merged
merged 5 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: WebAssembly

on: [pull_request]

jobs:
build-wasm:
name: "Build WebAssembly"
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main

- uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install
uses: pnpm/action-setup@v2
with:
run_install: true

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Build
run: |
pnpm build

- name: Test
run: |
pnpm test:python:wasi
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
emscripten-build/
wasi-build/
node_modules/
build/
micromamba/
test/data.tar.gz
test/data/
test/pyodide-emscripten.tar.bz2
wasm/python/
wasm/typescript/
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ if(NOT ITK_SOURCE_DIR)
find_package(ITK REQUIRED)
list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR})
include(ITKModuleExternal)
if(WASI OR EMSCRIPTEN)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
add_subdirectory(wasm)
endif()
else()
set(ITK_DIR ${CMAKE_BINARY_DIR})
itk_module_impl()
Expand Down
10 changes: 10 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: mesh-to-poly-data
channels:
- conda-forge
dependencies:
- pytest
- python=3.11
- pip
- pip:
- hatch
- itkwasm-mesh-io
48 changes: 48 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "@itk-wasm/nornir-build",
"version": "1.0.0",
"description": "npm scripts to generate itk-wasm artifacts.",
"private": true,
"packageManager": "[email protected]",
"type": "module",
"itk-wasm": {
"emscripten-docker-image": "itkwasm/emscripten:20240517-32a1ffd9",
"wasi-docker-image": "itkwasm/wasi:20240517-32a1ffd9",
"typescript-package-name": "@itk-wasm/nornir",
"typescript-output-dir": "wasm/typescript",
"python-package-name": "itkwasm-nornir",
"python-output-dir": "wasm/python",
"package-description": "Nornir takes large sets of overlapping images in 2D and produces registered, i.e. aligned, 2D and 3D volumes of any size and scale.",
"repository": "https://github.com/nornir/ITKNornir"
},
"scripts": {
"build": "pnpm build:gen:typescript && pnpm build:gen:python",
"build:emscripten": "itk-wasm pnpm-script build:emscripten",
"build:emscripten:debug": "itk-wasm pnpm-script build:emscripten:debug",
"build:wasi": "itk-wasm pnpm-script build:wasi",
"build:wasi:debug": "itk-wasm pnpm-script build:wasi:debug",
"build:python:wasi": "itk-wasm pnpm-script build:python:wasi",
"bindgen:typescript": "itk-wasm pnpm-script bindgen:typescript",
"bindgen:python": "itk-wasm pnpm-script bindgen:python",
"build:gen:typescript": "itk-wasm pnpm-script build:gen:typescript",
"build:gen:python": "itk-wasm pnpm-script build:gen:python",
"build:micromamba": "itk-wasm pnpm-script build:micromamba",
"build:python:versionSync": "itk-wasm pnpm-script build:python:versionSync",
"publish:python": "itk-wasm pnpm-script publish:python",
"test": "pnpm test:data:download && pnpm build:gen:python && pnpm test:python",
"test:data:download": "dam download test/data test/data.tar.gz bafkreigpkk3pqcoqzjzcauogw6dml52yig3ksmcrobau5pkoictymizzri https://github.com/InsightSoftwareConsortium/itk-wasm/releases/download/itk-wasm-v1.0.0-b.163/create-itk-wasm-test-data.tar.gz https://bafybeiczuxeuma5cjuli5mtapqnjqypeaum5ikd45zcmfhtt2emp365tca.ipfs.w3s.link/ipfs/bafybeiczuxeuma5cjuli5mtapqnjqypeaum5ikd45zcmfhtt2emp365tca/create-itk-wasm-test-data.tar.gz https://ipfs.filebase.io/ipfs/QmcxyvUKnaoTTwUqEPXwp1sdcbrFh3XnnwckLKVRpctJx9",
"test:data:pack": "dam pack test/data test/data.tar.gz",
"test:python:wasi": "itk-wasm pnpm-script test:python:wasi",
"test:python:emscripten": "itk-wasm pnpm-script test:python:emscripten",
"test:python:dispatch": "itk-wasm pnpm-script test:python:emscripten",
"test:python": "itk-wasm pnpm-script test:python",
"test:wasi": "itk-wasm pnpm-script test:wasi",
"clean": "git clean -fdx -e node_modules"
},
"license": "Apache-2.0",
"devDependencies": {
"@itk-wasm/dam": "^1.1.1",
"@thewtex/setup-micromamba": "^1.9.7",
"itk-wasm": "^1.0.0-b.174"
}
}
Loading
Loading