Skip to content

Commit

Permalink
Merge pull request #59 from thewtex/wasm-packages
Browse files Browse the repository at this point in the history
Wasm packages
  • Loading branch information
thewtex authored Feb 3, 2024
2 parents e3313af + 5a156e4 commit 8582797
Show file tree
Hide file tree
Showing 19 changed files with 7,938 additions and 22 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,29 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

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

- name: Install
run: |
npm install
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

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

- name: Build
run: |
npm run build
pnpm build
- name: Test
run: |
pnpm test
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ node_modules/
emscripten-build/
wasi-build/

package-lock.json
pnpm-lock.yaml
micromamba/

wasm/python/

test/pyodide-emscripten.tar.bz2
test/pyodide-dispatch.tar.bz2
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
42 changes: 36 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,47 @@
{
"name": "wasm",
"name": "@itk-wasm/mesh-to-poly-data-build",
"version": "1.0.0",
"description": "npm scripts to generate itk-wasm artifacts.",
"private": true,
"type": "module",
"itk-wasm": {
"emscripten-docker-image": "itkwasm/emscripten:20231217-40780708",
"wasi-docker-image": "itkwasm/wasi:20231217-40780708",
"typescript-package-name": "@itk-wasm/mesh-to-poly-data",
"typescript-output-dir": "wasm/typescript",
"python-package-name": "itkwasm-mesh-to-poly-data",
"python-output-dir": "wasm/python",
"package-description": "Convert an ITK Mesh to a simple data structure compatible with vtkPolyData.",
"repository": "https://github.com/InsightSoftwareConsortium/ITKMeshToPolyData"
},
"scripts": {
"build": "npm run emscripten && npm run bindgen && npm run wasi",
"emscripten": "npx itk-wasm -b emscripten-build build",
"bindgen": "npx itk-wasm -b emscripten-build bindgen --output-dir wasm/typescript --package-name mesh-to-poly-data --package-description \"Convert an ITK Mesh to a simple data structure compatible with vtkPolyData.\" --repository 'https://github.com/InsightSoftwareConsortium/ITKMeshToPolyData'",
"wasi": "npx itk-wasm -b wasi-build -i itkwasm/wasi build",
"build": "pnpm build:gen:typescript && pnpm -r build && 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 -r test && pnpm test:python",
"test:data:download": "echo \"not needed\"",
"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:dispatch",
"test:python": "itk-wasm pnpm-script test:python",
"test:wasi": "itk-wasm pnpm-script test:wasi -- -V",
"clean": "git clean -fdx -e node_modules"
},
"license": "Apache-2.0",
"devDependencies": {
"itk-wasm": "^1.0.0-b.73"
"@itk-wasm/dam": "^1.1.0",
"@thewtex/setup-micromamba": "^1.9.7",
"itk-wasm": "^1.0.0-b.165"
}
}
Loading

0 comments on commit 8582797

Please sign in to comment.