diff options
author | Derek Mauro <dmauro@google.com> | 2024-01-25 18:27:14 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-01-25 18:27:52 (GMT) |
commit | 6a5938233b6519ba99ddb7c7314d45d3fa877969 (patch) | |
tree | 73f4f4f05d3ea91a9bbd7678a5bc6bd0dca532d5 /ci | |
parent | 563ebf1769af08d448765c31064260e1a16fcced (diff) | |
download | googletest-6a5938233b6519ba99ddb7c7314d45d3fa877969.zip googletest-6a5938233b6519ba99ddb7c7314d45d3fa877969.tar.gz googletest-6a5938233b6519ba99ddb7c7314d45d3fa877969.tar.bz2 |
Add support for Bzlmod for the next release
https://bazel.build/external/overview#bzlmod
Bzlmod will be the default in a future Bazel release.
By default it requires projects to be registered with the
Bazel Central Registry (https://registry.bazel.build/) and
thus uses regular releases by default.
Users that want to "live-at-head" can still do this through
with overrides (https://bazel.build/external/module#overrides).
This change updates GoogleTest dependencies to use released versions.
CI uses Bzlmod except in the case of linux_gcc-floor, which will
keep testing the old WORKSPACE-based dependency system.
PiperOrigin-RevId: 601489729
Change-Id: I6be52034eba0d0e5fe12110e5e82879305cf73ff
Diffstat (limited to 'ci')
-rw-r--r-- | ci/linux-presubmit.sh | 7 | ||||
-rw-r--r-- | ci/macos-presubmit.sh | 1 | ||||
-rw-r--r-- | ci/windows-presubmit.bat | 1 |
3 files changed, 7 insertions, 2 deletions
diff --git a/ci/linux-presubmit.sh b/ci/linux-presubmit.sh index 1e05998..35e1670 100644 --- a/ci/linux-presubmit.sh +++ b/ci/linux-presubmit.sh @@ -67,6 +67,9 @@ for cc in /usr/local/bin/gcc /opt/llvm/clang/bin/clang; do done # Do one test with an older version of GCC +# TODO(googletest-team): This currently uses Bazel 5. When upgrading to a +# version of Bazel that supports Bzlmod, add --enable_bzlmod=false to keep test +# coverage for the old WORKSPACE dependency management. time docker run \ --volume="${GTEST_ROOT}:/src:ro" \ --workdir="/src" \ @@ -101,7 +104,7 @@ for std in ${STD}; do --copt="-Wuninitialized" \ --copt="-Wundef" \ --define="absl=${absl}" \ - --enable_bzlmod=false \ + --enable_bzlmod=true \ --features=external_include_paths \ --keep_going \ --show_timestamps \ @@ -126,7 +129,7 @@ for std in ${STD}; do --copt="-Wuninitialized" \ --copt="-Wundef" \ --define="absl=${absl}" \ - --enable_bzlmod=false \ + --enable_bzlmod=true \ --features=external_include_paths \ --keep_going \ --linkopt="--gcc-toolchain=/usr/local" \ diff --git a/ci/macos-presubmit.sh b/ci/macos-presubmit.sh index 1033282..70eaa74 100644 --- a/ci/macos-presubmit.sh +++ b/ci/macos-presubmit.sh @@ -69,6 +69,7 @@ for absl in 0 1; do --copt="-Wundef" \ --cxxopt="-std=c++14" \ --define="absl=${absl}" \ + --enable_bzlmod=true \ --features=external_include_paths \ --keep_going \ --show_timestamps \ diff --git a/ci/windows-presubmit.bat b/ci/windows-presubmit.bat index 38565fb..9753f9c 100644 --- a/ci/windows-presubmit.bat +++ b/ci/windows-presubmit.bat @@ -51,6 +51,7 @@ SET BAZEL_VS=C:\Program Files\Microsoft Visual Studio\2022\Community --compilation_mode=dbg ^ --copt=/std:c++14 ^ --copt=/WX ^ + --enable_bzlmod=true ^ --keep_going ^ --test_output=errors ^ --test_tag_filters=-no_test_msvc2017 |