Commit Graph

121 Commits

Author SHA1 Message Date
Derek Mauro
9ebd93a774 Remove the implementation of absl::string_view, which was only needed
prior to C++17. `absl::string_view` is now an alias for `std::string_view`.
It is recommended that clients simply use `std::string_view`.

PiperOrigin-RevId: 845822478
Change-Id: I220530c84118e5b9ef110baa002c232ac8f2c5f2
2025-12-17 10:23:48 -08:00
Derek Mauro
8036cae8ac CI: Use a cached copy of GoogleTest in CMake builds if possible
to minimize the possibility of errors downloading from GitHub

PiperOrigin-RevId: 835321189
Change-Id: I16101c5a5ead106c5a9beb254dde31a2b5e5df75
2025-11-21 12:35:32 -08:00
Derek Mauro
8cd0e4447b CI: Enable libc++ hardening in the ASAN build for even more checks
https://libcxx.llvm.org/Hardening.html

PiperOrigin-RevId: 834818278
Change-Id: I063068001c7726b2d74628a0c85445e567e546c1
2025-11-20 10:32:35 -08:00
Derek Mauro
4099f7429a macOS CI: Move the Bazel vendor_dir to ${HOME} to workaround a Bazel issue
where it does not work when it is in ${TMP} and also fix the quoting
which was causing it to incorrectly receive the argument

https://github.com/bazelbuild/bazel/issues/27156

PiperOrigin-RevId: 823141075
Change-Id: I465f6bda0d94f4e464fa7ce3c1ee019aec78db69
2025-10-23 12:18:14 -07:00
Derek Mauro
0f36025a0e Clean up the testing of alternate options that were removed
in previous changes

PiperOrigin-RevId: 783742698
Change-Id: I2f94df42a6395af496f2bc4f0732274bde37cb68
2025-07-16 07:02:52 -07:00
Derek Mauro
2dd8036891 Update CI to a more recent Clang on Linux x86-64
/opt/llvm/clang/bin/clang -v
clang version 21.0.0git (https://github.com/llvm/llvm-project 2dee1a2de3d2cc774fbd43507cf4320418fbf279)

This change adds `-Wno-unused-command-line-argument`
to the Clang builds since Bazel is now providing an unused
`-c` to rules that do header syntax checking only.
Rules that were missing copts which causes them to
encounter this error are also fixed.

PiperOrigin-RevId: 764757573
Change-Id: I1eba676327a6023c5b8afb54499e4a3a72c2cdad
2025-05-29 09:17:25 -07:00
Derek Mauro
4d8e467f28 Fix CI on macOS Sequoia
This includes fixes for both the CI scripts in the new
OS image and a fix for newly detected missing nullability
annotations in string_view with an upgraded Clang.
It is also no longer necessary to uninstall google-benchmark
since it is not installed by default in the new image.

PiperOrigin-RevId: 764725127
Change-Id: I6ea8c55b4d9a9afd261bf4ae9c5e8239675ea7ca
2025-05-29 07:47:29 -07:00
Derek Mauro
7e67f4ffaa Use Xcode 16.3 for testing
PiperOrigin-RevId: 764695105
Change-Id: Ic6968c954b07a6ff3e83acc480a2a498f1795cc8
2025-05-29 06:01:34 -07:00
Derek Mauro
cdd3d21fce Linux CI update
GCC latest is now GCC-15.1
Clang on ARM is now Clang-19
Bazel 8.2.1
CMake 4.0.1

Enable Bazel "Vendor Mode" as a caching mechanism to reduce
GitHub download failures.

PiperOrigin-RevId: 755864516
Change-Id: I9bf38e20fb8a09739406798119c50ce1aa934f43
2025-05-07 08:27:23 -07:00
Derek Mauro
774d41004a Use Bazel vendor mode to cache external dependencies
on Windows and macOS

Also upgrade to Bazel 8.2.1 since all platforms will need
to use the same version of Bazel to get the most cache hits.
Different Bazel versions have different dependencies.

PiperOrigin-RevId: 755477047
Change-Id: Ib8838c6ef1e3b55841005d877346ed8afceca15a
2025-05-06 12:33:48 -07:00
Derek Mauro
5f289345f2 Turn on C++23 testing for GCC and Clang on Linux
PiperOrigin-RevId: 737013640
Change-Id: If0dab617c76882f897e113939e5217d73ffc63f9
2025-03-14 16:00:36 -07:00
Derek Mauro
bdbaf376e2 UBSAN: Use -fno-sanitize-recover
-fno-sanitize-recover will cause tests that encounter undefined
behavior to abort and fail, instead of just logging an error message.

PiperOrigin-RevId: 733779444
Change-Id: I3f88aef8f91d64572e9d46ad8f6cc40562f25a30
2025-03-05 10:14:45 -08:00
Derek Mauro
52190ca7fa Bazel: Move environment variables to --action_env
According to https://bazel.build/remote/caching#known-issues and
https://github.com/bazelbuild/bazel/issues/4558 this is better
since these needs to be taken into account for the cache key.

PiperOrigin-RevId: 730947060
Change-Id: I0e27368e29fab5f6583e32a779fe84f0070b0d14
2025-02-25 10:49:18 -08:00
Derek Mauro
4cd200999f CI: Update Linux ARM latest container
PiperOrigin-RevId: 730505454
Change-Id: Id3f2690675d2bf4709e5ea3a4d2f0d8b074fb7b4
2025-02-24 10:30:05 -08:00
Derek Mauro
0f0a772703 Remove WORKSPACE.bazel
`MODULE.bazel` is now the recommended way to use Bazel.
Users that have wanted to use `WORKSPACE.bazel` still needed
to provide their own `WORKSPACE.bazel` file, so this file
provides no benefit to them. It was merely for us to test,
but there is little reason to do so.

Support for `WORKSPACE.bazel` is going away in Bazel 9.

PiperOrigin-RevId: 726117464
Change-Id: If6a2789eae2d236c0ec1b53162c7122c96967959
2025-02-12 10:55:21 -08:00
Derek Mauro
82e99b79d0 Add CI for the C++20/Clang/libstdc++ combination
PiperOrigin-RevId: 725253209
Change-Id: I52cab63f3c1011716f87dbd0200187414e086ae3
2025-02-10 09:57:44 -08:00
Derek Mauro
860dcf1c0c Move Abseil to GoogleTest 1.16.0
This allows us to get rid of the repo_mapping
since 1.16.0 is now using canonical names.

PiperOrigin-RevId: 724543391
Change-Id: I9e0b6e4ecadaa4de6c5140820b444d5af927ab6c
2025-02-07 18:47:11 -08:00
Derek Mauro
5648ffd8dd Update CI for linux_gcc-floor to use GCC9, Bazel 7.5, and CMake 3.31.5.
According to
https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md
the GCC7 is supported, but since it lacks complete C++17 support, we
can ignore it. GCC8 is only supported by openSUSE/Leap and contains a
pretty bad bug for us, so for it is best to test GCC9 instead.

PiperOrigin-RevId: 723914768
Change-Id: I8e8b2d3128651d174effd214b416b0295d65a301
2025-02-06 06:38:07 -08:00
Derek Mauro
7a03cdb4c0 Require C++17
Policy information:
https://opensource.google/documentation/policies/cplusplus-support#c_language_standard
https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md

PiperOrigin-RevId: 723589409
Change-Id: Ia8665c052ed40f2a78308f7eb0c330191b0cf981
2025-02-05 11:33:01 -08:00
Derek Mauro
90a7ba66e8 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
2024-12-23 10:58:05 -08:00
Abseil Team
9e3b68ac3b Use local_config_cc from rules_cc and make it a dev dependency
Prepare for changes in Bazel 8, where cc configure scripts have been moved to rules_cc.

PiperOrigin-RevId: 703026686
Change-Id: I44c573bf84a56aed37fca0717e7e1892d7f9a267
2024-12-05 01:46:29 -08:00
Derek Mauro
d0159eab59 Update GoogleTest dependency to 1.15.2
This updates to a version of GoogleTest that fixes
https://github.com/google/googletest/issues/4581
for downstream users of rules_python

PiperOrigin-RevId: 658398482
Change-Id: I4c6d431fd38d3a108e3c252eb26be9d81ff05a8e
2024-08-01 07:46:25 -07:00
Derek Mauro
7795d0843a Update versions of dependencies in preparation for release
PiperOrigin-RevId: 653567769
Change-Id: I0448322da95558ff6a04ab1aeab2b238674b69d1
2024-07-18 04:32:47 -07:00
Derek Mauro
72dde9873a Add a compile test for headers that require C compatibility
windows_clangcl_bazel.bat includes a change from --copt to --cxxopt to
only pass /std:c++XX to C++ compiles

PiperOrigin-RevId: 646157298
Change-Id: Ib6d9861a2b2d45eb0d664f23b6f3a7426f8e0ab3
2024-06-24 11:09:36 -07:00
Abseil Team
7ce797f217 Enable building monolithic shared library on macOS and Linux.
PiperOrigin-RevId: 638284938
Change-Id: I4189215d85862a8eeaff5c477ff2e47252fa52d3
2024-05-29 07:58:29 -07:00
Abseil Team
1c177722b9 Build abseil_test_dll with ABSL_BUILD_TESTING
... even if ABSL_BUILD_TEST_HELPERS is not specified.

When not using ABSL_BUILD_DLL, tests builds even if ABSL_BUILD_TEST_HELPERS is not specified. Make this work for ABSL_BUILD_DLL, by ensuring that (BUILD_TESTING AND ABSL_BUILD_TESTING) triggers abseil_test_dll build.

PiperOrigin-RevId: 637493023
Change-Id: Icd5868c547365f4788caac47e002fbfc32a03e94
2024-05-26 18:14:44 -07:00
Derek Mauro
f858e74008 Update Abseil CI Docker image to use Clang 19, GCC 14, and CMake 3.29.3
PiperOrigin-RevId: 637008207
Change-Id: I6df357c4b2257b0ee834b2a48a04331b5f677c92
2024-05-24 12:57:30 -07:00
Derek Mauro
04af270f6d Add empty WORKSPACE.bzlmod
When bzlmod is enabled and WORKSPACE.bzlmod exists, the content of
WORKSPACE is ignored. This prevents bzlmod builds from unintentionally
depending on the WORKSPACE file.

This exposed some small problems with our clang-cl configuration,
which are also fixed in this change.

PiperOrigin-RevId: 602511311
Change-Id: I0ba411edde2df0e17f4eeede4117ddb6934dd8f8
2024-01-29 15:05:26 -08:00
Derek Mauro
41a2a25555 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 Abseil 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: 597676666
Change-Id: I8d33facc432477c6dc7daa06fd00bb4ae8c4adba
2024-01-11 15:59:36 -08:00
Derek Mauro
1959993719 Update Windows and MacOS CI builds to Bazel 7.0.0
This changes the way in which clang-cl is selected on Windows
as it has changed:
https://bazel.build/configure/windows#clang

--features=external_include_paths has been removed from Windows builds
since it appears cause build command errors currently
PiperOrigin-RevId: 596965732
Change-Id: I95b636a9a4fdcc4172c3bb8c6cb28d5f7db592c9
2024-01-09 09:58:40 -08:00
Richard O'Grady
1ae1207418 Add script for Arm build.
PiperOrigin-RevId: 592390284
Change-Id: If5b612a3f8d3144df108deb4ee28c1e9279b858b
2023-12-19 17:42:07 -08:00
Derek Mauro
78c2f64873 Update the CI builds that use the latest compiler versions to
use Bazel 7.0.0.

CMake is also updated to 3.28.1

PiperOrigin-RevId: 592263272
Change-Id: I4daccdad4bceb483b0400328baebc79591990328
2023-12-19 09:46:27 -08:00
Marcin Kowalczyk
f845e60acd Make absl::{partial,weak,strong}_ordering aliases for the std:: ordering
types when they are available.

This makes them interchangeable in contexts known to be compiled as C++20.
This also makes `absl::` ordering types compatible with `<=>`, allowing to
unconditionally use `absl::` spelling for types but conditionally use `<=>`
when available.

PiperOrigin-RevId: 588085408
Change-Id: I1aa5247f0e31acbb838ee76829b7a13c74b0a94f
2023-12-05 08:48:09 -08:00
Derek Mauro
3bc08b8151 Rollback use of --remote_download_minimal on Bazel CI builds
PiperOrigin-RevId: 575273754
Change-Id: Iddd31524c86ff05c3c204a2e04250605a55448bc
2023-10-20 11:30:15 -07:00
Derek Mauro
18a26f7967 Update GoogleTest dependency
PiperOrigin-RevId: 572901486
Change-Id: Icb8b8c80cb8b99d9a3203f4971fc53fe64a1ae60
2023-10-12 07:35:46 -07:00
Derek Mauro
cb7d5cc8cb Bazel: Use --remote_download_minimal to improve remote cache usage in CI builds
See https://blog.bazel.build/2023/10/06/bwob-in-bazel-7.html

PiperOrigin-RevId: 572883468
Change-Id: Ib6f8665bf28f3973ffa3f932d400636b3b97f08a
2023-10-12 06:15:42 -07:00
Derek Mauro
9377c75bf4 CI: Update the Linux hybrid-latest docker container used for testing
The following are the major updates
  * LLVM 17 branch (https://github.com/llvm/llvm-project b744f4c99cf91155c74a3c92db6f1335232ff3d)
  * GCC 13.2
  * CMake 3.27.1
  * Bazel 6.2.1

PiperOrigin-RevId: 557594251
Change-Id: I86f72c8035ab4f3b9fe602bdaf3bfb8200ec3633
2023-08-16 13:58:57 -07:00
Derek Mauro
fdf5be1108 Update Abseil dependencies
PiperOrigin-RevId: 553199830
Change-Id: Ida9fc1c51a39b8c21ffd34f95de076b1b21369bd
2023-08-02 11:09:41 -07:00
Derek Mauro
dc37a887fd CI: Update the Docker container used to test Alpine Linux
PiperOrigin-RevId: 539960446
Change-Id: If2de8bf32ffeed849280f78f8ac0685e11e80f59
2023-06-13 07:42:19 -07:00
Derek Mauro
9d43470921 CI: Move the GCC-latest testing to GCC 13.1 on Linux
This includes an upgrade to CMake 3.26.3 and Bazel 6.2.0

This change includes support for both GCC 12 and 13 since we
were only testing GCC 11 before this change.

PiperOrigin-RevId: 534235753
Change-Id: I4183a02469b1c3425c52a31b71fcefe403315a42
2023-05-22 17:28:30 -07:00
Abseil Team
32d314d0f5 Set executable bit to the *.bat files
PiperOrigin-RevId: 523745259
Change-Id: Ia2be4ee672a4c1b72c6ecc035ed9c2e401b56d1e
2023-04-12 10:51:19 -07:00
Derek Mauro
88f0473a91 Remove ABSL_SKIP_TIME_TESTS_BROKEN_ON_MSVC_OPT. These tests
were broken on MSVC 2017, but MSVC 2017 is no longer supported

PiperOrigin-RevId: 521527454
Change-Id: I7203708bdc9aa03c9764c9c36db7ce5777e43c3c
2023-04-03 12:15:45 -07:00
Derek Mauro
486ec29b7c Release the batch files used to test Abseil with MSVC
PiperOrigin-RevId: 521450545
Change-Id: Ia4fe02a57d23411f0a80443c0ad89dfaf4117a37
2023-04-03 07:16:54 -07:00
Derek Mauro
6a37c26abf Add clang-cl build
PiperOrigin-RevId: 520955097
Change-Id: I50a19305aed2b60dea0293b1a2106673e4cb7756
2023-03-31 10:26:53 -07:00
Gennadiy Rozental
6c2630fe51 Finally delete ArgListAction after cleanup is completed.
PiperOrigin-RevId: 513379475
Change-Id: I0d7af3a0d2bf4da6eec66a5320ecc402d2e8fec8
2023-03-01 16:55:43 -08:00
Derek Mauro
a0f9b46521 Update latest Linux container to unbreak Kokoro
PiperOrigin-RevId: 510518832
Change-Id: I086c8f2e34312e2b0384b3c67b9c04814d41ddf0
2023-02-17 14:12:48 -08:00
Derek Mauro
0d116682dd Update the Abseil minumum GCC version to GCC 7, which is
the earliest supported GCC version according to
https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md

PiperOrigin-RevId: 503337021
Change-Id: Ibc7b2453b7aa30779b76e2a4ad918e39d0efcabe
2023-01-19 20:20:03 -08:00
Derek Mauro
10ff83d9b4 Update Abseil dependencies
PiperOrigin-RevId: 501294426
Change-Id: Ic580a2f31b4a98b1dd3eb21f3279fda4cd4a5977
2023-01-11 08:53:59 -08:00
Derek Mauro
66665d8d2e Fixes many compilation issues that come from having no external CI
coverage of the accelerated CRC implementation and some differences
bewteen the internal and external implementation.

This change adds CI coverage to the
linux_clang-latest_libstdcxx_bazel.sh script assuming this script
always runs on machines of at least the Intel Haswell generation.

Fixes include:
 * Remove the use of the deprecated xor operator on crc32c_t
 * Remove #pragma unroll_completely, which isn't known by GCC or Clang:
   https://godbolt.org/z/97j4vbacs
 * Fixes for -Wsign-compare, -Wsign-conversion and -Wshorten-64-to-32

PiperOrigin-RevId: 491965029
Change-Id: Ic5e1f3a20f69fcd35fe81ebef63443ad26bf7931
2022-11-30 10:59:21 -08:00
Derek Mauro
091842beea TSAN: Remove report_atomic_races=0 from CI now that it has been fixed
PiperOrigin-RevId: 491338755
Change-Id: I813566ef69ba6121bb4d4b64ea483cd7c4cd6019
2022-11-28 07:31:00 -08:00