Skip to content

Commit 90a7ba6

Browse files
derekmaurocopybara-github
authored andcommitted
Updates to CI to support newer versions of tools
Linux "latest" containers updated to GCC 14.2 CMake 3.31.2 Bazel 8.0.0 Included are various fixes to get these versions to work. Bazel now references repositories by their canonical names from the Bazel Central Registry. For example, Abseil is now @abseil-cpp instead of @com_google_absl, and GoogleTest is now @googletest instead of @com_google_googletest. Users still using the old WORKSPACE system may need to use `repo_mapping` on repositories using the old names. See `WORKSPACE.bazel` in this commit for an example. PiperOrigin-RevId: 709102146 Change-Id: I02327ed4f8fb947766480bdeef2b1930a7f831eb
1 parent 5913446 commit 90a7ba6

31 files changed

+554
-552
lines changed

MODULE.bazel

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,27 @@ module(
2020
compatibility_level = 1,
2121
)
2222

23-
cc_configure = use_extension("@rules_cc//cc:extensions.bzl", "cc_configure_extension", dev_dependency = True)
23+
cc_configure = use_extension("@rules_cc//cc:extensions.bzl",
24+
"cc_configure_extension",
25+
dev_dependency = True)
2426
use_repo(cc_configure, "local_config_cc")
2527

2628
# Only direct dependencies need to be listed below.
2729
# Please keep the versions in sync with the versions in the WORKSPACE file.
2830

29-
bazel_dep(name = "rules_cc", version = "0.0.16")
30-
bazel_dep(name = "bazel_skylib", version = "1.5.0")
31+
bazel_dep(name = "rules_cc", version = "0.1.0")
32+
bazel_dep(name = "bazel_skylib", version = "1.7.1")
3133
bazel_dep(name = "platforms", version = "0.0.10")
3234

3335
bazel_dep(
3436
name = "google_benchmark",
35-
version = "1.8.3",
37+
version = "1.8.5",
3638
dev_dependency = True,
37-
repo_name = "com_github_google_benchmark",
3839
)
3940

41+
# Note: Googletest is NOT a dev_dependency. Some Abseil test utilities
42+
# intended to be used by Abseil users depend on GoogleTest.
4043
bazel_dep(
4144
name = "googletest",
4245
version = "1.15.2",
43-
repo_name = "com_google_googletest",
4446
)

WORKSPACE

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,42 +14,47 @@
1414
# limitations under the License.
1515
#
1616

17-
workspace(name = "com_google_absl")
17+
workspace(name = "abseil-cpp")
1818

1919
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2020

2121
# GoogleTest/GoogleMock framework. Used by most unit-tests.
2222
http_archive(
23-
name = "com_google_googletest",
23+
name = "googletest",
2424
sha256 = "7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926",
2525
strip_prefix = "googletest-1.15.2",
2626
# Keep this URL in sync with the version in ci/cmake_common.sh and
2727
# ci/windows_msvc_cmake.bat.
2828
urls = ["https://github.com/google/googletest/releases/download/v1.15.2/googletest-1.15.2.tar.gz"],
29+
# Now that Abseil is using the canonical names from the Bazel Central Registry, map
30+
# GoogleTest's old names to the new canonical names.
31+
repo_mapping = {
32+
"@com_google_absl": "@",
33+
"@com_googlesource_code_re2": "@re2",
34+
},
2935
)
3036

3137
# RE2 (the regular expression library used by GoogleTest)
3238
http_archive(
33-
name = "com_googlesource_code_re2",
39+
name = "re2",
3440
sha256 = "eb2df807c781601c14a260a507a5bb4509be1ee626024cb45acbd57cb9d4032b",
3541
strip_prefix = "re2-2024-07-02",
3642
urls = ["https://github.com/google/re2/releases/download/2024-07-02/re2-2024-07-02.tar.gz"],
37-
repo_mapping = {"@abseil-cpp": "@com_google_absl"},
3843
)
3944

4045
# Google benchmark.
4146
http_archive(
42-
name = "com_github_google_benchmark",
43-
sha256 = "6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce",
44-
strip_prefix = "benchmark-1.8.3",
45-
urls = ["https://github.com/google/benchmark/archive/refs/tags/v1.8.3.tar.gz"],
47+
name = "google_benchmark",
48+
sha256 = "d26789a2b46d8808a48a4556ee58ccc7c497fcd4c0af9b90197674a81e04798a",
49+
strip_prefix = "benchmark-1.8.5",
50+
urls = ["https://github.com/google/benchmark/archive/refs/tags/v1.8.5.tar.gz"],
4651
)
4752

4853
# Bazel Skylib.
4954
http_archive(
5055
name = "bazel_skylib",
51-
sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94",
52-
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz"],
56+
sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",
57+
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz"],
5358
)
5459

5560
# Bazel platform rules.

absl/algorithm/BUILD.bazel

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ cc_test(
5151
deps = [
5252
":algorithm",
5353
"//absl/base:config",
54-
"@com_google_googletest//:gtest",
55-
"@com_google_googletest//:gtest_main",
54+
"@googletest//:gtest",
55+
"@googletest//:gtest_main",
5656
],
5757
)
5858

@@ -84,7 +84,7 @@ cc_test(
8484
"//absl/base:core_headers",
8585
"//absl/memory",
8686
"//absl/types:span",
87-
"@com_google_googletest//:gtest",
88-
"@com_google_googletest//:gtest_main",
87+
"@googletest//:gtest",
88+
"@googletest//:gtest_main",
8989
],
9090
)

0 commit comments

Comments
 (0)