Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ on:
- docker/debian/Dockerfile
- test

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

env:
CONTAINER_REGISTRY: ghcr.io
BUILDKIT_PROGRESS: plain
Expand Down Expand Up @@ -114,7 +122,6 @@ jobs:
target: ${{ matrix.os.compiler_name }}
- name: Export digest
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
shell: bash
run: |
mkdir -p /tmp/digests
DIGEST="${{ steps.build.outputs.digest }}"
Expand Down Expand Up @@ -196,13 +203,11 @@ jobs:
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
- name: Create manifest list and push
working-directory: /tmp/digests
shell: bash
run: |
eval "docker buildx imagetools create \
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(jq -cr '.annotations | map("--annotation \"" + . + "\"") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.CONTAINER_IMAGE }}@sha256:%s ' *)"
- name: Inspect image
shell: bash
run: |
docker buildx imagetools inspect ${{ env.CONTAINER_IMAGE }}:${{ steps.meta.outputs.version }}
11 changes: 8 additions & 3 deletions .github/workflows/rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ on:
- docker/rhel/Dockerfile
- test

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

env:
CONTAINER_REGISTRY: ghcr.io
REDHAT_REGISTRY: registry.redhat.io
Expand Down Expand Up @@ -104,7 +112,6 @@ jobs:
target: ${{ matrix.os.compiler_name }}
- name: Export digest
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
shell: bash
run: |
mkdir -p /tmp/digests
DIGEST="${{ steps.build.outputs.digest }}"
Expand Down Expand Up @@ -171,13 +178,11 @@ jobs:
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
- name: Create manifest list and push
working-directory: /tmp/digests
shell: bash
run: |
eval "docker buildx imagetools create \
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(jq -cr '.annotations | map("--annotation \"" + . + "\"") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.CONTAINER_IMAGE }}@sha256:%s ' *)"
- name: Inspect image
shell: bash
run: |
docker buildx imagetools inspect ${{ env.CONTAINER_IMAGE }}:${{ steps.meta.outputs.version }}
11 changes: 8 additions & 3 deletions .github/workflows/tools-rippled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ on:
- .github/workflows/tools-rippled.yml
- docker/tools-rippled/Dockerfile

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

env:
CONTAINER_REGISTRY: ghcr.io
BUILDKIT_PROGRESS: plain
Expand Down Expand Up @@ -84,7 +92,6 @@ jobs:
target: ${{ matrix.tool }}
- name: Export digest
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
shell: bash
run: |
mkdir -p /tmp/digests
DIGEST="${{ steps.build.outputs.digest }}"
Expand Down Expand Up @@ -143,13 +150,11 @@ jobs:
type=raw,value=latest
- name: Create manifest list and push
working-directory: /tmp/digests
shell: bash
run: |
eval "docker buildx imagetools create \
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(jq -cr '.annotations | map("--annotation \"" + . + "\"") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.CONTAINER_IMAGE }}@sha256:%s ' *)"
- name: Inspect image
shell: bash
run: |
docker buildx imagetools inspect ${{ env.CONTAINER_IMAGE }}:${{ steps.meta.outputs.version }}
11 changes: 8 additions & 3 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ on:
- docker/ubuntu/Dockerfile
- test

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

env:
CONTAINER_REGISTRY: ghcr.io
BUILDKIT_PROGRESS: plain
Expand Down Expand Up @@ -112,7 +120,6 @@ jobs:
target: ${{ matrix.os.compiler_name }}
- name: Export digest
if: ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
shell: bash
run: |
mkdir -p /tmp/digests
DIGEST="${{ steps.build.outputs.digest }}"
Expand Down Expand Up @@ -191,13 +198,11 @@ jobs:
type=sha,prefix=${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-sha-
- name: Create manifest list and push
working-directory: /tmp/digests
shell: bash
run: |
eval "docker buildx imagetools create \
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(jq -cr '.annotations | map("--annotation \"" + . + "\"") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.CONTAINER_IMAGE }}@sha256:%s ' *)"
- name: Inspect image
shell: bash
run: |
docker buildx imagetools inspect ${{ env.CONTAINER_IMAGE }}:${{ steps.meta.outputs.version }}
27 changes: 11 additions & 16 deletions docker/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ update-alternatives --install \
update-alternatives --auto cc
update-alternatives --auto gcc
EOF
# Set the compiler environment variables to point to the GCC binaries.
ENV CC=/usr/bin/gcc
ENV CXX=/usr/bin/g++

Expand All @@ -117,10 +118,10 @@ if [[ "${CXX_VER}" != "${GCC_VERSION}" ]]; then
fi
EOF

# Set the Conan home directory, so the users of this image can find the default
# profile.
ENV HOME=/root
WORKDIR ${HOME}

# Set Conan home directory, so the users of this image can find default profile
ENV CONAN_HOME=${HOME}/.conan2

# Create a default Conan profile.
Expand All @@ -129,14 +130,14 @@ conan profile detect
rm -rf /tmp/*
EOF

# Fix the C++ dialect.
RUN sed -i -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
# Explicitly set the compiler flags.
# Explicitly set the compiler flags and the distribution name and version.
RUN <<EOF
cat >> $(conan config home)/global.conf <<EOT
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
tools.info.package_id:confs+=["Debian", "${DEBIAN_VERSION}"]
EOT
EOF

# Print the Conan profile to verify the configuration.
RUN conan profile show

Expand Down Expand Up @@ -178,7 +179,7 @@ update-alternatives --auto cc
update-alternatives --auto clang
update-alternatives --auto llvm-cov
EOF

# Set the compiler environment variables to point to the GCC binaries.
ENV CC=/usr/bin/clang-${CLANG_VERSION}
ENV CXX=/usr/bin/clang++-${CLANG_VERSION}

Expand All @@ -198,10 +199,10 @@ if [[ "${CXX_VER}" != "${CLANG_VERSION}" ]]; then
fi
EOF

# Set the Conan home directory, so the users of this image can find the default
# profile.
ENV HOME=/root
WORKDIR ${HOME}

# Set Conan home directory, so the users of this image can find default profile
ENV CONAN_HOME=${HOME}/.conan2

# Create a default Conan profile.
Expand All @@ -210,17 +211,11 @@ conan profile detect
rm -rf /tmp/*
EOF

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

Expand Down
26 changes: 10 additions & 16 deletions docker/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ update-alternatives \
update-alternatives --auto cc
update-alternatives --auto gcc
EOF
# Set the compiler environment variables to point to the GCC binaries.
ENV CC=/usr/bin/gcc
ENV CXX=/usr/bin/g++

Expand All @@ -83,10 +84,10 @@ if [[ "${CXX_VER}" != "${GCC_VERSION}" ]]; then
fi
EOF

# Set the Conan home directory, so the users of this image can find the default
# profile.
ENV HOME=/root
WORKDIR ${HOME}

# Set Conan home directory, so the users of this image can find default profile
ENV CONAN_HOME=${HOME}/.conan2

# Create a default Conan profile.
Expand All @@ -95,12 +96,11 @@ conan profile detect
rm -rf /tmp/*
EOF

# Fix the C++ dialect.
RUN sed -i -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
# Explicitly set the compiler flags.
# Explicitly set the compiler flags and the distribution name and version.
RUN <<EOF
cat >> $(conan config home)/global.conf <<EOT
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
tools.info.package_id:confs+=["RHEL", "${RHEL_VERSION}"]
EOT
EOF

Expand All @@ -127,7 +127,7 @@ rm -rf /var/cache/dnf/*
update-alternatives --install /usr/bin/cc cc /usr/bin/clang 999
update-alternatives --auto cc
EOF

# Set the compiler environment variables to point to the GCC binaries.
ENV CC=/usr/bin/clang
ENV CXX=/usr/bin/clang++

Expand All @@ -148,10 +148,10 @@ if [[ ${CXX_VER} -lt ${MINIMUM_CLANG_VERSION} ]]; then
fi
EOF

# Set the Conan home directory, so the users of this image can find the default
# profile.
ENV HOME=/root
WORKDIR ${HOME}

# Set Conan home directory, so the users of this image can find default profile
ENV CONAN_HOME=${HOME}/.conan2

# Create a default Conan profile.
Expand All @@ -160,17 +160,11 @@ conan profile detect
rm -rf /tmp/*
EOF

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

Expand Down
26 changes: 10 additions & 16 deletions docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ update-alternatives \
update-alternatives --auto cc
update-alternatives --auto gcc
EOF
# Set the compiler environment variables to point to the GCC binaries.
ENV CC=/usr/bin/gcc
ENV CXX=/usr/bin/g++

Expand All @@ -101,10 +102,10 @@ if [[ "${CXX_VER}" != "${GCC_VERSION}" ]]; then
fi
EOF

# Set the Conan home directory, so the users of this image can find the default
# profile.
ENV HOME=/root
WORKDIR ${HOME}

# Set Conan home directory, so the users of this image can find default profile
ENV CONAN_HOME=${HOME}/.conan2

# Create a default Conan profile.
Expand All @@ -113,12 +114,11 @@ conan profile detect
rm -rf /tmp/*
EOF

# Fix the C++ dialect.
RUN sed -i -e 's|^compiler\.cppstd=.*$|compiler.cppstd=20|' $(conan config home)/profiles/default
# Explicitly set the compiler flags.
# Explicitly set the compiler flags and the distribution name and version.
RUN <<EOF
cat >> $(conan config home)/global.conf <<EOT
tools.build:compiler_executables={"c": "${CC}", "cpp": "${CXX}"}
tools.info.package_id:confs+=["Ubuntu", "${UBUNTU_VERSION}"]
EOT
EOF

Expand Down Expand Up @@ -158,7 +158,7 @@ update-alternatives --auto cc
update-alternatives --auto clang
update-alternatives --auto llvm-cov
EOF

# Set the compiler environment variables to point to the GCC binaries.
ENV CC=/usr/bin/clang-${CLANG_VERSION}
ENV CXX=/usr/bin/clang++-${CLANG_VERSION}

Expand All @@ -178,10 +178,10 @@ if [[ "${CXX_VER}" != "${CLANG_VERSION}" ]]; then
fi
EOF

# Set the Conan home directory, so the users of this image can find the default
# profile.
ENV HOME=/root
WORKDIR ${HOME}

# Set Conan home directory, so the users of this image can find default profile
ENV CONAN_HOME=${HOME}/.conan2

# Create a default Conan profile.
Expand All @@ -190,17 +190,11 @@ conan profile detect
rm -rf /tmp/*
EOF

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

Expand Down