WIP: fix workflow?
All checks were successful
Build & Test WASM / build-and-test (push) Successful in 2m44s
All checks were successful
Build & Test WASM / build-and-test (push) Successful in 2m44s
This commit is contained in:
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -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: |
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user