[Bzlmod] Add --nobuild to bzlmod build test for cheaper validation. (#41431)

https://github.com/grpc/grpc/pull/41309 caused timeout because a full
build is too expensive.

This PR changes the new bazel command to use the --nobuild option. This
triggers bazel's "static" dependency analysis without compiling C++
code. This test does NOT detect issues caused by module
incompatibilities (e.g. some package doesn't build with new version of
absl).

---------

Co-authored-by: Mark D. Roth <roth@google.com>
This commit is contained in:
yuanweiz
2026-01-21 14:54:19 -08:00
committed by GitHub
parent 0a3681052b
commit 0111e45a64

View File

@@ -43,9 +43,14 @@ tools/bazel \
//test/core/util:all \
//test/cpp/common:all
# Use --nobuild flag to trigger bazel dependency analysis but skip C++
# compilation.
# TODO(weizheyuan): Re-enable the full build (by removing --nobuild)
# once it no longer causes CI timeouts.
tools/bazel \
--bazelrc=tools/remote_build/linux_bzlmod.bazelrc \
build \
--nobuild \
--ignore_dev_dependency=false \
-- \
//test/... \