Skip to content

Commit

Permalink
feat: support clang v19
Browse files Browse the repository at this point in the history
  • Loading branch information
shenxianpeng committed Sep 24, 2024
1 parent 72710ca commit 05c285e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 8 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
4 changes: 2 additions & 2 deletions Dockerfile.all
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand All @@ -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 \
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
20 changes: 20 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
group "default" {
targets = [
"all",
"19",
"18",
"17",
"16",
Expand Down Expand Up @@ -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&section=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"]
Expand Down

0 comments on commit 05c285e

Please sign in to comment.