Use emsdk as external bazel dependency (#766)

* Makes provided bazel rules look up @emsdk workspace instead of local workspace
* Uses system-specific emscripten binaries instead of defaulting to linux
* Provides macros for loading emsdk dependencies (nodejs and emscripten binaries)
* Unhardcodes paths in bazel rules and .sh wrappers
* `update_bazel_workspace.sh` now updates `revisions.bzl`
* `emscripten_deps()` can be fed with specific emscripten version
* Adds external usage test

Addresses #650 and #696
This commit is contained in:
Tim Talashok
2021-03-25 00:50:44 +01:00
committed by GitHub
parent fdda8524ce
commit c1589b5564
21 changed files with 333 additions and 100 deletions

View File

@@ -166,7 +166,7 @@ jobs:
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
make -C ./docker version=${CIRCLE_TAG} alias=latest push
test-bazel:
test-bazel-linux:
executor: bionic
steps:
- checkout
@@ -186,6 +186,21 @@ jobs:
apt-get install -q -y bazel
- run: test/test_bazel.sh
test-bazel-mac:
macos:
xcode: "12.2.0"
environment:
EMSDK_NOTTY: "1"
HOMEBREW_NO_AUTO_UPDATE: "1"
steps:
- checkout
- run: brew install grep
- run:
name: install bazel
command: |
brew install bazel
- run: test/test_bazel_mac.sh
workflows:
flake8:
jobs:
@@ -208,6 +223,9 @@ workflows:
ignore: /.*/
tags:
only: /.*/
test-bazel:
test-bazel-linux:
jobs:
- test-bazel
- test-bazel-linux
test-bazel-mac:
jobs:
- test-bazel-mac