Commit Graph

17 Commits (main)

Author SHA1 Message Date
Mike Kruskal 0cda26d48d Move the windows path length workarounds out of protobuf-ci
PiperOrigin-RevId: 626148009
2024-04-18 14:19:16 -07:00
Mike Kruskal 97022a9c83 Move xcode setup out of protobuf-ci
PiperOrigin-RevId: 626140997
2024-04-18 13:56:36 -07:00
Mike Kruskal 89118ba9d4 Fix bazel cache issues in 7.0.0
We're seeing a high flake rate due to remote cache-misses only on Bazel 7 builds.  The key change here seems to be adding the remote_download_output flag, but this also upgrades us to 7.1.1 and adds some retry behavior to caching issues.

PiperOrigin-RevId: 625892332
2024-04-17 20:19:24 -07:00
Mike Kruskal 396e26b475 Enable C++ tests for Bazel 7 on mac
PiperOrigin-RevId: 610573579
2024-02-26 17:13:47 -08:00
Adam Cozzette a7b0421c78 Breaking change: make protobuf comply with the C++ layering check
This check enforces that each C++ build target has the correct dependencies for
all headers that it includes. We have many targets that were not correct with
respect to this check, so I fixed them up.

I also cleaned up the C++ targets related to the well-known types. I created a
cc_proto_library() target for each one and removed the :wkt_cc_protos target,
since this was necessary to satisfy the layering check. I deleted the
//src/google/protobuf:protobuf_nowkt target and deprecated :protobuf_nowkt,
because the distinction between the :protobuf and :protobuf_nowkt targets was
not really correct. Neither one exposed the headers for the well-known types in
a way that was valid with respect to the layering check, and the idea of
bundling all the well-known types together is not idiomatic in Bazel anyway.
This is a breaking change, because the //:protobuf target no longer bundles the
well-known types. From now on they should be accessed through the new
//:*_cc_proto aliases in our top-level package.

I renamed the :port_def target to :port, which simplifies things a bit by
matching our internal name.

The original motivation for this change was that to move utf8_range onto our CI
infrastructure, we needed to make its dependency rules_fuzzing compatible with
Bazel 6. The rules_fuzzing project builds with the layering check, and I found
that the process of upgrading it to Bazel 6 made it take a dependency on
protobuf, which caused it to break due to layering violations. I was able to
work around this, but it would still be nice to comply with the layering check
so that we don't have to worry about this kind of thing in the future.

PiperOrigin-RevId: 595516736
2024-01-03 15:20:05 -08:00
Mike Kruskal eea39d6f53 Add Bazel 7 test points.
This adds tests for C++ under linux, and windows, and upb on linux.

PiperOrigin-RevId: 591056302
2023-12-14 14:44:39 -08:00
Mike Kruskal ab2451f6c2 Don't rely on .bazelrc for signaling sanitizer builds
PiperOrigin-RevId: 582436549
2023-11-14 14:15:01 -08:00
Adam Cozzette 2bcfbd8aa0 Add Bazel `--incompatible` flags to our bazelrc for CI
I was thinking it would be a good idea to proactively opt into all upcoming
breaking change flag flips in Bazel, so this change does that by adding all the
relevant flags to the common bazelrc file we use in our CI jobs. There are
several that we cannot enable yet without breaking something, so I left those
commented out for now.

PiperOrigin-RevId: 580538273
2023-11-08 08:14:50 -08:00
Mike Kruskal a6f557fe81 Force push auto-commits to bypass branch protection status checks
PiperOrigin-RevId: 539109983
2023-06-09 10:01:40 -07:00
Mike Kruskal 3b2eadf3cd Pull after committing regenerated files
PiperOrigin-RevId: 516537048
2023-03-14 08:53:06 -07:00
deannagarcia 15bd2c21cf Merge 22.x back to main (#12169)
Closes #12169

PiperOrigin-RevId: 515161008
2023-03-08 15:38:14 -08:00
Mike Kruskal 723bd4c3c1 Modify release artifacts for protoc to statically link system libraries.
Closes #12063

PiperOrigin-RevId: 513034570
2023-02-28 14:13:48 -08:00
Mike Kruskal 15d2505070 Fix staleness flakes from race condition.
If a change is committed while we're regenerating stale files, we should just bail and let the next job handle the refresh.

PiperOrigin-RevId: 510453613
2023-02-17 09:42:33 -08:00
Mike Kruskal 6aefc477d7 Add documentation for our new GHA infrastructure
PiperOrigin-RevId: 508680514
2023-02-10 09:31:29 -08:00
Xavier Bonaventura c8ebeb1733 Set incompatible_disallow_empty_glob in CI tests
In order to flip the flag, all downstream projects should be adapted. However, it is hard to fix them all if there are constant regressions. Adding it to the CI will ensure that once the project can build with incompatible_disallow_empty_glob it can keep building like that.
See: bazelbuild/bazel#15327
PiperOrigin-RevId: 507927389
2023-02-07 17:15:29 -08:00
Mike Kruskal 52bd3809e1 Enable ccache for XCode builds.
This uses ccache + github caching to substantially decrease the time it takes to run XCode builds.  Due to Bazel caching, these are some of our slowest tests, causing one of the biggest presubmit bottlenecks

PiperOrigin-RevId: 507794241
2023-02-07 08:52:54 -08:00
Mike Kruskal 6816da50cf Migrate non-Linux C++ tests to GHA actions
PiperOrigin-RevId: 506683178
2023-02-02 11:49:47 -08:00