Skip to content

Commit 87499c6

Browse files
ci: update binaryen
Signed-off-by: Henry <mail@henrygressmann.de>
1 parent 46982ca commit 87499c6

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

‎.github/workflows/test.yaml‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,17 @@ jobs:
2323
components: rust-src
2424
rustflags: ""
2525
target: wasm32-unknown-unknown
26-
- name: Install Binaryen and WABT
27-
run: sudo apt-get install -y binaryen wabt
26+
- name: Install Binaryen
27+
run: |
28+
BINARYEN_VERSION=version_129
29+
BINARYEN_DIR="binaryen-${BINARYEN_VERSION}"
30+
BINARYEN_ARCHIVE="${BINARYEN_DIR}-x86_64-linux.tar.gz"
31+
curl -L "https://github.com/WebAssembly/binaryen/releases/download/${BINARYEN_VERSION}/${BINARYEN_ARCHIVE}" -o "/tmp/${BINARYEN_ARCHIVE}"
32+
echo "50b9fa62b9abea752da92ec57e0c555fee578760cd237c40107957715d2976ba /tmp/${BINARYEN_ARCHIVE}" | sha256sum -c -
33+
tar -xzf "/tmp/${BINARYEN_ARCHIVE}" -C /tmp
34+
sudo install "/tmp/${BINARYEN_DIR}/bin/wasm-opt" /usr/local/bin/wasm-opt
35+
- name: Install WABT
36+
run: sudo apt-get install -y wabt
2837
- name: Build wasm
2938
run: ./examples/rust/build.sh
3039
- name: Save artifacts

‎examples/rust/build.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ for bin in "${bins[@]}"; do
2020
RUSTFLAGS="-Zlocation-detail=none -Zfmt-debug=none -C target-feature=$rust_features -C panic=abort" cargo build -Z build-std=std,panic_abort -Z build-std-features="optimize_for_size" --target wasm32-unknown-unknown --package rust-wasm-examples --profile=wasm --bin "$bin"
2121

2222
cp "$out_dir/$bin.wasm" "$dest_dir/"
23-
wasm-opt "$dest_dir/$bin.wasm" -o "$dest_dir/$bin.opt.wasm" -O3 -Oz $wasmopt_features
23+
wasm-opt "$dest_dir/$bin.wasm" -o "$dest_dir/$bin.opt.wasm" -O3 $wasmopt_features
2424

2525
if [[ ! " ${exclude_wat[@]} " =~ " $bin " ]]; then
2626
wasm2wat "$dest_dir/$bin.wasm" -o "$dest_dir/$bin.wat"

0 commit comments

Comments
 (0)