2021-03-25 00:50:44 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
echo "test bazel"
|
|
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
# Get the latest version number from emscripten-releases-tag.txt.
|
|
|
|
|
VER=$(ggrep -oP '(?<=latest\": \")([\d\.]+)(?=\")' \
|
|
|
|
|
emscripten-releases-tags.txt \
|
|
|
|
|
| sed "s/\./\\\./g")
|
|
|
|
|
# Based on the latest version number, get the commit hash for that version.
|
2021-05-04 15:25:01 -07:00
|
|
|
HASH=$(grep "\"${VER}\"" emscripten-releases-tags.txt \
|
2021-03-25 00:50:44 +01:00
|
|
|
| grep -v latest \
|
|
|
|
|
| cut -f4 -d\")
|
|
|
|
|
|
|
|
|
|
FAILMSG="!!! scripts/update_bazel_toolchain.sh needs to be run !!!"
|
|
|
|
|
|
|
|
|
|
# Ensure the WORKSPACE file is up to date with the latest version.
|
|
|
|
|
grep ${VER} bazel/revisions.bzl || (echo ${FAILMSG} && false)
|
|
|
|
|
grep ${HASH} bazel/revisions.bzl || (echo ${FAILMSG} && false)
|
|
|
|
|
|
|
|
|
|
cd bazel
|
|
|
|
|
bazel build //hello-world:hello-world-wasm
|
|
|
|
|
bazel build //hello-world:hello-world-wasm-simd
|
|
|
|
|
|
|
|
|
|
cd test_external
|
|
|
|
|
bazel build //:hello-world-wasm
|