From 6173daef0d5584a854cf530333d2cf3a50e748a1 Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Wed, 29 Jan 2025 09:18:59 +0100 Subject: [PATCH] [CPU] Enable clang-tidy-18 checks on Ubuntu 24.04 --- .github/dockerfiles/docker_tag | 2 +- .github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfile | 9 +++++++++ .github/workflows/ubuntu_24.yml | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/dockerfiles/docker_tag b/.github/dockerfiles/docker_tag index 0d2fd1b31c0f73..37db3d46f34033 100644 --- a/.github/dockerfiles/docker_tag +++ b/.github/dockerfiles/docker_tag @@ -1 +1 @@ -pr-28040 +pr-28725 diff --git a/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfile b/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfile index 82a51ffc0b175e..6b7dcc5dee5dda 100644 --- a/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfile +++ b/.github/dockerfiles/ov_build/ubuntu_24_04_x64/Dockerfile @@ -31,6 +31,12 @@ RUN apt-get update && \ python3-full \ # For Java API default-jdk \ + # Compiler \ + clang-18 \ + # Static analyzer + clang-tidy-18 \ + # clang-tidy uses clang-format as a dependency + clang-format-18 \ && \ rm -rf /var/lib/apt/lists/* @@ -40,6 +46,9 @@ RUN chmod +x /install_build_dependencies.sh && \ /install_build_dependencies.sh && \ rm -rf /var/lib/apt/lists/* +RUN update-alternatives --install /usr/bin/cc cc /usr/bin/clang-18 100 && \ + update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-18 100 + # Install sccache ARG SCCACHE_VERSION="v0.7.5" ENV SCCACHE_HOME="/opt/sccache" \ diff --git a/.github/workflows/ubuntu_24.yml b/.github/workflows/ubuntu_24.yml index beac15bfbda97d..61e82a2645a486 100644 --- a/.github/workflows/ubuntu_24.yml +++ b/.github/workflows/ubuntu_24.yml @@ -88,9 +88,12 @@ jobs: build-js: true build-debian-packages: true build-contrib: true + # clang-tidy static analysis check is enabled as part of collection + # to avoid an additional separate build execution cmake-options: |- -G "Ninja Multi-Config" \ -DENABLE_CPPLINT=OFF \ + -DENABLE_CLANG_TIDY=ON \ -DENABLE_NCC_STYLE=OFF \ -DENABLE_TESTS=ON \ -DENABLE_STRICT_DEPENDENCIES=OFF \