test all three targets

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
pull/370/head
Joel Dice 2 years ago
parent 2797183e1d
commit d348e69185
No known key found for this signature in database
GPG Key ID: 3A184AC8781781DC

@ -39,8 +39,9 @@ jobs:
0-cache-macos-latest
if: matrix.os == 'macos-latest'
- name: Install wasmtime for tests
# TODO: switch to Wasmtime 17 once it's released, which will include https://github.com/bytecodealliance/wasmtime/pull/7750
run: |
curl -f -L --retry 5 https://wasmtime.dev/install.sh | bash -s -- --version v16.0.0
curl -f -L --retry 5 https://wasmtime.dev/install.sh | bash -s -- --version dev
~/.wasmtime/bin/wasmtime --version
curl -f -L --retry 5 -o ~/.wasmtime/bin/wasi_snapshot_preview1.command.wasm https://github.com/bytecodealliance/wasmtime/releases/download/v16.0.0/wasi_snapshot_preview1.command.wasm
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then

@ -44,9 +44,7 @@ echo $CC
echo $CXX
echo "SDK: $wasi_sdk"
# TODO: `wasm32-wasi-threads` should be in this list, but as of this writing the
# `signal.c` test is failing due to https://github.com/bytecodealliance/wasmtime/issues/7745
for target in wasm32-wasi-preview2 wasm32-wasi; do
for target in wasm32-wasi wasm32-wasi-threads wasm32-wasi-preview2; do
echo "===== Testing target $target ====="
cd $testdir/compile-only
for options in -O0 -O2 "-O2 -flto"; do

@ -28,10 +28,16 @@ else
file_options=
fi
if [ "$target" == "wasm32-wasi-threads" ]; then
pthread_options="-pthread"
else
pthread_options=
fi
echo "Testing $input..."
# Compile the testcase.
$compiler --target=$target $options $file_options "$input" -o "$wasm"
$compiler --target=$target $pthread_options $options $file_options "$input" -o "$wasm"
# If we don't have a runwasi command, we're just doing compile-only testing.
if [ "$runwasi" == "" ]; then

Loading…
Cancel
Save