test wasm with _demo/hello

This commit is contained in:
Li Jie
2025-04-17 22:01:23 +08:00
parent 28d944c6af
commit 739cc66d0d

View File

@@ -226,13 +226,6 @@ jobs:
make -j8 make -j8
echo "$PWD" >> $GITHUB_PATH echo "$PWD" >> $GITHUB_PATH
- name: Install wasi-libc
run: |
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/libclang_rt.builtins-wasm32-wasi-25.0.tar.gz
tar -xvf libclang_rt.builtins-wasm32-wasi-25.0.tar.gz
mkdir -p `llvm-config --libdir`/clang/19/lib/wasi/
mv libclang_rt.builtins-wasm32-wasi-25.0/libclang_rt.builtins-wasm32.a `llvm-config --libdir`/clang/19/lib/wasi/
- name: Install llgo - name: Install llgo
run: | run: |
go install ./... go install ./...
@@ -245,10 +238,10 @@ jobs:
echo "Testing cross-compilation wasm with Go 1.24.2" echo "Testing cross-compilation wasm with Go 1.24.2"
# Compile for wasm architecture # Compile for wasm architecture
GOOS=wasip1 GOARCH=wasm llgo build -o hello -v ./helloc GOOS=wasip1 GOARCH=wasm llgo build -o hello -tags=nogc -v ./helloc
# Check file type # Check file type
file hello.wasm file hello.wasm
# Run the wasm binary using llgo_wasm # Run the wasm binary using llgo_wasm
iwasm hello.wasm iwasm --stack-size=819200000 --heap-size=800000000 hello.wasm