CI: run WASI tests

This commit is contained in:
Frank Denis
2025-12-30 23:00:12 +01:00
parent b490bcbd7c
commit e3f1375f55
+4 -19
View File
@@ -168,7 +168,7 @@ jobs:
- name: Install Wasmer
uses: wasmerio/setup-wasmer@v3.1
- name: Build for WASI
- name: Build for wasi-core
run: zig build -Dtarget=wasm32-wasi -Doptimize=ReleaseSafe
- name: Run tests with Wasmer
@@ -177,25 +177,10 @@ jobs:
failed=0
for wasm in *.wasm; do
name="${wasm%.wasm}"
exp="../../test/default/${name}.exp"
echo "[$name]"
if [ -f "$exp" ]; then
if ! wasmer run "$wasm" > output.txt 2>&1; then
echo "*** [$name] EXECUTION FAILED" >&2
cat output.txt
failed=1
continue
fi
if ! diff -q output.txt "$exp" > /dev/null 2>&1; then
echo "*** [$name] OUTPUT MISMATCH" >&2
echo "Expected:"
cat "$exp"
echo "Got:"
cat output.txt
failed=1
fi
else
echo "*** [$name] NO .exp file found, skipping validation"
if ! wasmer run --dir . "$wasm" 2>&1; then
echo "*** [$name] FAILED" >&2
failed=1
fi
done
exit $failed