mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-10 10:02:38 +03:00
Install wasm-opt on Netlify, since wasm-pack fails to do so
This commit is contained in:
parent
6a91e66192
commit
1b6c2fccef
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
|||||||
target
|
target
|
||||||
generated-docs
|
generated-docs
|
||||||
|
netlify-install
|
||||||
zig-cache
|
zig-cache
|
||||||
.direnv
|
.direnv
|
||||||
.envrc
|
.envrc
|
||||||
|
@ -39,4 +39,7 @@ echo "Building Web REPL..."
|
|||||||
repl_www/build.sh
|
repl_www/build.sh
|
||||||
cp -r repl_www/public/* www/build
|
cp -r repl_www/public/* www/build
|
||||||
|
|
||||||
|
echo "Asset sizes:"
|
||||||
|
ls -lh www/build/*
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
@ -8,9 +8,19 @@ rustup update
|
|||||||
rustup default stable
|
rustup default stable
|
||||||
rustup target add wasm32-unknown-unknown wasm32-wasi
|
rustup target add wasm32-unknown-unknown wasm32-wasi
|
||||||
|
|
||||||
|
cd netlify-install
|
||||||
|
|
||||||
ZIG_DIRNAME="zig-linux-x86_64-0.9.1"
|
ZIG_DIRNAME="zig-linux-x86_64-0.9.1"
|
||||||
wget https://ziglang.org/download/0.9.1/${ZIG_DIRNAME}.tar.xz
|
wget https://ziglang.org/download/0.9.1/${ZIG_DIRNAME}.tar.xz
|
||||||
tar --extract --xz --file=${ZIG_DIRNAME}.tar.xz
|
tar --extract --xz --file=${ZIG_DIRNAME}.tar.xz
|
||||||
export PATH="$(pwd)/${ZIG_DIRNAME}:${PATH}"
|
|
||||||
|
|
||||||
|
# Work around an issue with wasm-pack where it fails to install wasm-opt (from binaryen) on some CI systems
|
||||||
|
# https://github.com/rustwasm/wasm-pack/issues/864
|
||||||
|
BINARYEN_DIRNAME="binaryen-version_108-x86_64-linux"
|
||||||
|
wget https://github.com/WebAssembly/binaryen/releases/download/version_108/${BINARYEN_DIRNAME}.tar.gz
|
||||||
|
tar --extract --gzip --file=${BINARYEN_DIRNAME}.tar.gz
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
export PATH="$(pwd)/netlify-install/${BINARYEN_DIRNAME}/bin:$(pwd)/netlify-install/${ZIG_DIRNAME}:${PATH}"
|
||||||
bash build.sh
|
bash build.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user