File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 4848 # bin/DANP-MCP-CLIENT-${{ matrix.platform }}*
4949 # bin/DANP-MCP-SERVER-${{ matrix.platform }}*
5050 # bin/*.exe
51+
52+ build-wasm :
53+ runs-on : ubuntu-latest
54+ steps :
55+ - uses : actions/checkout@v4
56+
57+ - name : Set up Go
58+ uses : actions/setup-go@v5
59+ with :
60+ go-version : ' 1.24'
61+
62+ - name : Install TinyGo
63+ run : |
64+ wget https://github.com/tinygo-org/tinygo/releases/download/v0.32.0/tinygo0.32.0.linux-amd64.tar.gz
65+ tar -xzf tinygo0.32.0.linux-amd64.tar.gz
66+ sudo mv tinygo /usr/local
67+
68+ - name : Build WASM Modules
69+ run : |
70+ for dir in wasm-examples/*/; do
71+ MODULE_NAME=$(basename "$dir")
72+ echo "Building $MODULE_NAME"
73+ cd "$dir" && \
74+ go mod init "$MODULE_NAME" >/dev/null 2>&1 && \
75+ go get github.com/extism/go-pdk && \
76+ GOOS=wasip1 GOARCH=wasm tinygo build -o "$MODULE_NAME".wasm -target wasi -opt=z -no-debug -scheduler=none main.go
77+ cd -
78+ done
You can’t perform that action at this time.
0 commit comments