Skip to content

Commit d913d92

Browse files
committed
Install clang-tidy on debian only for clang-21
1 parent fd3a017 commit d913d92

File tree

3 files changed

+8
-25
lines changed

3 files changed

+8
-25
lines changed

.github/workflows/ubuntu.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ jobs:
7373
- release: noble
7474
compiler_name: clang
7575
compiler_version: 20
76-
- release: noble
77-
compiler_name: clang
78-
compiler_version: 21
7976
runs-on: ${{ matrix.architecture.runner }}
8077
permissions:
8178
packages: write
@@ -186,9 +183,6 @@ jobs:
186183
- release: noble
187184
compiler_name: clang
188185
compiler_version: 20
189-
- release: noble
190-
compiler_name: clang
191-
compiler_version: 21
192186
runs-on: ubuntu-24.04
193187
needs:
194188
- build

docker/debian/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,14 @@ apt-get install -t llvm-toolchain-${DEBIAN_VERSION}-${CLANG_VERSION} -y --no-ins
267267
clang-${CLANG_VERSION} \
268268
libclang-rt-${CLANG_VERSION}-dev \
269269
llvm-${CLANG_VERSION}
270+
if [[ "${CLANG_VERSION}" -eq 21 ]]; then
271+
apt-get install -y --no-install-recommends --allow-unauthenticated \
272+
clang-tidy-${CLANG_VERSION}
273+
update-alternatives \
274+
--install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-${CLANG_VERSION} 100
275+
update-alternatives \
276+
--install /usr/bin/run-clang-tidy run-clang-tidy /usr/bin/run-clang-tidy-${CLANG_VERSION} 100
277+
fi
270278
apt-get clean
271279
rm -rf /var/lib/apt/lists/*
272280
update-alternatives \

docker/ubuntu/Dockerfile

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -228,25 +228,6 @@ printf "%s\n" \
228228
"Acquire::AllowWeakRepositories \"true\";" \
229229
| tee /etc/apt/apt.conf.d/99llvm-allow-weak
230230

231-
if [[ "${CLANG_VERSION}" -eq 21 ]]; then
232-
apt-get update
233-
# Add LLVM repository for versions above 20 because it is not available in the default repo
234-
apt-get install -y --no-install-recommends lsb-release software-properties-common gnupg
235-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
236-
DISTRO_CODENAME=$(lsb_release -cs)
237-
echo "deb http://apt.llvm.org/${DISTRO_CODENAME}/ llvm-toolchain-${DISTRO_CODENAME}-${CLANG_VERSION} main" \
238-
| tee /etc/apt/sources.list.d/llvm.list
239-
apt-get update
240-
apt-get install -y --no-install-recommends --allow-unauthenticated \
241-
clang-tidy-${CLANG_VERSION}
242-
update-alternatives \
243-
--install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-${CLANG_VERSION} 100
244-
update-alternatives \
245-
--install /usr/bin/run-clang-tidy run-clang-tidy /usr/bin/run-clang-tidy-${CLANG_VERSION} 100
246-
apt-get clean
247-
rm -rf /var/lib/apt/lists/*
248-
fi
249-
250231
apt-get update
251232
apt-get install -y --no-install-recommends --allow-unauthenticated \
252233
clang-${CLANG_VERSION} \

0 commit comments

Comments
 (0)