@@ -361,7 +361,7 @@ function sightglass_test()
361
361
362
362
function setup_wabt()
363
363
{
364
- WABT_VERSION=1.0.37
364
+ # please sync with .github/actions/install-wasi-sdk-wabt/action.yml
365
365
if [ ${WABT_BINARY_RELEASE} == " YES" ]; then
366
366
echo " download a binary release and install"
367
367
local WAT2WASM=${WORK_DIR} /wabt/out/gcc/Release/wat2wasm
@@ -370,30 +370,30 @@ function setup_wabt()
370
370
cosmopolitan)
371
371
;;
372
372
linux)
373
- WABT_PLATFORM=ubuntu-20.04
373
+ WABT_URL=https://github.com/WebAssembly/wabt/releases/download/1.0.37/wabt-1.0.37-ubuntu-20.04.tar.gz
374
+ WABT_VERSION=1.0.37
374
375
;;
375
376
darwin)
376
- WABT_PLATFORM=macos-12
377
+ WABT_URL=https://github.com/WebAssembly/wabt/releases/download/1.0.36/wabt-1.0.36-macos-12.tar.gz
378
+ WABT_VERSION=1.0.36
377
379
;;
378
380
windows)
379
- WABT_PLATFORM=windows
381
+ WABT_URL=https://github.com/WebAssembly/wabt/releases/download/1.0.37/wabt-1.0.37-windows.tar.gz
382
+ WABT_VERSION=1.0.37
380
383
;;
381
384
* )
382
385
echo " wabt platform for ${PLATFORM} in unknown"
383
386
exit 1
384
387
;;
385
388
esac
386
- if [ ! -f /tmp/wabt-${WABT_VERSION} -${WABT_PLATFORM} .tar.gz ]; then
387
- curl -L \
388
- https://github.com/WebAssembly/wabt/releases/download/${WABT_VERSION} /wabt-${WABT_VERSION} -${WABT_PLATFORM} .tar.gz \
389
- -o /tmp/wabt-${WABT_VERSION} -${WABT_PLATFORM} .tar.gz
390
- fi
391
389
392
- cd /tmp \
393
- && tar zxf wabt-${WABT_VERSION} -${WABT_PLATFORM} .tar.gz \
394
- && mkdir -p ${WORK_DIR} /wabt/out/gcc/Release/ \
395
- && install wabt-${WABT_VERSION} /bin/* ${WORK_DIR} /wabt/out/gcc/Release/ \
396
- && cd -
390
+ pushd /tmp
391
+ wget -O wabt-tar.gz --progress=dot:giga ${WABT_URL}
392
+ tar xf wabt-tar.gz
393
+ popd
394
+
395
+ mkdir -p ${WORK_DIR} /wabt/out/gcc/Release/
396
+ cp /tmp/wabt-${WABT_VERSION} /bin/* ${WORK_DIR} /wabt/out/gcc/Release/
397
397
fi
398
398
else
399
399
echo " download source code and compile and install"
@@ -536,6 +536,9 @@ function spec_test()
536
536
popd
537
537
echo $( pwd)
538
538
539
+ # TODO: remove it when we can assume wabt is installed
540
+ # especially for CI Or there is installation script in the project
541
+ # that we can rely on
539
542
setup_wabt
540
543
541
544
ln -sf ${WORK_DIR} /../spec-test-script/all.py .
@@ -622,8 +625,8 @@ function spec_test()
622
625
function wamr_compiler_test()
623
626
{
624
627
if [[ $1 != " aot" ]]; then
625
- echo " WAMR compiler tests only support AOT mode"
626
- exit 1
628
+ echo " WAMR compiler tests only support AOT mode, skip $1 "
629
+ return 0
627
630
fi
628
631
629
632
echo " Now start WAMR compiler tests"
0 commit comments