Update WABT downloads URL (#4357)

Plus, skip unsupported running mode instead quit during wamr compiler
test
This commit is contained in:
liang.he
2025-06-12 16:06:57 +08:00
committed by GitHub
parent 9becf65d1e
commit 2fe7105e8d
2 changed files with 23 additions and 16 deletions

View File

@ -172,6 +172,10 @@ jobs:
run: ./build.sh run: ./build.sh
working-directory: ./core/iwasm/libraries/lib-wasi-threads/test/ working-directory: ./core/iwasm/libraries/lib-wasi-threads/test/
- name: install wget
shell: bash
run: choco install wget
- name: run tests - name: run tests
shell: bash shell: bash
timeout-minutes: 20 timeout-minutes: 20

View File

@ -361,7 +361,7 @@ function sightglass_test()
function setup_wabt() function setup_wabt()
{ {
WABT_VERSION=1.0.37 # please sync with .github/actions/install-wasi-sdk-wabt/action.yml
if [ ${WABT_BINARY_RELEASE} == "YES" ]; then if [ ${WABT_BINARY_RELEASE} == "YES" ]; then
echo "download a binary release and install" echo "download a binary release and install"
local WAT2WASM=${WORK_DIR}/wabt/out/gcc/Release/wat2wasm local WAT2WASM=${WORK_DIR}/wabt/out/gcc/Release/wat2wasm
@ -370,30 +370,30 @@ function setup_wabt()
cosmopolitan) cosmopolitan)
;; ;;
linux) linux)
WABT_PLATFORM=ubuntu-20.04 WABT_URL=https://github.com/WebAssembly/wabt/releases/download/1.0.37/wabt-1.0.37-ubuntu-20.04.tar.gz
WABT_VERSION=1.0.37
;; ;;
darwin) darwin)
WABT_PLATFORM=macos-12 WABT_URL=https://github.com/WebAssembly/wabt/releases/download/1.0.36/wabt-1.0.36-macos-12.tar.gz
WABT_VERSION=1.0.36
;; ;;
windows) windows)
WABT_PLATFORM=windows WABT_URL=https://github.com/WebAssembly/wabt/releases/download/1.0.37/wabt-1.0.37-windows.tar.gz
WABT_VERSION=1.0.37
;; ;;
*) *)
echo "wabt platform for ${PLATFORM} in unknown" echo "wabt platform for ${PLATFORM} in unknown"
exit 1 exit 1
;; ;;
esac esac
if [ ! -f /tmp/wabt-${WABT_VERSION}-${WABT_PLATFORM}.tar.gz ]; then
curl -L \
https://github.com/WebAssembly/wabt/releases/download/${WABT_VERSION}/wabt-${WABT_VERSION}-${WABT_PLATFORM}.tar.gz \
-o /tmp/wabt-${WABT_VERSION}-${WABT_PLATFORM}.tar.gz
fi
cd /tmp \ pushd /tmp
&& tar zxf wabt-${WABT_VERSION}-${WABT_PLATFORM}.tar.gz \ wget -O wabt-tar.gz --progress=dot:giga ${WABT_URL}
&& mkdir -p ${WORK_DIR}/wabt/out/gcc/Release/ \ tar xf wabt-tar.gz
&& install wabt-${WABT_VERSION}/bin/* ${WORK_DIR}/wabt/out/gcc/Release/ \ popd
&& cd -
mkdir -p ${WORK_DIR}/wabt/out/gcc/Release/
cp /tmp/wabt-${WABT_VERSION}/bin/* ${WORK_DIR}/wabt/out/gcc/Release/
fi fi
else else
echo "download source code and compile and install" echo "download source code and compile and install"
@ -536,6 +536,9 @@ function spec_test()
popd popd
echo $(pwd) echo $(pwd)
#TODO: remove it when we can assume wabt is installed
# especially for CI Or there is installation script in the project
# that we can rely on
setup_wabt setup_wabt
ln -sf ${WORK_DIR}/../spec-test-script/all.py . ln -sf ${WORK_DIR}/../spec-test-script/all.py .
@ -622,8 +625,8 @@ function spec_test()
function wamr_compiler_test() function wamr_compiler_test()
{ {
if [[ $1 != "aot" ]]; then if [[ $1 != "aot" ]]; then
echo "WAMR compiler tests only support AOT mode" echo "WAMR compiler tests only support AOT mode, skip $1"
exit 1 return 0
fi fi
echo "Now start WAMR compiler tests" echo "Now start WAMR compiler tests"