1
0

WIP: fix workflow?
All checks were successful
Build & Test WASM / build-and-test (push) Successful in 2m44s

This commit is contained in:
2026-03-15 21:55:51 +01:00
parent 19344609f4
commit 2ce1772611
2 changed files with 17 additions and 2 deletions

View File

@@ -36,7 +36,13 @@ jobs:
- 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" ./...
GOROOT="$(go env GOROOT)"
if [ -f "$GOROOT/lib/wasm/go_js_wasm_exec" ]; then
EXEC="$GOROOT/lib/wasm/go_js_wasm_exec"
else
EXEC="$GOROOT/misc/wasm/go_js_wasm_exec"
fi
GOOS=js GOARCH=wasm go test -exec="$EXEC" ./...
- name: Build WASM binary
run: |

View File

@@ -14,7 +14,16 @@ else
fi
echo "Copying wasm_exec.js from Go SDK..."
cp "$(go env GOROOT)/lib/wasm/wasm_exec.js" "$SCRIPT_DIR/wasm_exec.js"
GOROOT="$(go env GOROOT)"
if [ -f "$GOROOT/lib/wasm/wasm_exec.js" ]; then
cp "$GOROOT/lib/wasm/wasm_exec.js" "$SCRIPT_DIR/wasm_exec.js"
elif [ -f "$GOROOT/misc/wasm/wasm_exec.js" ]; then
cp "$GOROOT/misc/wasm/wasm_exec.js" "$SCRIPT_DIR/wasm_exec.js"
else
echo "Error: could not find wasm_exec.js in Go SDK"
find "$GOROOT" -name "wasm_exec.js" 2>/dev/null
exit 1
fi
echo ""
echo "Done. kobopatch source is at: $KOBOPATCH_DIR"