Skip to content

Commit ae12cdc

Browse files
committed
Add extra flag for Clang 20
1 parent fffc697 commit ae12cdc

File tree

6 files changed

+69
-31
lines changed

6 files changed

+69
-31
lines changed

docker/debian/Dockerfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ WORKDIR /home/${NONROOT_USER}
9191

9292
# Create a default Conan profile.
9393
RUN conan profile detect
94+
# Print the Conan profile to verify the configuration.
95+
RUN conan profile show
9496

9597
# ===================== CLANG IMAGE =====================
9698
FROM base AS clang
@@ -119,13 +121,19 @@ WORKDIR /home/${NONROOT_USER}
119121

120122
# Create a default Conan profile.
121123
RUN conan profile detect
122-
# To ensure compatibility with a range of Clang compilers, we must add an extra
123-
# flag that applies to Clang 19 and later versions.
124+
# To ensure compatibility with a range of Clang compilers, we must add extra
125+
# flags that applies to certain versions of Clang.
124126
RUN <<EOF
125-
if [[ "${CLANG_VERSION}" -ge 19 ]]; then
126-
cat >>/home/${NONROOT_USER}/.conan2/profiles/default <<EOT
127+
if [[ $(clang --version | head -1 | grep -Po 'version \K[0-9]{2}') -ge 20 ]]; then
128+
cat >>${CONAN_HOME}/profiles/default <<EOT
129+
tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw', '-Wno-deprecated-declarations']
130+
EOT
131+
elif [[ $(clang --version | head -1 | grep -Po 'version \K[0-9]{2}') -eq 19 ]]; then
132+
cat >>${CONAN_HOME}/profiles/default <<EOT
127133
[conf]
128134
tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw']
129135
EOT
130136
fi
131137
EOF
138+
# Print the Conan profile to verify the configuration.
139+
RUN conan profile show

docker/debian/README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,14 @@ GCC_VERSION=12
4242
CONAN_VERSION=2.17.0
4343
DOCKER_IMAGE=xrplf/ci/debian-${DEBIAN_VERSION}:gcc${GCC_VERSION}
4444

45-
DOCKER_BUILDKIT=1 docker build . \
45+
DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build . \
4646
--target gcc \
4747
--build-arg BUILDKIT_INLINE_CACHE=1 \
4848
--build-arg DEBIAN_VERSION=${DEBIAN_VERSION} \
4949
--build-arg GCC_VERSION=${GCC_VERSION} \
5050
--build-arg CONAN_VERSION=${CONAN_VERSION} \
5151
--tag ${GITHUB_REGISTRY}/${DOCKER_IMAGE} \
5252
--platform linux/amd64
53-
54-
docker push ${GITHUB_REGISTRY}/${DOCKER_IMAGE}
5553
```
5654

5755
#### Building the Docker image for Clang.
@@ -65,16 +63,14 @@ CLANG_VERSION=17
6563
CONAN_VERSION=2.17.0
6664
DOCKER_IMAGE=xrplf/ci/debian-${DEBIAN_VERSION}:clang${CLANG_VERSION}
6765

68-
DOCKER_BUILDKIT=1 docker build . \
66+
DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build . \
6967
--target clang \
7068
--build-arg BUILDKIT_INLINE_CACHE=1 \
7169
--build-arg DEBIAN_VERSION=${DEBIAN_VERSION} \
7270
--build-arg CLANG_VERSION=${CLANG_VERSION} \
7371
--build-arg CONAN_VERSION=${CONAN_VERSION} \
7472
--tag ${GITHUB_REGISTRY}/${DOCKER_IMAGE} \
7573
--platform linux/amd64
76-
77-
docker push ${GITHUB_REGISTRY}/${DOCKER_IMAGE}
7874
```
7975

8076
#### Running the Docker image
@@ -107,3 +103,13 @@ PARALLELISM=2
107103
cmake --build . -j ${PARALLELISM}
108104
./rippled --unittest --unittest-jobs ${PARALLELISM}
109105
```
106+
```
107+
108+
#### Pushing the Docker image to the GitHub registry
109+
110+
If you want to push the image to the GitHub registry, you can do so with the
111+
following command:
112+
113+
```shell
114+
docker push ${GITHUB_REGISTRY}/${DOCKER_IMAGE}
115+
```

docker/rhel/Dockerfile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ ENV CONAN_HOME=/home/${NONROOT_USER}/.conan2
5151

5252
# Create a default Conan profile.
5353
RUN conan profile detect
54+
# Print the Conan profile to verify the configuration.
55+
RUN conan profile show
5456

5557
# ===================== CLANG IMAGE =====================
5658
FROM base AS clang
@@ -71,15 +73,19 @@ ENV CONAN_HOME=/home/${NONROOT_USER}/.conan2
7173

7274
# Create a default Conan profile.
7375
RUN conan profile detect
74-
# To ensure compatibility with a range of Clang compilers, we must add an extra
75-
# flag that applies to Clang 19 and later versions.
76+
# To ensure compatibility with a range of Clang compilers, we must add extra
77+
# flags that applies to certain versions of Clang.
7678
RUN <<EOF
77-
if [[ $(clang --version | head -1 | grep -Po 'version \K[0-9]{2}') -ge 19 ]]; then
79+
if [[ $(clang --version | head -1 | grep -Po 'version \K[0-9]{2}') -ge 20 ]]; then
80+
cat >>${CONAN_HOME}/profiles/default <<EOT
81+
tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw', '-Wno-deprecated-declarations']
82+
EOT
83+
elif [[ $(clang --version | head -1 | grep -Po 'version \K[0-9]{2}') -eq 19 ]]; then
7884
cat >>${CONAN_HOME}/profiles/default <<EOT
7985
[conf]
8086
tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw']
8187
EOT
8288
fi
8389
EOF
84-
85-
USER root
90+
# Print the Conan profile to verify the configuration.
91+
RUN conan profile show

docker/rhel/README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,14 @@ GCC_VERSION=13
6161
CONAN_VERSION=2.17.0
6262
DOCKER_IMAGE=xrplf/ci/rhel-${RHEL_VERSION}:gcc${GCC_VERSION}
6363

64-
DOCKER_BUILDKIT=1 docker build . \
64+
DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build . \
6565
--target gcc \
6666
--build-arg BUILDKIT_INLINE_CACHE=1 \
6767
--build-arg RHEL_VERSION=${RHEL_VERSION} \
6868
--build-arg GCC_VERSION=${GCC_VERSION} \
6969
--build-arg CONAN_VERSION=${CONAN_VERSION} \
7070
--tag ${GITHUB_REGISTRY}/${DOCKER_IMAGE} \
7171
--platform linux/amd64
72-
73-
docker push ${GITHUB_REGISTRY}/${DOCKER_IMAGE}
7472
```
7573

7674
#### Building the Docker image for Clang.
@@ -83,15 +81,13 @@ RHEL_VERSION=9.6
8381
CONAN_VERSION=2.17.0
8482
DOCKER_IMAGE=xrplf/ci/rhel-${RHEL_VERSION}:clang${CLANG_VERSION}
8583

86-
DOCKER_BUILDKIT=1 docker build . \
84+
DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build . \
8785
--target clang \
8886
--build-arg BUILDKIT_INLINE_CACHE=1 \
8987
--build-arg RHEL_VERSION=${RHEL_VERSION} \
9088
--build-arg CONAN_VERSION=${CONAN_VERSION} \
9189
--tag ${GITHUB_REGISTRY}/${DOCKER_IMAGE} \
9290
--platform linux/amd64
93-
94-
docker push ${GITHUB_REGISTRY}/${DOCKER_IMAGE}
9591
```
9692

9793
#### Running the Docker image
@@ -124,3 +120,12 @@ PARALLELISM=2
124120
cmake --build . -j ${PARALLELISM}
125121
./rippled --unittest --unittest-jobs ${PARALLELISM}
126122
```
123+
124+
#### Pushing the Docker image to the GitHub registry
125+
126+
If you want to push the image to the GitHub registry, you can do so with the
127+
following command:
128+
129+
```shell
130+
docker push ${GITHUB_REGISTRY}/${DOCKER_IMAGE}
131+
```

docker/ubuntu/Dockerfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ WORKDIR /home/${NONROOT_USER}
6363

6464
# Create a default Conan profile.
6565
RUN conan profile detect
66+
# Print the Conan profile to verify the configuration.
67+
RUN conan profile show
6668

6769
# ===================== CLANG IMAGE =====================
6870
FROM base AS clang
@@ -82,13 +84,19 @@ WORKDIR /home/${NONROOT_USER}
8284

8385
# Create a default Conan profile.
8486
RUN conan profile detect
85-
# To ensure compatibility with a range of Clang compilers, we must add an extra
86-
# flag that applies to Clang 19 and later versions.
87+
# To ensure compatibility with a range of Clang compilers, we must add extra
88+
# flags that applies to certain versions of Clang.
8789
RUN <<EOF
88-
if [[ "${CLANG_VERSION}" -ge 19 ]]; then
89-
cat >>/home/${NONROOT_USER}/.conan2/profiles/default <<EOT
90+
if [[ $(clang --version | head -1 | grep -Po 'version \K[0-9]{2}') -ge 20 ]]; then
91+
cat >>${CONAN_HOME}/profiles/default <<EOT
92+
tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw', '-Wno-deprecated-declarations']
93+
EOT
94+
elif [[ $(clang --version | head -1 | grep -Po 'version \K[0-9]{2}') -eq 19 ]]; then
95+
cat >>${CONAN_HOME}/profiles/default <<EOT
9096
[conf]
9197
tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw']
9298
EOT
9399
fi
94100
EOF
101+
# Print the Conan profile to verify the configuration.
102+
RUN conan profile show

docker/ubuntu/README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,14 @@ GCC_VERSION=14
4242
CONAN_VERSION=2.17.0
4343
DOCKER_IMAGE=xrplf/ci/ubuntu-${UBUNTU_VERSION}:gcc${GCC_VERSION}
4444

45-
DOCKER_BUILDKIT=1 docker build . \
45+
DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build . \
4646
--target gcc \
4747
--build-arg BUILDKIT_INLINE_CACHE=1 \
4848
--build-arg UBUNTU_VERSION=${UBUNTU_VERSION} \
4949
--build-arg GCC_VERSION=${GCC_VERSION} \
5050
--build-arg CONAN_VERSION=${CONAN_VERSION} \
5151
--tag ${GITHUB_REGISTRY}/${DOCKER_IMAGE} \
5252
--platform linux/amd64
53-
54-
docker push ${GITHUB_REGISTRY}/${DOCKER_IMAGE}
5553
```
5654

5755
#### Building the Docker image for Clang.
@@ -65,16 +63,14 @@ CLANG_VERSION=18
6563
CONAN_VERSION=2.17.0
6664
DOCKER_IMAGE=xrplf/ci/ubuntu-${UBUNTU_VERSION}:clang${CLANG_VERSION}
6765

68-
DOCKER_BUILDKIT=1 docker build . \
66+
DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain docker build . \
6967
--target clang \
7068
--build-arg BUILDKIT_INLINE_CACHE=1 \
7169
--build-arg UBUNTU_VERSION=${UBUNTU_VERSION} \
7270
--build-arg CLANG_VERSION=${CLANG_VERSION} \
7371
--build-arg CONAN_VERSION=${CONAN_VERSION} \
7472
--tag ${GITHUB_REGISTRY}/${DOCKER_IMAGE} \
7573
--platform linux/amd64
76-
77-
docker push ${GITHUB_REGISTRY}/${DOCKER_IMAGE}
7874
```
7975

8076
#### Running the Docker image
@@ -107,3 +103,12 @@ PARALLELISM=2
107103
cmake --build . -j ${PARALLELISM}
108104
./rippled --unittest --unittest-jobs ${PARALLELISM}
109105
```
106+
107+
#### Pushing the Docker image to the GitHub registry
108+
109+
If you want to push the image to the GitHub registry, you can do so with the
110+
following command:
111+
112+
```shell
113+
docker push ${GITHUB_REGISTRY}/${DOCKER_IMAGE}
114+
```

0 commit comments

Comments
 (0)