comparison third_party/emsdk/test/test_bazel.sh @ 186:8cf4ec5e2191 hg-web

Fixed merge conflict.
author MrJuneJune <me@mrjunejune.com>
date Fri, 23 Jan 2026 22:38:59 -0800
parents 8d17f6e6e290
children
comparison
equal deleted inserted replaced
176:fed99fc04e12 186:8cf4ec5e2191
1 #!/usr/bin/env bash
2
3 echo "test bazel"
4
5 set -x
6 set -e
7
8 # Get the latest version number from emscripten-releases-tag.json.
9 VER=$(scripts/get_release_info.py emscripten-releases-tags.json latest)
10
11 # Based on the latest version number, get the commit hash for that version.
12 HASH=$(scripts/get_release_info.py emscripten-releases-tags.json hash ${VER})
13
14 FAILMSG="!!! scripts/update_bazel_workspace.py needs to be run !!!"
15
16 # Ensure the WORKSPACE file is up to date with the latest version.
17 grep ${VER} bazel/revisions.bzl || (echo ${FAILMSG} && false)
18 grep ${HASH} bazel/revisions.bzl || (echo ${FAILMSG} && false)
19 grep ${VER} bazel/MODULE.bazel || (echo ${FAILMSG} && false)
20
21 cd bazel
22 bazel build //hello-world:hello-world-wasm
23 bazel build //hello-world:hello-world-wasm-simd
24
25 cd test_external
26 bazel build //:hello-world-wasm
27 bazel build //long_command_line:long_command_line_wasm
28 bazel build //:hello-embind-wasm --compilation_mode dbg # debug
29
30 # Test use of the closure compiler
31 bazel build //:hello-embind-wasm --compilation_mode opt # release
32 # This function should not be minified if the externs file is loaded correctly.
33 grep "customJSFunctionToTestClosure" bazel-bin/hello-embind-wasm/hello-embind.js
34
35 cd ../test_secondary_lto_cache
36 bazel build //:hello-world-wasm