From 3d099e22b529391b7a3d414097241fc93ac5672a Mon Sep 17 00:00:00 2001 From: Sergiu Deitsch Date: Sun, 10 Nov 2024 20:21:00 +0100 Subject: [PATCH] lint-18 --- .ci/docker/lint.Dockerfile | 6 ++++-- .github/workflows/linux.yml | 4 ++-- .gitlab-ci.yml | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.ci/docker/lint.Dockerfile b/.ci/docker/lint.Dockerfile index f5bf56e..dc8c454 100644 --- a/.ci/docker/lint.Dockerfile +++ b/.ci/docker/lint.Dockerfile @@ -18,7 +18,9 @@ RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted. FROM base AS deploy -RUN echo deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-19 main \ +ARG clang_format_VERSION 19 + +RUN echo deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-${clang_format_VERSION} main \ >/etc/apt/sources.list.d/llvm.list COPY --from=tools /etc/apt/trusted.gpg.d/apt.llvm.org.asc /etc/apt/trusted.gpg.d/apt.llvm.org.asc @@ -26,5 +28,5 @@ COPY --from=tools /etc/apt/trusted.gpg.d/apt.llvm.org.asc /etc/apt/trusted.gpg.d RUN --mount=type=cache,target=/var/cache/apt \ apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ --no-install-recommends --no-install-suggests \ -clang-format-19 \ +clang-format-${clang_format_VERSION} \ fd-find diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1ea4bde..04f07d3 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -5,7 +5,7 @@ on: [push, pull_request] jobs: lint: runs-on: ubuntu-24.04 - container: sergiud/hogpp:lint + container: sergiud/hogpp:lint-18 defaults: run: shell: bash -e -o pipefail {0} @@ -17,7 +17,7 @@ jobs: - name: Check code style run: | - fdfind -g '*.[ch]pp' -x clang-format-19 --dry-run --Werror + fdfind -g '*.[ch]pp' -x clang-format-18 --dry-run --Werror build-native: name: ${{matrix.os}}-GCC-${{matrix.build_type}} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 996a7d9..430a33c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -255,11 +255,11 @@ lint:pypy3.10: needs: [] lint:cpp: - image: sergiud/hogpp:lint + image: sergiud/hogpp:lint-18 stage: test allow_failure: true script: - - fdfind -g '*.[ch]pp' -x clang-format-19 --dry-run --Werror + - fdfind -g '*.[ch]pp' -x clang-format-18 --dry-run --Werror needs: [] build:bookworm: