Allow building the wasm libs with native emscripten instead of docker

And build them on the mac CI as well as the linux CI
This commit is contained in:
Max Brunsfeld 2019-05-14 11:12:56 -07:00
parent a1ed12f4f4
commit ad43b211f4
7 changed files with 200 additions and 83 deletions

30
script/fetch-emscripten Executable file
View file

@ -0,0 +1,30 @@
#!/bin/bash
set -e
mkdir -p target
EMSDK_DIR="./target/emsdk"
(
if [ ! -f "$EMSDK_DIR/emsdk" ]; then
echo 'Downloading emscripten SDK...'
git clone https://github.com/emscripten-core/emsdk.git $EMSDK_DIR
fi
cd $EMSDK_DIR
echo 'Updating emscripten SDK...'
git pull
./emsdk list
echo 'Installing latest emscripten...'
./emsdk install latest
echo 'Activating latest emscripten...'
./emsdk activate latest
) >&2
(
source "$EMSDK_DIR/emsdk_env.sh" > /dev/null
declare -px
)