Skip to content

Commit

Permalink
Add a formatting image with clang-format 18 (#106)
Browse files Browse the repository at this point in the history
As we move ahead to using newer compiler features in projects like
traccc, some features are not properly formatted by the older versions
of `clang-format`. This commit adds a new image with version 18 of
`clang-format` which should support a broader range of features.
  • Loading branch information
stephenswat committed Jun 20, 2024
1 parent 7680d98 commit 714007e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- centos8-lcg101-gcc11
- format10
- format14
- format18
- ubuntu2004
- ubuntu2004_cuda
- ubuntu2004_cuda_oneapi
Expand Down
20 changes: 20 additions & 0 deletions format18/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Docker machinery, part of the ACTS project
#
# (c) 2024 CERN for the benefit of the ACTS project
#
# Mozilla Public License Version 2.0

FROM ubuntu:24.04

LABEL description="Ubuntu with clang-format v18"
LABEL maintainer="Stephen Nicholas Swatman <stephen.nicholas.swatman@cern.ch>"
# increase whenever any of the RUN commands change
LABEL version="1"

RUN apt-get -y update \
&& apt-get -y install clang-format-18 git \
&& apt-get clean all \
&& update-alternatives \
--install /usr/bin/clang-format clang-format /usr/bin/clang-format-18 100 \
--slave /usr/bin/clang-format-diff clang-format-diff /usr/bin/clang-format-diff-18 \
--slave /usr/bin/git-clang-format git-clang-format /usr/bin/git-clang-format-18

0 comments on commit 714007e

Please sign in to comment.