From 05c285e1a9608fbccf9c7ad76b5f0b3fbf756bba Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Tue, 24 Sep 2024 13:51:24 +0000 Subject: [PATCH 1/3] feat: support clang v19 --- CONTRIBUTING.md | 4 ++-- Dockerfile.all | 4 ++-- README.md | 9 +++++---- docker-bake.hcl | 20 ++++++++++++++++++++ 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4fc88da..d049a4b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,8 +22,8 @@ Please note that by contributing any code or documentation to this repository (b docker buildx bake --file docker-bake.hcl # Build specific version of clang-tools docker images -docker buildx bake --file docker-bake.hcl 16 +docker buildx bake --file docker-bake.hcl 19 # If want to docker build and push images, add `--push` flag. -docker buildx bake --file docker-bake.hcl --push 16 +docker buildx bake --file docker-bake.hcl --push 19 ``` diff --git a/Dockerfile.all b/Dockerfile.all index 1607e8c..3185fd4 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="18 17 16 15 14 13" +ENV CLANG_VERSIONS="19 18 17 16 15 14 13" SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -33,7 +33,7 @@ RUN set -e \ && rm llvm.sh \ && rm -rf /var/lib/apt/lists/* -ENV CLANG_VERSIONS="18 17 16 15 14 13 12 11 10 9" +ENV CLANG_VERSIONS="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/README.md b/README.md index 7c20201..f788839 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,14 @@ [![CI](https://github.com/cpp-linter/clang-tools-docker/actions/workflows/CI.yml/badge.svg)](https://github.com/cpp-linter/clang-tools-docker/actions/workflows/CI.yml) [![Snyk Container](https://github.com/cpp-linter/clang-tools-docker/actions/workflows/snyk-container-analysis.yml/badge.svg)](https://github.com/cpp-linter/clang-tools-docker/actions/workflows/snyk-container-analysis.yml) -🐳 The Clang Tools Docker image includes the clang-format and clang-tidy. +🐳 **Clang Tools Docker Image**: This Docker image comes pre-installed with essential clang tools, including `clang-format` and `clang-tidy`. -You can find all the clang-tools Docker images on Docker Hub [registry](https://hub.docker.com/r/xianpengshen/clang-tools) or GitHub Packages [registry](https://github.com/cpp-linter/clang-tools-docker/pkgs/container/clang-tools). +You can access all available Clang Tools Docker images via [Docker Hub registry](https://hub.docker.com/r/xianpengshen/clang-tools) or [GitHub Packages registry](https://github.com/cpp-linter/clang-tools-docker/pkgs/container/clang-tools). -## Supported tags and respective `Dockerfile` links +## Supported Tags and Dockerfile links -* [`all`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile.all) (Supported versions of clang-tools includes `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 `19`, `18`, `17`, `16`, `15`, `14`, `13`, `12`, `11`, `10`, `9`) +* [`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) * [`16`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile) diff --git a/docker-bake.hcl b/docker-bake.hcl index 3f27276..02f467b 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -2,6 +2,7 @@ group "default" { targets = [ "all", + "19", "18", "17", "16", @@ -41,6 +42,25 @@ target "all" { platforms = ["linux/amd64"] } +target "clang-tools" { + matrix = { + tgt = ["19"] + } + name = "${tgt}" + dockerfile = "Dockerfile" + context = "." + args = { + # https://packages.ubuntu.com/search?suite=default§ion=all&arch=any&keywords=clang-format-19&searchon=names + BASE_IMAGE="ubuntu:oracular" + CLANG_VERSION="${tgt}", + } + tags = [ + "${DOCKER_REPO}:${tgt}", + "${GITHUB_REPO}:${tgt}" + ] + platforms = ["linux/amd64"] +} + target "clang-tools" { matrix = { tgt = ["18"] From d2f438342b545b4ff9637131c11b8205675c339d Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Tue, 24 Sep 2024 13:54:50 +0000 Subject: [PATCH 2/3] fix: sort these package names alphanumerically --- Dockerfile.all | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.all b/Dockerfile.all index 3185fd4..d4e7065 100644 --- a/Dockerfile.all +++ b/Dockerfile.all @@ -24,7 +24,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN set -e \ && apt-get update \ - && apt-get --no-install-recommends -y install lsb-release wget software-properties-common gnupg \ + && apt-get --no-install-recommends -y install gnupg lsb-release software-properties-common wget \ && wget --quiet https://apt.llvm.org/llvm.sh \ && chmod +x llvm.sh \ && for CLANG_VERSION in $CLANG_VERSIONS; do \ From e4224cbdf7c28d7a22337aa9f006dda966a86714 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Tue, 24 Sep 2024 13:57:47 +0000 Subject: [PATCH 3/3] feat: add clang v19 to ci.yml --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 01220f1..005115a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,7 +23,7 @@ jobs: build: strategy: matrix: - target: [ "all", "18", "17", "16", "16-alpine", "15", "14", "13", "12", "11", "10", "9", "8", "7"] + target: [ "all", "19", "18", "17", "16", "16-alpine", "15", "14", "13", "12", "11", "10", "9", "8", "7"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4