From dbd9b1e528c796928ecad5427c83deeaa9657ef7 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Thu, 31 Oct 2024 10:00:27 -0700 Subject: [PATCH] [Build] Upgraded gcc to 14 (#38041) Closes #38041 PiperOrigin-RevId: 691841849 --- .../{cxx_gcc_12_x64 => cxx_gcc_14_x64}/Dockerfile.template | 2 +- tools/bazelify_tests/dockerimage_current_versions.bzl | 2 +- tools/bazelify_tests/test/portability_tests.bzl | 2 +- tools/dockerfile/test/cxx_gcc_12_x64.current_version | 1 - tools/dockerfile/test/cxx_gcc_14_x64.current_version | 1 + .../test/{cxx_gcc_12_x64 => cxx_gcc_14_x64}/Dockerfile | 2 +- tools/run_tests/run_tests.py | 6 +++--- tools/run_tests/run_tests_matrix.py | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) rename templates/tools/dockerfile/test/{cxx_gcc_12_x64 => cxx_gcc_14_x64}/Dockerfile.template (98%) delete mode 100644 tools/dockerfile/test/cxx_gcc_12_x64.current_version create mode 100644 tools/dockerfile/test/cxx_gcc_14_x64.current_version rename tools/dockerfile/test/{cxx_gcc_12_x64 => cxx_gcc_14_x64}/Dockerfile (99%) diff --git a/templates/tools/dockerfile/test/cxx_gcc_12_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_gcc_14_x64/Dockerfile.template similarity index 98% rename from templates/tools/dockerfile/test/cxx_gcc_12_x64/Dockerfile.template rename to templates/tools/dockerfile/test/cxx_gcc_14_x64/Dockerfile.template index e2467ca71c7..982abb03189 100644 --- a/templates/tools/dockerfile/test/cxx_gcc_12_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/cxx_gcc_14_x64/Dockerfile.template @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. - FROM gcc:12 + FROM gcc:14 RUN apt-get update && apt-get install -y curl git time wget zip && apt-get clean <%include file="../../git_avoid_dubious_ownership_error.include"/> diff --git a/tools/bazelify_tests/dockerimage_current_versions.bzl b/tools/bazelify_tests/dockerimage_current_versions.bzl index 65e34725123..dccc971862c 100644 --- a/tools/bazelify_tests/dockerimage_current_versions.bzl +++ b/tools/bazelify_tests/dockerimage_current_versions.bzl @@ -100,7 +100,7 @@ DOCKERIMAGE_CURRENT_VERSIONS = { "tools/dockerfile/test/cxx_debian11_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_debian11_x64@sha256:9f9285da21c1053ac715027e0cee66c20c70ebf016053328a4cee61ffd37e59b", "tools/dockerfile/test/cxx_debian11_x86.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_debian11_x86@sha256:3f505ad99e52a4b3337fedb413e883bc8e5c1d9c089299c34002b89e01254d3b", "tools/dockerfile/test/cxx_debian12_openssl309_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_debian12_openssl309_x64@sha256:f75bb715c4f9464526f9affb410f7965a0b8894516d7d98cd89a4e165ae065b7", - "tools/dockerfile/test/cxx_gcc_12_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_gcc_12_x64@sha256:bbdfe66f27b964f9bfd526646b94a19d904fea52bdb244f32fd4355cc8c4551f", + "tools/dockerfile/test/cxx_gcc_14_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_gcc_14_x64@sha256:54685fc729952b689318057a9769edc92247a40d607d01c3517d2644d361cc73", "tools/dockerfile/test/cxx_gcc_7_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_gcc_7_x64@sha256:e1925d7f08a7f167c6aab2f8284a3f13b7f3830ba38876e6de1dee2ffd3c7d2f", "tools/dockerfile/test/cxx_gcc_8_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_gcc_8_x64@sha256:19511527fc3da78344a7ece5f1cf8ba06d928202ba5b3ca039dccb86d1a417fc", "tools/dockerfile/test/php8_debian12_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/php8_debian12_arm64@sha256:c220e72b415ad194a41cf5640fe360b9358df1dd34553c8d8e6bfd4a82e032b3", diff --git a/tools/bazelify_tests/test/portability_tests.bzl b/tools/bazelify_tests/test/portability_tests.bzl index 363a7e3e361..75cdf581880 100644 --- a/tools/bazelify_tests/test/portability_tests.bzl +++ b/tools/bazelify_tests/test/portability_tests.bzl @@ -56,7 +56,7 @@ def generate_run_tests_portability_tests(name): # Some gRPC tests have an issue with gcc-7 so gcc-7 portability test won't build any gRPC tests ["gcc_7", "--cmake_configure_extra_args=-DgRPC_BUILD_TESTS=OFF", "tools/dockerfile/test/cxx_gcc_7_x64.current_version"], ["gcc_8", "", "tools/dockerfile/test/cxx_gcc_8_x64.current_version"], - ["gcc_12_cxx20", "--cmake_configure_extra_args=-DCMAKE_CXX_STANDARD=20", "tools/dockerfile/test/cxx_gcc_12_x64.current_version"], + ["gcc_14_cxx20", "--cmake_configure_extra_args=-DCMAKE_CXX_STANDARD=20", "tools/dockerfile/test/cxx_gcc_14_x64.current_version"], ["gcc10.2_openssl102", "--cmake_configure_extra_args=-DgRPC_SSL_PROVIDER=package", "tools/dockerfile/test/cxx_debian11_openssl102_x64.current_version"], ["gcc10.2_openssl111", "--cmake_configure_extra_args=-DgRPC_SSL_PROVIDER=package", "tools/dockerfile/test/cxx_debian11_openssl111_x64.current_version"], ["gcc_12_openssl309", "--cmake_configure_extra_args=-DgRPC_SSL_PROVIDER=package", "tools/dockerfile/test/cxx_debian12_openssl309_x64.current_version"], diff --git a/tools/dockerfile/test/cxx_gcc_12_x64.current_version b/tools/dockerfile/test/cxx_gcc_12_x64.current_version deleted file mode 100644 index a246f289aca..00000000000 --- a/tools/dockerfile/test/cxx_gcc_12_x64.current_version +++ /dev/null @@ -1 +0,0 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_gcc_12_x64:c22d1cb6bac0f4a35e3085d2b55fa5556a7c00d3@sha256:bbdfe66f27b964f9bfd526646b94a19d904fea52bdb244f32fd4355cc8c4551f \ No newline at end of file diff --git a/tools/dockerfile/test/cxx_gcc_14_x64.current_version b/tools/dockerfile/test/cxx_gcc_14_x64.current_version new file mode 100644 index 00000000000..fb420dc740c --- /dev/null +++ b/tools/dockerfile/test/cxx_gcc_14_x64.current_version @@ -0,0 +1 @@ +us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_gcc_14_x64:a900526ee74fa55fae28a53ccc92afc31e08e68c@sha256:54685fc729952b689318057a9769edc92247a40d607d01c3517d2644d361cc73 \ No newline at end of file diff --git a/tools/dockerfile/test/cxx_gcc_12_x64/Dockerfile b/tools/dockerfile/test/cxx_gcc_14_x64/Dockerfile similarity index 99% rename from tools/dockerfile/test/cxx_gcc_12_x64/Dockerfile rename to tools/dockerfile/test/cxx_gcc_14_x64/Dockerfile index 44a4483bf85..42cdc4c7073 100644 --- a/tools/dockerfile/test/cxx_gcc_12_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_gcc_14_x64/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM gcc:12 +FROM gcc:14 RUN apt-get update && apt-get install -y curl git time wget zip && apt-get clean #================= diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 4a89e6728d0..b47a4a1df6e 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -585,8 +585,6 @@ class CLanguage(object): "-DgRPC_SSL_PROVIDER=package", ], ) - elif compiler == "gcc12": - return ("gcc_12", ["-DCMAKE_CXX_STANDARD=20"]) elif compiler == "gcc12_openssl309": return ( "debian12_openssl309", @@ -594,6 +592,8 @@ class CLanguage(object): "-DgRPC_SSL_PROVIDER=package", ], ) + elif compiler == "gcc14": + return ("gcc_14", ["-DCMAKE_CXX_STANDARD=20"]) elif compiler == "gcc_musl": return ("alpine", []) elif compiler == "clang7": @@ -1705,8 +1705,8 @@ argp.add_argument( "gcc10.2", "gcc10.2_openssl102", "gcc10.2_openssl111", - "gcc12", "gcc12_openssl309", + "gcc14", "gcc_musl", "clang7", "clang18", diff --git a/tools/run_tests/run_tests_matrix.py b/tools/run_tests/run_tests_matrix.py index 1eeb9a5906c..bd7d95e2599 100755 --- a/tools/run_tests/run_tests_matrix.py +++ b/tools/run_tests/run_tests_matrix.py @@ -358,8 +358,8 @@ def _create_portability_test_jobs( # TODO(b/283304471): Tests using OpenSSL's engine APIs were broken and removed "gcc10.2_openssl102", "gcc10.2_openssl111", - "gcc12", "gcc12_openssl309", + "gcc14", "gcc_musl", "clang7", "clang18",