From d913d9217d37696b80f660486f22e68da519be11 Mon Sep 17 00:00:00 2001 From: Sergey Kuznetsov Date: Fri, 13 Feb 2026 15:30:34 +0000 Subject: [PATCH 1/3] Install clang-tidy on debian only for clang-21 --- .github/workflows/ubuntu.yml | 6 ------ docker/debian/Dockerfile | 8 ++++++++ docker/ubuntu/Dockerfile | 19 ------------------- 3 files changed, 8 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index a96b5ed..7cc1506 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -73,9 +73,6 @@ jobs: - release: noble compiler_name: clang compiler_version: 20 - - release: noble - compiler_name: clang - compiler_version: 21 runs-on: ${{ matrix.architecture.runner }} permissions: packages: write @@ -186,9 +183,6 @@ jobs: - release: noble compiler_name: clang compiler_version: 20 - - release: noble - compiler_name: clang - compiler_version: 21 runs-on: ubuntu-24.04 needs: - build diff --git a/docker/debian/Dockerfile b/docker/debian/Dockerfile index e2158d0..9806d46 100644 --- a/docker/debian/Dockerfile +++ b/docker/debian/Dockerfile @@ -267,6 +267,14 @@ apt-get install -t llvm-toolchain-${DEBIAN_VERSION}-${CLANG_VERSION} -y --no-ins clang-${CLANG_VERSION} \ libclang-rt-${CLANG_VERSION}-dev \ llvm-${CLANG_VERSION} +if [[ "${CLANG_VERSION}" -eq 21 ]]; then + apt-get install -y --no-install-recommends --allow-unauthenticated \ + clang-tidy-${CLANG_VERSION} + update-alternatives \ + --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-${CLANG_VERSION} 100 + update-alternatives \ + --install /usr/bin/run-clang-tidy run-clang-tidy /usr/bin/run-clang-tidy-${CLANG_VERSION} 100 +fi apt-get clean rm -rf /var/lib/apt/lists/* update-alternatives \ diff --git a/docker/ubuntu/Dockerfile b/docker/ubuntu/Dockerfile index b668a6f..6ec77e4 100644 --- a/docker/ubuntu/Dockerfile +++ b/docker/ubuntu/Dockerfile @@ -228,25 +228,6 @@ printf "%s\n" \ "Acquire::AllowWeakRepositories \"true\";" \ | tee /etc/apt/apt.conf.d/99llvm-allow-weak -if [[ "${CLANG_VERSION}" -eq 21 ]]; then - apt-get update - # Add LLVM repository for versions above 20 because it is not available in the default repo - apt-get install -y --no-install-recommends lsb-release software-properties-common gnupg - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - - DISTRO_CODENAME=$(lsb_release -cs) - echo "deb http://apt.llvm.org/${DISTRO_CODENAME}/ llvm-toolchain-${DISTRO_CODENAME}-${CLANG_VERSION} main" \ - | tee /etc/apt/sources.list.d/llvm.list - apt-get update - apt-get install -y --no-install-recommends --allow-unauthenticated \ - clang-tidy-${CLANG_VERSION} - update-alternatives \ - --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-${CLANG_VERSION} 100 - update-alternatives \ - --install /usr/bin/run-clang-tidy run-clang-tidy /usr/bin/run-clang-tidy-${CLANG_VERSION} 100 - apt-get clean - rm -rf /var/lib/apt/lists/* -fi - apt-get update apt-get install -y --no-install-recommends --allow-unauthenticated \ clang-${CLANG_VERSION} \ From 52529ae4cd54cc3a9dfbdff39c464b84ebe1619c Mon Sep 17 00:00:00 2001 From: Sergey Kuznetsov Date: Fri, 13 Feb 2026 15:53:31 +0000 Subject: [PATCH 2/3] Revert building ubuntu clang 21 image --- .github/workflows/ubuntu.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 7cc1506..a96b5ed 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -73,6 +73,9 @@ jobs: - release: noble compiler_name: clang compiler_version: 20 + - release: noble + compiler_name: clang + compiler_version: 21 runs-on: ${{ matrix.architecture.runner }} permissions: packages: write @@ -183,6 +186,9 @@ jobs: - release: noble compiler_name: clang compiler_version: 20 + - release: noble + compiler_name: clang + compiler_version: 21 runs-on: ubuntu-24.04 needs: - build From 7bd9c55e4d271a203735dd660651471979fe5d9e Mon Sep 17 00:00:00 2001 From: Sergey Kuznetsov Date: Fri, 13 Feb 2026 16:28:29 +0000 Subject: [PATCH 3/3] Fix build --- docker/ubuntu/Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docker/ubuntu/Dockerfile b/docker/ubuntu/Dockerfile index 6ec77e4..d15ffb3 100644 --- a/docker/ubuntu/Dockerfile +++ b/docker/ubuntu/Dockerfile @@ -228,6 +228,16 @@ printf "%s\n" \ "Acquire::AllowWeakRepositories \"true\";" \ | tee /etc/apt/apt.conf.d/99llvm-allow-weak +# Add LLVM repository for versions above 20 because it is not available in the default repo +if [[ "${CLANG_VERSION}" -gt 20 ]]; then + apt-get update + apt-get install -y --no-install-recommends lsb-release software-properties-common gnupg + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - + DISTRO_CODENAME=$(lsb_release -cs) + echo "deb http://apt.llvm.org/${DISTRO_CODENAME}/ llvm-toolchain-${DISTRO_CODENAME}-${CLANG_VERSION} main" \ + | tee /etc/apt/sources.list.d/llvm.list +fi + apt-get update apt-get install -y --no-install-recommends --allow-unauthenticated \ clang-${CLANG_VERSION} \