Skip to content
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
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ jobs:
with:
python-version: "3.11"

- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v14
with:
version: 4.0.13

- name: Set up uv package manager
uses: astral-sh/setup-uv@v5

Expand All @@ -50,7 +55,10 @@ jobs:
if: steps.cache-demo-data.outputs.cache-hit != 'true'
run: cd packages/docs && uv run generate_demo_data.py

- name: Run custom build script
- name: Build WASM modules
run: ./scripts/build_wasm.sh

- name: Build JavaScript and Python packages
run: ./scripts/build.sh

- name: Upload node package artifact
Expand Down
2 changes: 1 addition & 1 deletion packages/density-clustering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"module": "density_clustering_wasm/js/index.js",
"type": "module",
"scripts": {
"build": "npx wasm-pack build --release --target web density_clustering_wasm && rm density_clustering_wasm/pkg/.gitignore density_clustering_wasm/pkg/package.json"
"build": "npx -y wasm-pack build --release --target web density_clustering_wasm && rm density_clustering_wasm/pkg/.gitignore density_clustering_wasm/pkg/package.json"
},
"files": [
"density_clustering_wasm/js/index.js",
Expand Down
1 change: 1 addition & 0 deletions packages/umap-wasm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ runtime.js: $(SOURCES) $(HEADERS)
-DUMAPPP_NO_PARALLEL_OPTIMIZATION \
-sENVIRONMENT=web \
-sMODULARIZE -sSINGLE_FILE -sALLOW_MEMORY_GROWTH \
-sEXPORTED_RUNTIME_METHODS='["HEAP32", "HEAPF32", "HEAPU8"]' \
-sWASM_BIGINT=1 \
-msimd128 \
-o runtime.mjs
Expand Down
2 changes: 1 addition & 1 deletion packages/umap-wasm/third_party/download_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ download https://github.com/nmslib/hnswlib.git v0.8.0 hnswlib
# BSD-2-Clause License
download https://github.com/brj0/nndescent.git 514275f263be010712530a95e56ffc9b81b9110b nndescent
pushd nndescent
git apply ../nndescent.patch
git apply ../nndescent.patch || true
popd
2 changes: 2 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

# Build all JavaScript and Python packages

set -euxo pipefail

pushd packages/component
Expand Down
19 changes: 19 additions & 0 deletions scripts/build_wasm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# Build WASM modules

set -euxo pipefail

pushd packages/density-clustering
npm run build
popd

pushd packages/umap-wasm

pushd third_party
./download_dependencies.sh
popd

make

popd