Skip to content

Commit

Permalink
Fix bazel ci (#1504)
Browse files Browse the repository at this point in the history
This is a temporary fix until I can do
https://bazel.build/external/migration
  • Loading branch information
walkingeyerobot authored Dec 14, 2024
1 parent 3d6d8ee commit ce1d281
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,13 @@ jobs:
- run:
name: install bazel
command: |
apt-get install -q -y bazel
apt-get install -q -y bazel-7.4.1
- run: test/test_bazel.sh

test-bazel-mac-arm64:
executor: mac_arm64
environment:
USE_BAZEL_VERSION: "7.4.1"
steps:
- checkout
- run:
Expand Down
17 changes: 9 additions & 8 deletions test/test_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,21 @@ FAILMSG="!!! scripts/update_bazel_workspace.py needs to be run !!!"
grep ${VER} bazel/revisions.bzl || (echo ${FAILMSG} && false)
grep ${HASH} bazel/revisions.bzl || (echo ${FAILMSG} && false)

BAZEL_CMD=$(which bazel || which bazel-7.4.1)

cd bazel
bazel build //hello-world:hello-world-wasm
bazel build //hello-world:hello-world-wasm-simd
$BAZEL_CMD build //hello-world:hello-world-wasm
$BAZEL_CMD build //hello-world:hello-world-wasm-simd

cd test_external
bazel build //:hello-world-wasm
bazel build //long_command_line:long_command_line_wasm
bazel build //:hello-embind-wasm --compilation_mode dbg # debug
$BAZEL_CMD build //:hello-world-wasm
$BAZEL_CMD build //long_command_line:long_command_line_wasm
$BAZEL_CMD build //:hello-embind-wasm --compilation_mode dbg # debug

# Test use of the closure compiler
bazel build //:hello-embind-wasm --compilation_mode opt # release
$BAZEL_CMD build //:hello-embind-wasm --compilation_mode opt # release
# This function should not be minified if the externs file is loaded correctly.
grep "customJSFunctionToTestClosure" bazel-bin/hello-embind-wasm/hello-embind.js

cd ../test_secondary_lto_cache
bazel build //:hello-world-wasm

$BAZEL_CMD build //:hello-world-wasm

0 comments on commit ce1d281

Please sign in to comment.