Skip to content

Commit 7c45cd8

Browse files
committed
updated dockerfile and CMakePresets.json
1 parent bb3ba31 commit 7c45cd8

File tree

4 files changed

+133
-11
lines changed

4 files changed

+133
-11
lines changed

Diff for: .devcontainer/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM ubuntu:${VARIANT}
44

55
# Restate the variant to use it later on in the llvm and cmake installations
66
ARG VARIANT
7-
ARG CMAKE_VERSION=3.30.5
7+
ARG CMAKE_VERSION=4.0.0
88
ENV PATH="${PATH}:/cmake-${CMAKE_VERSION}-linux-x86_64/bin/:"
99

1010
# Install necessary packages available from standard repos
@@ -31,7 +31,7 @@ ENV CONAN_SYSREQUIRES_SUDO 0
3131
ENV CONAN_SYSREQUIRES_MODE enabled
3232

3333
# User-settable versions:
34-
# This Dockerfile should support gcc-[10, 11, 12, 13, 14] and clang-[10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
34+
# This Dockerfile should support gcc-[10, 11, 12, 13, 14] and clang-[10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
3535
# Earlier versions of clang will require significant modifications to the IWYU section
3636
ARG GCC_VER="14"
3737
# Add gcc-${GCC_VER}
@@ -44,7 +44,7 @@ RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
4444
RUN update-alternatives --install /usr/bin/gcc gcc $(which gcc-${GCC_VER}) 100
4545
RUN update-alternatives --install /usr/bin/g++ g++ $(which g++-${GCC_VER}) 100
4646

47-
ARG LLVM_VER="17"
47+
ARG LLVM_VER="20"
4848
# Add clang-${LLVM_VER}
4949
ARG LLVM_URL="http://apt.llvm.org/${VARIANT}/"
5050
ARG LLVM_PKG="llvm-toolchain-${VARIANT}-${LLVM_VER}"
@@ -92,8 +92,8 @@ RUN apt-get autoremove -y && apt-get clean && \
9292
rm -rf /var/lib/apt/lists/*
9393

9494
## Install ARM GCC toolchain
95-
RUN wget -O archive.tar.xz "https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz?rev=7bd049b7a3034e64885fa1a71c12f91d&hash=732D909FA8F68C0E1D0D17D08E057619" && \
96-
echo 84be93d0f9e96a15addd490b6e237f588c641c8afdf90e7610a628007fc96867 archive.tar.xz > /tmp/archive.sha256 && sha256sum -c /tmp/archive.sha256 && rm /tmp/archive.sha256 && \
95+
RUN wget -O archive.tar.xz "https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz" && \
96+
echo 62a63b981fe391a9cbad7ef51b17e49aeaa3e7b0d029b36ca1e9c3b2a9b78823 archive.tar.xz > /tmp/archive.sha256 && sha256sum -c /tmp/archive.sha256 && rm /tmp/archive.sha256 && \
9797
tar xf archive.tar.xz -C /opt
9898

9999
# Allow the user to set compiler defaults

Diff for: .github/workflows/build_cmake.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ jobs:
4141
{name: 'GCC 14', preset: gcc-14, pkgs: 'gcc-14 g++-14 lib32gcc-14-dev gcc-multilib'},
4242
{name: 'Clang 16', preset: clang-16, pkgs: 'clang-16 llvm-16'},
4343
{name: 'Clang 17', preset: clang-17, pkgs: 'clang-17 llvm-17'},
44-
{name: 'Clang 18', preset: clang-18, pkgs: 'clang-18 llvm-18'}
44+
{name: 'Clang 18', preset: clang-18, pkgs: 'clang-18 llvm-18'},
45+
{name: 'Clang 19', preset: clang-19, pkgs: 'clang-19 llvm-19'},
46+
{name: 'Clang 20', preset: clang-20, pkgs: 'clang-20 llvm-20'}
4547
]
4648
cxx: [17, 20]
4749

@@ -148,7 +150,7 @@ jobs:
148150
matrix:
149151
os: [ubuntu-24.04]
150152
buildtype: [debug]
151-
compiler: [{name: 'Clang 17', preset: clang-17, pkgs: 'clang-17 llvm-17 llvm-17-dev libclang-17-dev', iwyu_branch: 'clang_17', path_prefix: "/usr/lib/llvm-17"}]
153+
compiler: [{name: 'Clang 20', preset: clang-20, pkgs: 'clang-20 llvm-20 llvm-20-dev libclang-20-dev', iwyu_branch: 'clang_20', path_prefix: "/usr/lib/llvm-20"}]
152154
cxx: [17, 20]
153155

154156
steps:
@@ -258,7 +260,7 @@ jobs:
258260
matrix:
259261
os: [ubuntu-24.04]
260262
buildtype: [debug]
261-
compiler: [ {name: 'Clang 17', preset: clang-17, pkgs: 'clang-17 llvm-17'} ]
263+
compiler: [ {name: 'Clang 20', preset: clang-20, pkgs: 'clang-20 llvm-20'} ]
262264

263265
steps:
264266
- uses: actions/checkout@v4

Diff for: CMakePresets.json

+121-1
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@
412412
},
413413
{
414414
"name": "unixlike-clang-19-debug",
415-
"displayName": "Clang 15 Debug",
415+
"displayName": "Clang 19 Debug",
416416
"description": "Target Unix-like OS with the Clang 19 compiler, debug build type",
417417
"inherits": "conf-unixlike-common",
418418
"cacheVariables": {
@@ -432,6 +432,28 @@
432432
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
433433
}
434434
},
435+
{
436+
"name": "unixlike-clang-20-debug",
437+
"displayName": "Clang 20 Debug",
438+
"description": "Target Unix-like OS with the Clang 20 compiler, debug build type",
439+
"inherits": "conf-unixlike-common",
440+
"cacheVariables": {
441+
"CMAKE_C_COMPILER": "clang-20",
442+
"CMAKE_CXX_COMPILER": "clang++-20",
443+
"CMAKE_BUILD_TYPE": "Debug"
444+
}
445+
},
446+
{
447+
"name": "unixlike-clang-20-release",
448+
"displayName": "Clang 20 Release",
449+
"description": "Target Unix-like OS with the Clang 20 compiler, release build type",
450+
"inherits": "conf-unixlike-common",
451+
"cacheVariables": {
452+
"CMAKE_C_COMPILER": "clang-20",
453+
"CMAKE_CXX_COMPILER": "clang++-20",
454+
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
455+
}
456+
},
435457
{
436458
"name": "win32-gcc-x64-mingw-debug",
437459
"displayName": "Windows GCC MinGW Debug",
@@ -472,6 +494,20 @@
472494
"ENABLE_INCLUDE_WHAT_YOU_USE": "ON"
473495
}
474496
},
497+
{
498+
"name": "unixlike-clang-16-debug-static-analysis",
499+
"displayName": "Clang 16 Debug - Static Analysis",
500+
"description": "Target Unix-like OS with the Clang 16 compiler, debug build type",
501+
"inherits": "unixlike-clang-16-debug",
502+
"cacheVariables": {
503+
"CMAKE_C_COMPILER": "clang-16",
504+
"CMAKE_CXX_COMPILER": "clang++-16",
505+
"CMAKE_BUILD_TYPE": "Debug",
506+
"ENABLE_CPPCHECK": "ON",
507+
"ENABLE_CLANG_TIDY": "ON",
508+
"ENABLE_INCLUDE_WHAT_YOU_USE": "ON"
509+
}
510+
},
475511
{
476512
"name": "unixlike-clang-17-debug-static-analysis",
477513
"displayName": "Clang 17 Debug - Static Analysis",
@@ -486,6 +522,48 @@
486522
"ENABLE_INCLUDE_WHAT_YOU_USE": "ON"
487523
}
488524
},
525+
{
526+
"name": "unixlike-clang-18-debug-static-analysis",
527+
"displayName": "Clang 18 Debug - Static Analysis",
528+
"description": "Target Unix-like OS with the Clang 18 compiler, debug build type",
529+
"inherits": "unixlike-clang-18-debug",
530+
"cacheVariables": {
531+
"CMAKE_C_COMPILER": "clang-18",
532+
"CMAKE_CXX_COMPILER": "clang++-18",
533+
"CMAKE_BUILD_TYPE": "Debug",
534+
"ENABLE_CPPCHECK": "ON",
535+
"ENABLE_CLANG_TIDY": "ON",
536+
"ENABLE_INCLUDE_WHAT_YOU_USE": "ON"
537+
}
538+
},
539+
{
540+
"name": "unixlike-clang-19-debug-static-analysis",
541+
"displayName": "Clang 19 Debug - Static Analysis",
542+
"description": "Target Unix-like OS with the Clang 19 compiler, debug build type",
543+
"inherits": "unixlike-clang-19-debug",
544+
"cacheVariables": {
545+
"CMAKE_C_COMPILER": "clang-19",
546+
"CMAKE_CXX_COMPILER": "clang++-19",
547+
"CMAKE_BUILD_TYPE": "Debug",
548+
"ENABLE_CPPCHECK": "ON",
549+
"ENABLE_CLANG_TIDY": "ON",
550+
"ENABLE_INCLUDE_WHAT_YOU_USE": "ON"
551+
}
552+
},
553+
{
554+
"name": "unixlike-clang-20-debug-static-analysis",
555+
"displayName": "Clang 20 Debug - Static Analysis",
556+
"description": "Target Unix-like OS with the Clang 20 compiler, debug build type",
557+
"inherits": "unixlike-clang-20-debug",
558+
"cacheVariables": {
559+
"CMAKE_C_COMPILER": "clang-20",
560+
"CMAKE_CXX_COMPILER": "clang++-20",
561+
"CMAKE_BUILD_TYPE": "Debug",
562+
"ENABLE_CPPCHECK": "ON",
563+
"ENABLE_CLANG_TIDY": "ON",
564+
"ENABLE_INCLUDE_WHAT_YOU_USE": "ON"
565+
}
566+
},
489567
{
490568
"name": "gcc-arm-debug",
491569
"displayName": "GCC ARM Debug",
@@ -742,6 +820,16 @@
742820
"displayName": "Linux Clang 19 Release",
743821
"configurePreset": "unixlike-clang-19-release"
744822
},
823+
{
824+
"name": "build-unixlike-clang-20-debug",
825+
"displayName": "Linux Clang 20 Debug",
826+
"configurePreset": "unixlike-clang-20-debug"
827+
},
828+
{
829+
"name": "build-unixlike-clang-20-release",
830+
"displayName": "Linux Clang 20 Release",
831+
"configurePreset": "unixlike-clang-20-release"
832+
},
745833
{
746834
"name": "build-win32-gcc-x64-mingw-debug",
747835
"displayName": "Windows GCC MinGW Debug",
@@ -757,11 +845,31 @@
757845
"displayName": "Linux Clang 15 Debug Static Analysis",
758846
"configurePreset": "unixlike-clang-15-debug-static-analysis"
759847
},
848+
{
849+
"name": "build-unixlike-clang-16-debug-static-analysis",
850+
"displayName": "Linux Clang 16 Debug Static Analysis",
851+
"configurePreset": "unixlike-clang-15-debug-static-analysis"
852+
},
760853
{
761854
"name": "build-unixlike-clang-17-debug-static-analysis",
762855
"displayName": "Linux Clang 17 Debug Static Analysis",
763856
"configurePreset": "unixlike-clang-17-debug-static-analysis"
764857
},
858+
{
859+
"name": "build-unixlike-clang-18-debug-static-analysis",
860+
"displayName": "Linux Clang 18 Debug Static Analysis",
861+
"configurePreset": "unixlike-clang-18-debug-static-analysis"
862+
},
863+
{
864+
"name": "build-unixlike-clang-19-debug-static-analysis",
865+
"displayName": "Linux Clang 19 Debug Static Analysis",
866+
"configurePreset": "unixlike-clang-19-debug-static-analysis"
867+
},
868+
{
869+
"name": "build-unixlike-clang-20-debug-static-analysis",
870+
"displayName": "Linux Clang 20 Debug Static Analysis",
871+
"configurePreset": "unixlike-clang-20-debug-static-analysis"
872+
},
765873
{
766874
"name": "build-gcc-arm-debug",
767875
"displayName": "Linux GCC ARM Debug",
@@ -1008,6 +1116,18 @@
10081116
"inherits": "test-common",
10091117
"configurePreset": "unixlike-clang-19-release"
10101118
},
1119+
{
1120+
"name": "test-unixlike-clang-20-debug",
1121+
"displayName": "Linux Clang 20 Debug",
1122+
"inherits": "test-common",
1123+
"configurePreset": "unixlike-clang-20-debug"
1124+
},
1125+
{
1126+
"name": "test-unixlike-clang-20-release",
1127+
"displayName": "Linux Clang 20 Release",
1128+
"inherits": "test-common",
1129+
"configurePreset": "unixlike-clang-20-release"
1130+
},
10111131
{
10121132
"name": "test-win32-gcc-x64-mingw-debug",
10131133
"displayName": "Windows MinGW GCC Debug",

Diff for: docker/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
FROM ubuntu:24.04 as cpp-docker-common
66

77
ARG DEBIAN_FRONTEND=noninteractive
8-
ARG CLANG_COMPILER_VERSION=17
9-
ARG CMAKE_VERSION=3.30.5
8+
ARG CLANG_COMPILER_VERSION=20
9+
ARG CMAKE_VERSION=4.0.0
1010
ENV PATH="${PATH}:/cmake-${CMAKE_VERSION}-linux-x86_64/bin/:"
1111

1212
RUN apt-get update && apt-get -y dist-upgrade && apt-get -y install --fix-missing \

0 commit comments

Comments
 (0)