diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index b347a30a..8e5dfa60 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -64,7 +64,7 @@ jobs: uses: actions/cache@v4 with: path: | - tools/install + src/frontend/public/wasm key: cache-wasm-${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('src/engine/**', 'tools/build-wasm.sh', 'tools/download-emscripten.sh') }} - name: Setup Node.js ${{ matrix.node-version }} diff --git a/src/frontend/.eslintignore b/src/frontend/.eslintignore index 76d9a19d..0ec1c742 100644 --- a/src/frontend/.eslintignore +++ b/src/frontend/.eslintignore @@ -2,3 +2,6 @@ /dist /node_modules /pnpm-lock.yaml + +# Generated WASM libraries +/public/wasm diff --git a/src/frontend/.gitignore b/src/frontend/.gitignore index 61fae8c9..dd1cc2a2 100644 --- a/src/frontend/.gitignore +++ b/src/frontend/.gitignore @@ -2,3 +2,6 @@ /dist /node_modules /yarn-*.log* + +# Generated WASM libraries +/public/wasm diff --git a/src/frontend/.prettierignore b/src/frontend/.prettierignore index 76d9a19d..0ec1c742 100644 --- a/src/frontend/.prettierignore +++ b/src/frontend/.prettierignore @@ -2,3 +2,6 @@ /dist /node_modules /pnpm-lock.yaml + +# Generated WASM libraries +/public/wasm diff --git a/tools/build-wasm.sh b/tools/build-wasm.sh index 52b24875..430acd78 100755 --- a/tools/build-wasm.sh +++ b/tools/build-wasm.sh @@ -66,3 +66,6 @@ emcmake cmake \ cmake \ --build "${BUILD_DIRECTORY}" \ --target install + +# Copy the generated libraries to the public directory +cp -rv "${INSTALL_DIRECTORY}/wasm" "${PROJECT_DIRECTORY}/src/frontend/public"