From a4e1ced57774e173f26098525a2b88dd466279c7 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Tue, 27 May 2025 21:39:46 +0300 Subject: [PATCH 1/2] feat: support clang v20 --- .github/workflows/CI.yml | 2 +- Dockerfile.all | 2 +- README.md | 3 ++- docker-bake.hcl | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 754a006..8adf684 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,7 +23,7 @@ jobs: build: strategy: matrix: - target: [ "all", "19", "18", "17", "16", "16-alpine", "15", "14", "13", "12", "11", "10", "9", "8", "7"] + target: [ "all", "20", "19", "18", "17", "16", "16-alpine", "15", "14", "13", "12", "11", "10", "9", "8", "7"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/Dockerfile.all b/Dockerfile.all index 6efadfd..f685fec 100644 --- a/Dockerfile.all +++ b/Dockerfile.all @@ -18,7 +18,7 @@ RUN set -e \ apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION; done \ && rm -rf /var/lib/apt/lists/* -ENV CLANG_VERSIONS="19 18 17 16 15 14 13" +ENV CLANG_VERSIONS="20 19 18 17 16 15 14 13" SHELL ["/bin/bash", "-o", "pipefail", "-c"] diff --git a/README.md b/README.md index 6f40529..4e5f35a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,8 @@ You can access all available Clang Tools Docker images via [Docker Hub registry ## Supported Tags and Dockerfile links -* [`all`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile.all) (Supports versions of clang-tools includes `19`, `18`, `17`, `16`, `15`, `14`, `13`, `12`, `11`, `10`, `9`) +* [`all`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile.all) (Supports versions of clang-tools includes `20`, `19`, `18`, `17`, `16`, `15`, `14`, `13`, `12`, `11`, `10`, `9`) +* [`20`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile) * [`19`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile) * [`18`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile) * [`17`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile) diff --git a/docker-bake.hcl b/docker-bake.hcl index 20cded6..c5142bf 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -2,6 +2,7 @@ group "default" { targets = [ "all", + "20", "19", "18", "17", @@ -44,7 +45,7 @@ target "all" { target "clang-tools" { matrix = { - tgt = ["19"] + tgt = ["20", "19"] } name = "${tgt}" dockerfile = "Dockerfile" From 78eda5a918c21d4e64dc9c7894adf890b30416d9 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Tue, 27 May 2025 23:09:16 +0300 Subject: [PATCH 2/2] update since v20 need new image --- Dockerfile.all | 2 +- docker-bake.hcl | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Dockerfile.all b/Dockerfile.all index f685fec..509eb2f 100644 --- a/Dockerfile.all +++ b/Dockerfile.all @@ -33,7 +33,7 @@ RUN set -e \ && rm llvm.sh \ && rm -rf /var/lib/apt/lists/* -ENV CLANG_VERSIONS="19 18 17 16 15 14 13 12 11 10 9" +ENV CLANG_VERSIONS="20 19 18 17 16 15 14 13 12 11 10 9" # Integrity testing RUN set -e \ && for VERSION in $CLANG_VERSIONS; do \ diff --git a/docker-bake.hcl b/docker-bake.hcl index c5142bf..2d064b1 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -45,7 +45,26 @@ target "all" { target "clang-tools" { matrix = { - tgt = ["20", "19"] + tgt = ["20"] + } + name = "${tgt}" + dockerfile = "Dockerfile" + context = "." + args = { + # https://packages.ubuntu.com/search?suite=default§ion=all&arch=any&keywords=clang-format-20&searchon=names + BASE_IMAGE="ubuntu:plucky" + CLANG_VERSION="${tgt}", + } + tags = [ + "${DOCKER_REPO}:${tgt}", + "${GITHUB_REPO}:${tgt}" + ] + platforms = ["linux/amd64"] +} + +target "clang-tools" { + matrix = { + tgt = ["19"] } name = "${tgt}" dockerfile = "Dockerfile"