Fix bazel ci (#1504)

This is a temporary fix until I can do
https://bazel.build/external/migration
This commit is contained in:
walkingeyerobot
2024-12-13 21:39:55 -05:00
committed by GitHub
parent 3d6d8ee910
commit ce1d281ce6
2 changed files with 12 additions and 9 deletions

View File

@@ -240,11 +240,13 @@ jobs:
- run: - run:
name: install bazel name: install bazel
command: | command: |
apt-get install -q -y bazel apt-get install -q -y bazel-7.4.1
- run: test/test_bazel.sh - run: test/test_bazel.sh
test-bazel-mac-arm64: test-bazel-mac-arm64:
executor: mac_arm64 executor: mac_arm64
environment:
USE_BAZEL_VERSION: "7.4.1"
steps: steps:
- checkout - checkout
- run: - run:

View File

@@ -17,20 +17,21 @@ FAILMSG="!!! scripts/update_bazel_workspace.py needs to be run !!!"
grep ${VER} bazel/revisions.bzl || (echo ${FAILMSG} && false) grep ${VER} bazel/revisions.bzl || (echo ${FAILMSG} && false)
grep ${HASH} 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 cd bazel
bazel build //hello-world:hello-world-wasm $BAZEL_CMD build //hello-world:hello-world-wasm
bazel build //hello-world:hello-world-wasm-simd $BAZEL_CMD build //hello-world:hello-world-wasm-simd
cd test_external cd test_external
bazel build //:hello-world-wasm $BAZEL_CMD build //:hello-world-wasm
bazel build //long_command_line:long_command_line_wasm $BAZEL_CMD build //long_command_line:long_command_line_wasm
bazel build //:hello-embind-wasm --compilation_mode dbg # debug $BAZEL_CMD build //:hello-embind-wasm --compilation_mode dbg # debug
# Test use of the closure compiler # 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. # This function should not be minified if the externs file is loaded correctly.
grep "customJSFunctionToTestClosure" bazel-bin/hello-embind-wasm/hello-embind.js grep "customJSFunctionToTestClosure" bazel-bin/hello-embind-wasm/hello-embind.js
cd ../test_secondary_lto_cache cd ../test_secondary_lto_cache
bazel build //:hello-world-wasm $BAZEL_CMD build //:hello-world-wasm