From ba3e7d7a8aea8a9eafebe3407d94b877cf16e362 Mon Sep 17 00:00:00 2001 From: Mike Kruskal Date: Tue, 2 Jul 2024 12:16:06 -0700 Subject: [PATCH 1/2] Revert workaround for std::mutex issues on github windows runners. PiperOrigin-RevId: 648802955 --- protos/protos_extension_lock_test.cc | 4 ---- src/google/protobuf/compiler/main.cc | 3 --- src/google/protobuf/compiler/main_no_generators.cc | 3 --- 3 files changed, 10 deletions(-) diff --git a/protos/protos_extension_lock_test.cc b/protos/protos_extension_lock_test.cc index cc02bc57d552..9c2444b606fe 100644 --- a/protos/protos_extension_lock_test.cc +++ b/protos/protos_extension_lock_test.cc @@ -102,8 +102,6 @@ void TestConcurrentExtensionAccess(::protos::ExtensionRegistry registry) { test_theme(); test_theme_extension(); } -#ifndef _MSC_VER -// TODO Re-enable this once github runner issue is resolved. TEST(CppGeneratedCode, ConcurrentAccessDoesNotRaceBothLazy) { ::upb::Arena arena; @@ -122,7 +120,5 @@ TEST(CppGeneratedCode, ConcurrentAccessDoesNotRaceBothEager) { {{&theme, &ThemeExtension::theme_extension}, arena}); } -#endif // _MSC_VER - } // namespace } // namespace protos_generator::test::protos diff --git a/src/google/protobuf/compiler/main.cc b/src/google/protobuf/compiler/main.cc index 7b2f5dca4b91..a5c7537f4ddc 100644 --- a/src/google/protobuf/compiler/main.cc +++ b/src/google/protobuf/compiler/main.cc @@ -35,10 +35,7 @@ namespace protobuf { namespace compiler { int ProtobufMain(int argc, char* argv[]) { -#ifndef _MSC_VER - // TODO Re-enable this once github runner issue is resolved. absl::InitializeLog(); -#endif // !_MSC_VER CommandLineInterface cli; cli.AllowPlugins("protoc-"); diff --git a/src/google/protobuf/compiler/main_no_generators.cc b/src/google/protobuf/compiler/main_no_generators.cc index 82ba9238eee2..83a44e8b4c5e 100644 --- a/src/google/protobuf/compiler/main_no_generators.cc +++ b/src/google/protobuf/compiler/main_no_generators.cc @@ -19,10 +19,7 @@ namespace compiler { // This is a version of protoc that has no built-in code generators. // See go/protobuf-toolchain-protoc int ProtocMain(int argc, char* argv[]) { -#ifndef _MSC_VER - // TODO Re-enable this once github runner issue is resolved. absl::InitializeLog(); -#endif // !_MSC_VER CommandLineInterface cli; cli.AllowPlugins("protoc-"); From 8a579c1af579c55bdf4fe6da81084ece3597f712 Mon Sep 17 00:00:00 2001 From: Mike Kruskal Date: Fri, 12 Jul 2024 12:31:00 -0700 Subject: [PATCH 2/2] Downgrade CMake to 3.29 to workaround Abseil issue. This was fixed in https://github.com/abseil/abseil-cpp/commit/cd7f66cab520e99531979b3fd727a25616a1ccbb, but older versions of Abseil break in CMake 3.30, which github runners now use by default. PiperOrigin-RevId: 651854867 --- .github/workflows/test_cpp.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test_cpp.yml b/.github/workflows/test_cpp.yml index 3de911ac53e3..e135373f36c7 100644 --- a/.github/workflows/test_cpp.yml +++ b/.github/workflows/test_cpp.yml @@ -426,6 +426,12 @@ jobs: arch: ${{ matrix.windows-arch || 'x64' }} vsversion: ${{ matrix.vsversion }} + # Workaround for Abseil incompatibility with CMake 3.30 (b/352354235). + - name: Downgrade CMake + if: ${{ runner.os == 'Windows' }} + run: choco install cmake --version 3.29.6 --force + shell: bash + # Workaround for incompatibility between gcloud and windows-2019 runners. - name: Install Python if: ${{ matrix.python-version }}