Skip to content

Commit ef979e1

Browse files
committed
CI: Try to install newer wasm2wat & wat2wasm
1 parent d64e938 commit ef979e1

File tree

1 file changed

+11
-21
lines changed

1 file changed

+11
-21
lines changed

scripts/install-wasm-tools.sh

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -81,34 +81,24 @@ cargo install pwasm-utils-cli --bin wasm-prune --force
8181
if [[ "$OSTYPE" == "linux-gnu" ]]; then
8282
set -e
8383

84-
BUILD_NUM=`curl -s https://storage.googleapis.com/wasm-llvm/builds/linux/lkgr.json | jq -r '.build'`
85-
if [ -z ${BUILD_NUM+x} ]; then
86-
echo "Could not fetch the latest build number.";
87-
exit 1;
88-
fi
89-
9084
tmp=`mktemp -d`
9185
pushd $tmp > /dev/null
92-
echo "Downloading wasm-binaries.tbz2";
93-
curl -L -o wasm-binaries.tbz2 https://storage.googleapis.com/wasm-llvm/builds/linux/$BUILD_NUM/wasm-binaries.tbz2
86+
87+
echo "Downloading wabt-1.0.33-ubuntu.tar.gz";
88+
wget https://github.com/WebAssembly/wabt/releases/download/1.0.33/wabt-1.0.33-ubuntu.tar.gz
9489

95-
declare -a binaries=("wasm2wat" "wat2wasm") # Default binaries
96-
if [ "$#" -ne 0 ]; then
97-
echo "Installing selected binaries.";
98-
binaries=("$@");
99-
else
100-
echo "Installing default binaries.";
101-
fi
90+
tar --strip-components=2 -xf wabt-1.0.33-ubuntu.tar.gz wabt-1.0.33/bin/wasm2wat wabt-1.0.33/bin/wat2wasm
91+
92+
echo "Installing wasm2wat & wat2wasm into ~/.cargo/bin"
93+
cp -f wasm2wat ~/.cargo/bin/
94+
cp -f wat2wasm ~/.cargo/bin/
10295

103-
for bin in "${binaries[@]}"
104-
do
105-
echo "Installing $bin into ~/.cargo/bin"
106-
tar -xvjf wasm-binaries.tbz2 wasm-install/bin/$bin > /dev/null
107-
cp -f wasm-install/bin/$bin ~/.cargo/bin/
108-
done
10996
popd > /dev/null
11097
fi
11198

11299
echo ""
113100
echo "Run source ~/.cargo/env now to update environment."
114101
echo ""
102+
103+
source ~/.cargo/env
104+
wasm2wat --version

0 commit comments

Comments
 (0)