From a374ef377da972caf60e057a02a40684eed6b6cb Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Wed, 28 Aug 2024 15:36:44 -0700 Subject: [PATCH] [CI] Updated clang 17 to 18 for c++ tests (#37592) Closes #37592 PiperOrigin-RevId: 668633593 --- .../Dockerfile.template | 2 +- tools/bazelify_tests/dockerimage_current_versions.bzl | 2 +- tools/bazelify_tests/test/portability_tests.bzl | 2 +- tools/dockerfile/test/cxx_clang_17_x64.current_version | 1 - tools/dockerfile/test/cxx_clang_18_x64.current_version | 1 + .../test/{cxx_clang_17_x64 => cxx_clang_18_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_clang_17_x64 => cxx_clang_18_x64}/Dockerfile.template (97%) delete mode 100644 tools/dockerfile/test/cxx_clang_17_x64.current_version create mode 100644 tools/dockerfile/test/cxx_clang_18_x64.current_version rename tools/dockerfile/test/{cxx_clang_17_x64 => cxx_clang_18_x64}/Dockerfile (99%) diff --git a/templates/tools/dockerfile/test/cxx_clang_17_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_clang_18_x64/Dockerfile.template similarity index 97% rename from templates/tools/dockerfile/test/cxx_clang_17_x64/Dockerfile.template rename to templates/tools/dockerfile/test/cxx_clang_18_x64/Dockerfile.template index ea63c1298e8..90ee8fb22f2 100644 --- a/templates/tools/dockerfile/test/cxx_clang_17_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/cxx_clang_18_x64/Dockerfile.template @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. - FROM silkeh/clang:17-bookworm + FROM silkeh/clang:18-bookworm RUN apt update && apt -y upgrade && apt install -y build-essential curl git time wget zip && apt 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 4eb0ac88863..8954ea56699 100644 --- a/tools/bazelify_tests/dockerimage_current_versions.bzl +++ b/tools/bazelify_tests/dockerimage_current_versions.bzl @@ -94,7 +94,7 @@ DOCKERIMAGE_CURRENT_VERSIONS = { "tools/dockerfile/test/csharp_debian11_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/csharp_debian11_arm64@sha256:4d4bc5f15e03f3d3d8fd889670ecde2c66a2e4d2dd9db80733c05c1d90c8a248", "tools/dockerfile/test/csharp_debian11_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/csharp_debian11_x64@sha256:0763d919b17b4cfe5b65aff3bf911c04e9e4d46d11649858742033facd9f534f", "tools/dockerfile/test/cxx_alpine_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_alpine_x64@sha256:10587bea5d163bf5c34c6157ebd1863d22863d9d38bbaf5135ffc6fbf2b73004", - "tools/dockerfile/test/cxx_clang_17_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_clang_17_x64@sha256:f4e88cdfe074ee33abbe01f97f945ded0f144693f1eeac4d541a256a7812a21a", + "tools/dockerfile/test/cxx_clang_18_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_clang_18_x64@sha256:46beb9901d0c480a40724a3934677ef5e8d6b2f177517c98e67ccff5d881503f", "tools/dockerfile/test/cxx_clang_6_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_clang_6_x64@sha256:eebbaf353522d523ec9a7acb34bb3ae194e22ea7493c85c01437719e30da205d", "tools/dockerfile/test/cxx_debian11_openssl102_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_debian11_openssl102_x64@sha256:477ae0da7ff7faa9cf195c0d32472fec4cf8b7325505c63e00b5c794c9a4b1a7", "tools/dockerfile/test/cxx_debian11_openssl111_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_debian11_openssl111_x64@sha256:d383e66d4a089f9305768e3037faa2a887ff91565b0f3ddd96985dca94e9754f", diff --git a/tools/bazelify_tests/test/portability_tests.bzl b/tools/bazelify_tests/test/portability_tests.bzl index d1a55957416..8c45b33613c 100644 --- a/tools/bazelify_tests/test/portability_tests.bzl +++ b/tools/bazelify_tests/test/portability_tests.bzl @@ -62,7 +62,7 @@ def generate_run_tests_portability_tests(name): ["gcc_12_openssl309", "--cmake_configure_extra_args=-DgRPC_SSL_PROVIDER=package", "tools/dockerfile/test/cxx_debian12_openssl309_x64.current_version"], ["gcc_musl", "", "tools/dockerfile/test/cxx_alpine_x64.current_version"], ["clang_6", "--cmake_configure_extra_args=-DCMAKE_C_COMPILER=clang --cmake_configure_extra_args=-DCMAKE_CXX_COMPILER=clang++", "tools/dockerfile/test/cxx_clang_6_x64.current_version"], - ["clang_17_cxx23", "--cmake_configure_extra_args=-DCMAKE_C_COMPILER=clang --cmake_configure_extra_args=-DCMAKE_CXX_COMPILER=clang++ --cmake_configure_extra_args=-DCMAKE_CXX_STANDARD=23", "tools/dockerfile/test/cxx_clang_17_x64.current_version"], + ["clang_18_cxx23", "--cmake_configure_extra_args=-DCMAKE_C_COMPILER=clang --cmake_configure_extra_args=-DCMAKE_CXX_COMPILER=clang++ --cmake_configure_extra_args=-DCMAKE_CXX_STANDARD=23", "tools/dockerfile/test/cxx_clang_18_x64.current_version"], ] for compiler_name, args, docker_image_version in compiler_configs: diff --git a/tools/dockerfile/test/cxx_clang_17_x64.current_version b/tools/dockerfile/test/cxx_clang_17_x64.current_version deleted file mode 100644 index 66d42340da2..00000000000 --- a/tools/dockerfile/test/cxx_clang_17_x64.current_version +++ /dev/null @@ -1 +0,0 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_clang_17_x64:178d7f05c6a124b14824b92cccca2ecc37711e62@sha256:f4e88cdfe074ee33abbe01f97f945ded0f144693f1eeac4d541a256a7812a21a \ No newline at end of file diff --git a/tools/dockerfile/test/cxx_clang_18_x64.current_version b/tools/dockerfile/test/cxx_clang_18_x64.current_version new file mode 100644 index 00000000000..ada1c8f4b23 --- /dev/null +++ b/tools/dockerfile/test/cxx_clang_18_x64.current_version @@ -0,0 +1 @@ +us-docker.pkg.dev/grpc-testing/testing-images-public/cxx_clang_18_x64:a3f9bea542d5048a4b0d7fdf91e9253705edb4f2@sha256:46beb9901d0c480a40724a3934677ef5e8d6b2f177517c98e67ccff5d881503f \ No newline at end of file diff --git a/tools/dockerfile/test/cxx_clang_17_x64/Dockerfile b/tools/dockerfile/test/cxx_clang_18_x64/Dockerfile similarity index 99% rename from tools/dockerfile/test/cxx_clang_17_x64/Dockerfile rename to tools/dockerfile/test/cxx_clang_18_x64/Dockerfile index d7c6ccc864c..7d29882d078 100644 --- a/tools/dockerfile/test/cxx_clang_17_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_clang_18_x64/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM silkeh/clang:17-bookworm +FROM silkeh/clang:18-bookworm RUN apt update && apt -y upgrade && apt install -y build-essential curl git time wget zip && apt clean #================= diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index a663675eaec..ba400a90eb3 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -606,8 +606,8 @@ class CLanguage(object): return ("alpine", []) elif compiler == "clang6": return ("clang_6", self._clang_cmake_configure_extra_args()) - elif compiler == "clang17": - return ("clang_17", self._clang_cmake_configure_extra_args()) + elif compiler == "clang18": + return ("clang_18", self._clang_cmake_configure_extra_args()) else: raise Exception("Compiler %s not supported." % compiler) @@ -1673,7 +1673,7 @@ argp.add_argument( "gcc12_openssl309", "gcc_musl", "clang6", - "clang17", + "clang18", # TODO: Automatically populate from supported version "python3.7", "python3.8", diff --git a/tools/run_tests/run_tests_matrix.py b/tools/run_tests/run_tests_matrix.py index a1ac350319c..31c150fad25 100755 --- a/tools/run_tests/run_tests_matrix.py +++ b/tools/run_tests/run_tests_matrix.py @@ -362,7 +362,7 @@ def _create_portability_test_jobs( "gcc12_openssl309", "gcc_musl", "clang6", - "clang17", + "clang18", ]: test_jobs += _generate_jobs( languages=["c", "c++"],