summaryrefslogtreecommitdiff
path: root/.github/workflows/bun-ci.yml
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2026-03-31 19:02:17 +0200
committerMaze Winther <mazewinther@gmail.com>2026-03-31 19:02:17 +0200
commit0f5dca4f12d926ec0015116e85ec1129a6891f40 (patch)
tree5048cd742e9d712e9c4588fd3ded529273c30b71 /.github/workflows/bun-ci.yml
parent154b78c7d1d41fdbff566e486627e52c841a7848 (diff)
downloadopencut-0f5dca4f12d926ec0015116e85ec1129a6891f40.tar.gz
fix: build wasm before bun install in CI
Diffstat (limited to '.github/workflows/bun-ci.yml')
-rw-r--r--.github/workflows/bun-ci.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/.github/workflows/bun-ci.yml b/.github/workflows/bun-ci.yml
index 9c34f977..58198586 100644
--- a/.github/workflows/bun-ci.yml
+++ b/.github/workflows/bun-ci.yml
@@ -41,6 +41,26 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
+ - name: Install Rust wasm target
+ run: rustup target add wasm32-unknown-unknown
+
+ - name: Install wasm-pack
+ uses: jetli/wasm-pack-action@v0.4.0
+ with:
+ version: latest
+
+ - name: Cache Rust build artifacts
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.cargo/registry
+ ~/.cargo/git
+ target
+ key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
+
+ - name: Build WASM
+ run: wasm-pack build rust/wasm --target bundler --out-dir pkg
+
- name: Install Bun
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76
with: