Skip to content

Commit 4c6048a

Browse files
authored
Merge branch 'main' into bthomee/gcc
2 parents 7909f75 + 922b62f commit 4c6048a

File tree

7 files changed

+57
-60
lines changed

7 files changed

+57
-60
lines changed

.github/workflows/debian.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77
- docker/debian/Dockerfile
88
- test
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
1018
env:
1119
CONTAINER_REGISTRY: ghcr.io
1220
BUILDKIT_PROGRESS: plain
@@ -114,7 +122,6 @@ jobs:
114122
target: ${{ matrix.os.compiler_name }}
115123
- name: Export digest
116124
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
117-
shell: bash
118125
run: |
119126
mkdir -p /tmp/digests
120127
DIGEST="${{ steps.build.outputs.digest }}"
@@ -196,13 +203,11 @@ jobs:
196203
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
197204
- name: Create manifest list and push
198205
working-directory: /tmp/digests
199-
shell: bash
200206
run: |
201207
eval "docker buildx imagetools create \
202208
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
203209
$(jq -cr '.annotations | map("--annotation \"" + . + "\"") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
204210
$(printf '${{ env.CONTAINER_IMAGE }}@sha256:%s ' *)"
205211
- name: Inspect image
206-
shell: bash
207212
run: |
208213
docker buildx imagetools inspect ${{ env.CONTAINER_IMAGE }}:${{ steps.meta.outputs.version }}

.github/workflows/rhel.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77
- docker/rhel/Dockerfile
88
- test
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
1018
env:
1119
CONTAINER_REGISTRY: ghcr.io
1220
REDHAT_REGISTRY: registry.redhat.io
@@ -104,7 +112,6 @@ jobs:
104112
target: ${{ matrix.os.compiler_name }}
105113
- name: Export digest
106114
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
107-
shell: bash
108115
run: |
109116
mkdir -p /tmp/digests
110117
DIGEST="${{ steps.build.outputs.digest }}"
@@ -171,13 +178,11 @@ jobs:
171178
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
172179
- name: Create manifest list and push
173180
working-directory: /tmp/digests
174-
shell: bash
175181
run: |
176182
eval "docker buildx imagetools create \
177183
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
178184
$(jq -cr '.annotations | map("--annotation \"" + . + "\"") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
179185
$(printf '${{ env.CONTAINER_IMAGE }}@sha256:%s ' *)"
180186
- name: Inspect image
181-
shell: bash
182187
run: |
183188
docker buildx imagetools inspect ${{ env.CONTAINER_IMAGE }}:${{ steps.meta.outputs.version }}

.github/workflows/tools-rippled.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ on:
66
- .github/workflows/tools-rippled.yml
77
- docker/tools-rippled/Dockerfile
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
defaults:
14+
run:
15+
shell: bash
16+
917
env:
1018
CONTAINER_REGISTRY: ghcr.io
1119
BUILDKIT_PROGRESS: plain
@@ -84,7 +92,6 @@ jobs:
8492
target: ${{ matrix.tool }}
8593
- name: Export digest
8694
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
87-
shell: bash
8895
run: |
8996
mkdir -p /tmp/digests
9097
DIGEST="${{ steps.build.outputs.digest }}"
@@ -143,13 +150,11 @@ jobs:
143150
type=raw,value=latest
144151
- name: Create manifest list and push
145152
working-directory: /tmp/digests
146-
shell: bash
147153
run: |
148154
eval "docker buildx imagetools create \
149155
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
150156
$(jq -cr '.annotations | map("--annotation \"" + . + "\"") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
151157
$(printf '${{ env.CONTAINER_IMAGE }}@sha256:%s ' *)"
152158
- name: Inspect image
153-
shell: bash
154159
run: |
155160
docker buildx imagetools inspect ${{ env.CONTAINER_IMAGE }}:${{ steps.meta.outputs.version }}

.github/workflows/ubuntu.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77
- docker/ubuntu/Dockerfile
88
- test
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
1018
env:
1119
CONTAINER_REGISTRY: ghcr.io
1220
BUILDKIT_PROGRESS: plain
@@ -112,7 +120,6 @@ jobs:
112120
target: ${{ matrix.os.compiler_name }}
113121
- name: Export digest
114122
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
115-
shell: bash
116123
run: |
117124
mkdir -p /tmp/digests
118125
DIGEST="${{ steps.build.outputs.digest }}"
@@ -191,13 +198,11 @@ jobs:
191198
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
192199
- name: Create manifest list and push
193200
working-directory: /tmp/digests
194-
shell: bash
195201
run: |
196202
eval "docker buildx imagetools create \
197203
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
198204
$(jq -cr '.annotations | map("--annotation \"" + . + "\"") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
199205
$(printf '${{ env.CONTAINER_IMAGE }}@sha256:%s ' *)"
200206
- name: Inspect image
201-
shell: bash
202207
run: |
203208
docker buildx imagetools inspect ${{ env.CONTAINER_IMAGE }}:${{ steps.meta.outputs.version }}

docker/debian/Dockerfile

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ update-alternatives --auto cc
9999
update-alternatives --auto c++
100100
update-alternatives --auto gcc
101101
EOF
102+
# Set the compiler environment variables to point to the GCC binaries.
102103
ENV CC=/usr/bin/gcc
103104
ENV CXX=/usr/bin/g++
104105

@@ -121,10 +122,10 @@ if [[ "${CXX_VER}" != "${GCC_VERSION}" ]]; then
121122
fi
122123
EOF
123124

125+
# Set the Conan home directory, so the users of this image can find the default
126+
# profile.
124127
ENV HOME=/root
125128
WORKDIR ${HOME}
126-
127-
# Set Conan home directory, so the users of this image can find default profile
128129
ENV CONAN_HOME=${HOME}/.conan2
129130

130131
# Create a default Conan profile.
@@ -133,15 +134,14 @@ conan profile detect
133134
rm -rf /tmp/*
134135
EOF
135136

136-
# Fix the C++ dialect.
137-
RUN sed -i -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
138-
# Explicitly set the compiler flags.
137+
# Explicitly set the compiler flags and the distribution name and version.
139138
RUN <<EOF
140139
cat >> $(conan config home)/global.conf <<EOT
141140
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
142141
tools.info.package_id:confs+=["Debian", "${DEBIAN_VERSION}"]
143142
EOT
144143
EOF
144+
145145
# Print the Conan profile to verify the configuration.
146146
RUN conan profile show
147147

@@ -189,7 +189,7 @@ update-alternatives --auto c++
189189
update-alternatives --auto clang
190190
update-alternatives --auto llvm-cov
191191
EOF
192-
192+
# Set the compiler environment variables to point to the GCC binaries.
193193
ENV CC=/usr/bin/clang-${CLANG_VERSION}
194194
ENV CXX=/usr/bin/clang++-${CLANG_VERSION}
195195

@@ -209,10 +209,10 @@ if [[ "${CXX_VER}" != "${CLANG_VERSION}" ]]; then
209209
fi
210210
EOF
211211

212+
# Set the Conan home directory, so the users of this image can find the default
213+
# profile.
212214
ENV HOME=/root
213215
WORKDIR ${HOME}
214-
215-
# Set Conan home directory, so the users of this image can find default profile
216216
ENV CONAN_HOME=${HOME}/.conan2
217217

218218
# Create a default Conan profile.
@@ -221,15 +221,8 @@ conan profile detect
221221
rm -rf /tmp/*
222222
EOF
223223

224-
# Fix the C++ dialect.
225-
RUN sed -i -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
226-
# Explicitly set the compiler flags. To ensure compatibility with a range of
227-
# Clang compilers, we must also add extra flags that apply to certain versions
228-
# of Clang.
229-
# TODO: Move extra flags into the rippled repository as a custom Conan profile.
224+
# Explicitly set the compiler flags and the distribution name and version.
230225
RUN <<EOF
231-
CXX_VER=$(${CXX} -dumpversion)
232-
CXX_VER=${CXX_VER%%.*}
233226
cat >> $(conan config home)/global.conf <<EOT
234227
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
235228
tools.info.package_id:confs+=["Debian", "${DEBIAN_VERSION}"]

docker/rhel/Dockerfile

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ update-alternatives --auto cc
6868
update-alternatives --auto c++
6969
update-alternatives --auto gcc
7070
EOF
71+
# Set the compiler environment variables to point to the GCC binaries.
7172
ENV CC=/usr/bin/gcc
7273
ENV CXX=/usr/bin/g++
7374

@@ -87,10 +88,10 @@ if [[ "${CXX_VER}" != "${GCC_VERSION}" ]]; then
8788
fi
8889
EOF
8990

91+
# Set the Conan home directory, so the users of this image can find the default
92+
# profile.
9093
ENV HOME=/root
9194
WORKDIR ${HOME}
92-
93-
# Set Conan home directory, so the users of this image can find default profile
9495
ENV CONAN_HOME=${HOME}/.conan2
9596

9697
# Create a default Conan profile.
@@ -99,9 +100,7 @@ conan profile detect
99100
rm -rf /tmp/*
100101
EOF
101102

102-
# Fix the C++ dialect.
103-
RUN sed -i -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
104-
# Explicitly set the compiler flags.
103+
# Explicitly set the compiler flags and the distribution name and version.
105104
RUN <<EOF
106105
cat >> $(conan config home)/global.conf <<EOT
107106
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
@@ -137,7 +136,7 @@ update-alternatives \
137136
update-alternatives --auto cc
138137
update-alternatives --auto c++
139138
EOF
140-
139+
# Set the compiler environment variables to point to the GCC binaries.
141140
ENV CC=/usr/bin/clang
142141
ENV CXX=/usr/bin/clang++
143142

@@ -158,10 +157,10 @@ if [[ ${CXX_VER} -lt ${MINIMUM_CLANG_VERSION} ]]; then
158157
fi
159158
EOF
160159

160+
# Set the Conan home directory, so the users of this image can find the default
161+
# profile.
161162
ENV HOME=/root
162163
WORKDIR ${HOME}
163-
164-
# Set Conan home directory, so the users of this image can find default profile
165164
ENV CONAN_HOME=${HOME}/.conan2
166165

167166
# Create a default Conan profile.
@@ -170,15 +169,8 @@ conan profile detect
170169
rm -rf /tmp/*
171170
EOF
172171

173-
# Fix the C++ dialect.
174-
RUN sed -i -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
175-
# Explicitly set the compiler flags. To ensure compatibility with a range of
176-
# Clang compilers, we must also add extra flags that apply to certain versions
177-
# of Clang.
178-
# TODO: Move extra flags into the rippled repository as a custom Conan profile.
172+
# Explicitly set the compiler flags and the distribution name and version.
179173
RUN <<EOF
180-
CXX_VER=$(${CXX} -dumpversion)
181-
CXX_VER=${CXX_VER%%.*}
182174
cat >> $(conan config home)/global.conf <<EOT
183175
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
184176
tools.info.package_id:confs+=["RHEL", "${RHEL_VERSION}"]

docker/ubuntu/Dockerfile

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ update-alternatives --auto cc
8686
update-alternatives --auto c++
8787
update-alternatives --auto gcc
8888
EOF
89+
# Set the compiler environment variables to point to the GCC binaries.
8990
ENV CC=/usr/bin/gcc
9091
ENV CXX=/usr/bin/g++
9192

@@ -105,10 +106,10 @@ if [[ "${CXX_VER}" != "${GCC_VERSION}" ]]; then
105106
fi
106107
EOF
107108

109+
# Set the Conan home directory, so the users of this image can find the default
110+
# profile.
108111
ENV HOME=/root
109112
WORKDIR ${HOME}
110-
111-
# Set Conan home directory, so the users of this image can find default profile
112113
ENV CONAN_HOME=${HOME}/.conan2
113114

114115
# Create a default Conan profile.
@@ -117,9 +118,7 @@ conan profile detect
117118
rm -rf /tmp/*
118119
EOF
119120

120-
# Fix the C++ dialect.
121-
RUN sed -i -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
122-
# Explicitly set the compiler flags.
121+
# Explicitly set the compiler flags and the distribution name and version.
123122
RUN <<EOF
124123
cat >> $(conan config home)/global.conf <<EOT
125124
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
@@ -169,7 +168,7 @@ update-alternatives --auto c++
169168
update-alternatives --auto clang
170169
update-alternatives --auto llvm-cov
171170
EOF
172-
171+
# Set the compiler environment variables to point to the GCC binaries.
173172
ENV CC=/usr/bin/clang-${CLANG_VERSION}
174173
ENV CXX=/usr/bin/clang++-${CLANG_VERSION}
175174

@@ -189,10 +188,10 @@ if [[ "${CXX_VER}" != "${CLANG_VERSION}" ]]; then
189188
fi
190189
EOF
191190

191+
# Set the Conan home directory, so the users of this image can find the default
192+
# profile.
192193
ENV HOME=/root
193194
WORKDIR ${HOME}
194-
195-
# Set Conan home directory, so the users of this image can find default profile
196195
ENV CONAN_HOME=${HOME}/.conan2
197196

198197
# Create a default Conan profile.
@@ -201,15 +200,8 @@ conan profile detect
201200
rm -rf /tmp/*
202201
EOF
203202

204-
# Fix the C++ dialect.
205-
RUN sed -i -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
206-
# Explicitly set the compiler flags. To ensure compatibility with a range of
207-
# Clang compilers, we must also add extra flags that apply to certain versions
208-
# of Clang.
209-
# TODO: Move extra flags into the rippled repository as a custom Conan profile.
203+
# Explicitly set the compiler flags and the distribution name and version.
210204
RUN <<EOF
211-
CXX_VER=$(${CXX} -dumpversion)
212-
CXX_VER=${CXX_VER%%.*}
213205
cat >> $(conan config home)/global.conf <<EOT
214206
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
215207
tools.info.package_id:confs+=["Ubuntu", "${UBUNTU_VERSION}"]

0 commit comments

Comments
 (0)