Skip to content

Commit 2fe7105

Browse files
authored
Update WABT downloads URL (#4357)
Plus, skip unsupported running mode instead quit during wamr compiler test
1 parent 9becf65 commit 2fe7105

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

.github/workflows/compilation_on_windows.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ jobs:
172172
run: ./build.sh
173173
working-directory: ./core/iwasm/libraries/lib-wasi-threads/test/
174174

175+
- name: install wget
176+
shell: bash
177+
run: choco install wget
178+
175179
- name: run tests
176180
shell: bash
177181
timeout-minutes: 20

tests/wamr-test-suites/test_wamr.sh

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ function sightglass_test()
361361

362362
function setup_wabt()
363363
{
364-
WABT_VERSION=1.0.37
364+
# please sync with .github/actions/install-wasi-sdk-wabt/action.yml
365365
if [ ${WABT_BINARY_RELEASE} == "YES" ]; then
366366
echo "download a binary release and install"
367367
local WAT2WASM=${WORK_DIR}/wabt/out/gcc/Release/wat2wasm
@@ -370,30 +370,30 @@ function setup_wabt()
370370
cosmopolitan)
371371
;;
372372
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
374375
;;
375376
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
377379
;;
378380
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
380383
;;
381384
*)
382385
echo "wabt platform for ${PLATFORM} in unknown"
383386
exit 1
384387
;;
385388
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
391389

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/
397397
fi
398398
else
399399
echo "download source code and compile and install"
@@ -536,6 +536,9 @@ function spec_test()
536536
popd
537537
echo $(pwd)
538538

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
539542
setup_wabt
540543

541544
ln -sf ${WORK_DIR}/../spec-test-script/all.py .
@@ -622,8 +625,8 @@ function spec_test()
622625
function wamr_compiler_test()
623626
{
624627
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
627630
fi
628631

629632
echo "Now start WAMR compiler tests"

0 commit comments

Comments
 (0)