From 19344609f48baa53202e46d9414911398e2bd2fc Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Sun, 15 Mar 2026 21:45:29 +0100 Subject: [PATCH] WIP: test workflow? --- .github/workflows/build.yml | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3983a92 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,53 @@ +name: Build & Test WASM + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.23' + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Clone kobopatch source + run: | + cd kobopatch-wasm + ./setup.sh + + - name: Run native tests + run: | + cd kobopatch-wasm/kobopatch-src + go test ./... + + - name: Run WASM tests + run: | + cd kobopatch-wasm/kobopatch-src + GOOS=js GOARCH=wasm go test -exec="$(go env GOROOT)/lib/wasm/go_js_wasm_exec" ./... + + - name: Build WASM binary + run: | + cd kobopatch-wasm + ./build.sh + + - name: Upload WASM artifact + if: false + uses: actions/upload-artifact@v4 + with: + name: kobopatch-wasm + path: | + kobopatch-wasm/kobopatch.wasm + kobopatch-wasm/wasm_exec.js