Skip to content

Commit

Permalink
samples/shared-module: try /opt/wabt as well for the ci
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Nov 16, 2023
1 parent f327204 commit bed7f8a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion samples/shared-module/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ do
APP_SRC="$i"
OUT_FILE=${i%.*}.wasm

wat2wasm -o ${OUT_DIR}/wasm-apps/${OUT_FILE} ${APP_SRC}
# Note: the CI installs wabt in /opt/wabt
if type wat2wasm; then
WAT2WASM=${WAT2WASM:-wat2wasm}
elif [ -x /opt/wabt/bin/wat2wasm ]; then
WAT2WASM=${WAT2WASM:-/opt/wabt/bin/wat2wasm}
fi

${WAT2WASM} -o ${OUT_DIR}/wasm-apps/${OUT_FILE} ${APP_SRC}

if [ -f ${OUT_DIR}/wasm-apps/${OUT_FILE} ]; then
echo "build ${OUT_FILE} success"
Expand Down

0 comments on commit bed7f8a

Please sign in to comment.