Files
ci-emsdk/scripts/test_bazel.sh
Sam Clegg cfdcf1315b Release 2.0.13 and update bazel toolchain (#694)
This change comes with fairly major change to the bazel toolchain.

- Use pre-built cache that comes with emsdk
- Mark cache as readonly using FROZEN_CACHE
- Pass `--sysroot` to match upstream emscripten change
2021-01-29 18:25:41 -08:00

25 lines
734 B
Bash
Executable File

#!/usr/bin/env bash
echo "test bazel"
set -x
set -e
# Get the latest version number from emscripten-releases-tag.txt.
VER=$(grep -oP '(?<=latest\": \")([\d\.]+)(?=\")' \
emscripten-releases-tags.txt \
| sed --expression "s/\./\\\./g")
# Based on the latest version number, get the commit hash for that version.
HASH=$(grep "${VER}" emscripten-releases-tags.txt \
| 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/WORKSPACE || (echo ${FAILMSG} && false)
grep ${HASH} bazel/WORKSPACE || (echo ${FAILMSG} && false)
cd bazel
bazel build //hello-world:hello-world-wasm