Fix bazel ci (#1504)
This is a temporary fix until I can do
https://bazel.build/external/migration
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 8d0a5d6..f4c7990 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -240,11 +240,13 @@
- 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:
diff --git a/test/test_bazel.sh b/test/test_bazel.sh
index b99a029..cf741b8 100755
--- a/test/test_bazel.sh
+++ b/test/test_bazel.sh
@@ -17,20 +17,21 @@
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