From 1de19a4a30542a52e88f8dcb0a89acf450e6a5ae Mon Sep 17 00:00:00 2001 From: "James E. King III" Date: Mon, 27 May 2024 21:04:02 +0000 Subject: [PATCH] Simplify CI script and add alpine images --- .github/workflows/ci.yml | 114 ++++---- Dockerfile.alpine-3.20-x86_64 | 21 ++ Dockerfile.alpine-edge-ppc64le | 20 ++ Dockerfile.alpine.common | 127 +++++++++ ...34.ppc64le => Dockerfile.fedora-34-ppc64le | 2 +- ...ora-34.s390x => Dockerfile.fedora-34-s390x | 2 +- Dockerfile.fedora.common | 254 +++++++----------- ...cal.arm64 => Dockerfile.ubuntu-focal-arm64 | 0 ...ppc64el => Dockerfile.ubuntu-focal-ppc64el | 0 ...cal.s390x => Dockerfile.ubuntu-focal-s390x | 0 ...l.x86_64 => Dockerfile.ubuntu-focal-x86_64 | 0 ...e.x86_64 => Dockerfile.ubuntu-noble-x86_64 | 0 Makefile | 19 +- README.md | 16 +- bin/linux/bdde-build | 2 +- 15 files changed, 361 insertions(+), 216 deletions(-) create mode 100644 Dockerfile.alpine-3.20-x86_64 create mode 100644 Dockerfile.alpine-edge-ppc64le create mode 100644 Dockerfile.alpine.common rename Dockerfile.fedora-34.ppc64le => Dockerfile.fedora-34-ppc64le (89%) rename Dockerfile.fedora-34.s390x => Dockerfile.fedora-34-s390x (89%) rename Dockerfile.ubuntu-focal.arm64 => Dockerfile.ubuntu-focal-arm64 (100%) rename Dockerfile.ubuntu-focal.ppc64el => Dockerfile.ubuntu-focal-ppc64el (100%) rename Dockerfile.ubuntu-focal.s390x => Dockerfile.ubuntu-focal-s390x (100%) rename Dockerfile.ubuntu-focal.x86_64 => Dockerfile.ubuntu-focal-x86_64 (100%) rename Dockerfile.ubuntu-noble.x86_64 => Dockerfile.ubuntu-noble-x86_64 (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ca2d0f..435c65b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,17 +21,22 @@ jobs: packages: write timeout-minutes: 20 + env: + DOCKER_BUILDKIT: 1 + strategy: fail-fast: false matrix: include: - - { distro: fedora, edition: 34, arch: ppc64le } - - { distro: fedora, edition: 34, arch: s390x } - - { distro: ubuntu, edition: focal, arch: arm64 } - - { distro: ubuntu, edition: focal, arch: ppc64el } - - { distro: ubuntu, edition: focal, arch: s390x } - - { distro: ubuntu, edition: focal, arch: x86_64 } - - { distro: ubuntu, edition: noble, arch: x86_64 } + - { dea: alpine-3.20-x86_64, distro: alpine, edition: '3.20', arch: x86_64 } + - { dea: alpine-edge-ppc64le, distro: alpine, edition: edge, arch: ppc64le } + - { dea: fedora-34-ppc64le, distro: fedora, edition: 34, arch: ppc64le } + - { dea: fedora-34-s390x, distro: fedora, edition: 34, arch: s390x } + - { dea: ubuntu-focal-arm64, distro: ubuntu, edition: focal, arch: arm64 } + - { dea: ubuntu-focal-ppc64el, distro: ubuntu, edition: focal, arch: ppc64el } + - { dea: ubuntu-focal-s390x, distro: ubuntu, edition: focal, arch: s390x } + - { dea: ubuntu-focal-x86_64, distro: ubuntu, edition: focal, arch: x86_64 } + - { dea: ubuntu-noble-x86_64, distro: ubuntu, edition: noble, arch: x86_64 } steps: - uses: actions/checkout@v4 @@ -47,9 +52,9 @@ jobs: name=ghcr.io/${{ github.repository }},enable=${{ github.event_name == 'pull_request' && 'true' || 'false' }} name=${{ github.repository }},enable=${{ github.event_name != 'pull_request' && 'true' || 'false' }} tags: | - type=ref,event=pr,prefix=${{ matrix.distro }}-${{ matrix.edition }}-${{ matrix.arch }}-pr. - type=ref,event=tag,enable=${{ github.event.release.prerelease && 'true' || 'false' }},prefix=${{ matrix.distro }}-${{ matrix.edition }}-${{ matrix.arch }}-,suffix=-pre - type=ref,event=tag,enable=${{ github.event.release.prerelease && 'false' || 'true' }},prefix=${{ matrix.distro }}-${{ matrix.edition }}-${{ matrix.arch }}- + type=ref,event=pr,prefix=${{ matrix.dea }}-pr. + type=ref,event=tag,enable=${{ github.event.release.prerelease && 'true' || 'false' }},prefix=${{ matrix.dea }}-,suffix=-pre + type=ref,event=tag,enable=${{ github.event.release.prerelease && 'false' || 'true' }},prefix=${{ matrix.dea }}- - uses: docker/setup-qemu-action@v3 @@ -73,19 +78,18 @@ jobs: - uses: docker/build-push-action@v5 with: context: . - file: Dockerfile.${{ matrix.distro }}-${{ matrix.edition }}.${{ matrix.arch }} + file: Dockerfile.${{ matrix.dea }} push: true annotations: ${{ steps.meta.outputs.annotations }} labels: ${{ steps.meta.outputs.labels }} tags: ${{ steps.meta.outputs.tags }} - cache-from: type=gha,scope=${{ matrix.distro }}-${{ matrix.edition }}.${{ matrix.arch }} - cache-to: type=gha,mode=max,scope=${{ matrix.distro }}-${{ matrix.edition }}.${{ matrix.arch }} + cache-from: type=gha,scope=${{ matrix.dea }} + cache-to: type=gha,mode=max,scope=${{ matrix.dea }} cache: # cache the boost sources clone because they are used many times over if: github.event_name == 'pull_request' || github.event.release.prerelease name: Cache Boost Sources - needs: build runs-on: ubuntu-latest timeout-minutes: 10 @@ -114,7 +118,9 @@ jobs: test: if: github.event_name == 'pull_request' || github.event.release.prerelease - needs: cache + needs: + - build + - cache runs-on: ubuntu-latest permissions: packages: read @@ -123,39 +129,45 @@ jobs: strategy: fail-fast: false matrix: - distro: - - fedora - - ubuntu - edition: - - 34 - - focal - - noble - arch: - - arm64 - - ppc64el - - ppc64le - - s390x - - x86_64 + dea: + - alpine-3.20-x86_64 + - alpine-edge-ppc64le + - fedora-34-ppc64le + - fedora-34-s390x + - ubuntu-focal-arm64 + - ubuntu-focal-ppc64el + - ubuntu-focal-s390x + - ubuntu-focal-x86_64 + - ubuntu-noble-x86_64 toolset: - clang - gcc stdlib: - libc++ - native + include: + # alpine uses musl for libc, and the sanitizers do not support it + # asan and tsan were not working on s390x and ppc64, and were disabled + # ubuntu focal's tsan is busted: https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/2029910 + # building everything in emulation can take over 45 minutes + - { dea: alpine-3.20-x86_64, distro: alpine, edition: '3.20', arch: x86_64, asan: false, tsan: false, ubsan: false, valgrind: true, buildall: true } + - { dea: alpine-edge-ppc64le, distro: alpine, edition: edge, arch: ppc64le, asan: false, tsan: false, ubsan: false, valgrind: true, buildall: false } + - { dea: fedora-34-ppc64le, distro: fedora, edition: 34, arch: ppc64le, asan: false, tsan: false, ubsan: true , valgrind: true, buildall: false } + - { dea: fedora-34-s390x, distro: fedora, edition: 34, arch: s390x, asan: false, tsan: false, ubsan: true , valgrind: true, buildall: false } + - { dea: ubuntu-focal-arm64, distro: ubuntu, edition: focal, arch: arm64, asan: false, tsan: false, ubsan: true , valgrind: true, buildall: false } + - { dea: ubuntu-focal-ppc64el, distro: ubuntu, edition: focal, arch: ppc64el, asan: false, tsan: false, ubsan: true , valgrind: true, buildall: false } + - { dea: ubuntu-focal-s390x, distro: ubuntu, edition: focal, arch: s390x, asan: false, tsan: false, ubsan: true , valgrind: true, buildall: false } + - { dea: ubuntu-focal-x86_64, distro: ubuntu, edition: focal, arch: x86_64, asan: true, tsan: false, ubsan: true , valgrind: true, buildall: true } + - { dea: ubuntu-noble-x86_64, distro: ubuntu, edition: noble, arch: x86_64, asan: true, tsan: true, ubsan: true , valgrind: true, buildall: true } exclude: - - { distro: fedora, edition: focal } - - { distro: fedora, edition: noble } - - { distro: fedora, edition: 34, arch: arm64 } - - { distro: fedora, edition: 34, arch: ppc64el } - - { distro: fedora, edition: 34, arch: x86_64 } - - { distro: ubuntu, edition: 34 } - - { distro: ubuntu, edition: focal, arch: ppc64le } - - { distro: ubuntu, edition: noble, arch: arm64 } - - { distro: ubuntu, edition: noble, arch: ppc64el } - - { distro: ubuntu, edition: noble, arch: ppc64le } - - { distro: ubuntu, edition: noble, arch: s390x } - # undefined reference to std::lock_guard::lock_guard(std::mutex&) - - { distro: ubuntu, edition: focal, arch: s390x, toolset: clang } + # undefined reference to std::lock_guard::lock_guard(std::mutex&) (missing a package?) + - { dea: ubuntu-focal-s390x, toolset: clang } + - { dea: ubuntu-focal-s390x, stdlib: libc++ } + # alpine uses musl, we're only supporting that for now as missing errors were occurring + - { dea: alpine-3.20-x86_64, toolset: clang } + - { dea: alpine-3.20-x86_64, stdlib: libc++ } + - { dea: alpine-edge-ppc64le, toolset: clang } + - { dea: alpine-edge-ppc64le, stdlib: libc++ } env: BDDE_DISTRO: ${{ matrix.distro }} @@ -177,9 +189,9 @@ jobs: name=ghcr.io/${{ github.repository }},enable=${{ github.event_name == 'pull_request' && 'true' || 'false' }} name=${{ github.repository }},enable=${{ github.event_name != 'pull_request' && 'true' || 'false' }} tags: | - type=ref,event=pr,prefix=${{ matrix.distro }}-${{ matrix.edition }}-${{ matrix.arch }}-pr. - type=ref,event=tag,enable=${{ github.event.release.prerelease && 'true' || 'false' }},prefix=${{ matrix.distro }}-${{ matrix.edition }}-${{ matrix.arch }}-,suffix=-pre - type=ref,event=tag,enable=${{ github.event.release.prerelease && 'false' || 'true' }},prefix=${{ matrix.distro }}-${{ matrix.edition }}-${{ matrix.arch }}- + type=ref,event=pr,prefix=${{ matrix.dea }}-pr. + type=ref,event=tag,enable=${{ github.event.release.prerelease && 'true' || 'false' }},prefix=${{ matrix.dea }}-,suffix=-pre + type=ref,event=tag,enable=${{ github.event.release.prerelease && 'false' || 'true' }},prefix=${{ matrix.dea }}- - uses: docker/setup-qemu-action@v3 @@ -241,26 +253,26 @@ jobs: find ../../../bin.v2/libs/predef/test/info_as_cpp.test/ -name info_as_cpp.run -exec cat {} \; - name: bdde-asan + if: matrix.asan working-directory: ${{ env.BOOST_ROOT }}/libs/format - if: matrix.arch == 'x86_64' run: bdde-asan ${{ env.B2_ARGS }} - name: bdde-tsan + if: matrix.tsan working-directory: ${{ env.BOOST_ROOT }}/libs/format - # https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/2029910: focal's busted so only run on noble - if: matrix.arch == 'x86_64' && matrix.edition == 'noble' run: bdde-tsan ${{ env.B2_ARGS }} - name: bdde-ubsan + if: matrix.ubsan working-directory: ${{ env.BOOST_ROOT }}/libs/format run: bdde-ubsan ${{ env.B2_ARGS }} - name: bdde-valgrind + if: matrix.valgrind working-directory: ${{ env.BOOST_ROOT }}/libs/format - if: matrix.arch == 'x86_64' - run: bdde-ubsan ${{ env.B2_ARGS }} + run: bdde-valgrind ${{ env.B2_ARGS }} - - name: Build all + - name: Build everything + if: matrix.buildall working-directory: ${{ env.BOOST_ROOT }} - if: matrix.arch == 'x86_64' run: bdde b2 ${{ env.B2_ARGS }} diff --git a/Dockerfile.alpine-3.20-x86_64 b/Dockerfile.alpine-3.20-x86_64 new file mode 100644 index 0000000..3872ada --- /dev/null +++ b/Dockerfile.alpine-3.20-x86_64 @@ -0,0 +1,21 @@ +# syntax = edrevo/dockerfile-plus +# +# Copyright (c) 2018 - 2024 James E. King III +# +# Use, modification, and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +# +# Boost Docker Development Environment +# Requires DOCKER_BUILDKIT=1 (set by bdde-build) +# + +FROM alpine:3.20 + +LABEL BDDE_ARCH="x86_64" +LABEL BDDE_DISTRO="alpine" +LABEL BDDE_EDITION="3.20" + +INCLUDE+ Dockerfile.common +INCLUDE+ Dockerfile.alpine.common +INCLUDE+ Dockerfile.user diff --git a/Dockerfile.alpine-edge-ppc64le b/Dockerfile.alpine-edge-ppc64le new file mode 100644 index 0000000..f17ba71 --- /dev/null +++ b/Dockerfile.alpine-edge-ppc64le @@ -0,0 +1,20 @@ +# syntax = edrevo/dockerfile-plus +# +# Copyright (c) 2018 - 2024 James E. King III +# +# Use, modification, and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +# +# Boost Docker Development Environment +# + +FROM multiarch/alpine:ppc64le-edge + +LABEL BDDE_ARCH="ppc64le" +LABEL BDDE_DISTRO="alpine" +LABEL BDDE_EDITION="edge" + +INCLUDE+ Dockerfile.common +INCLUDE+ Dockerfile.alpine.common +INCLUDE+ Dockerfile.user diff --git a/Dockerfile.alpine.common b/Dockerfile.alpine.common new file mode 100644 index 0000000..8041037 --- /dev/null +++ b/Dockerfile.alpine.common @@ -0,0 +1,127 @@ +# +# Copyright (c) 2018 - 2024 James E. King III +# +# Use, modification, and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +# +# Boost Docker Development Environment +# +# Common alpine family commands to install necessary files. +# + +ENV CONTAINER_USER=boost + +RUN apk add --no-interactive \ + bzip2 \ + clang \ + cmake \ + cppcheck \ + curl \ + file \ + g++ \ + gdb \ + git \ + lcov \ + libc++-dev \ + linux-headers \ + make \ + shadow \ + sudo \ + which \ + unzip \ + valgrind \ + vim \ + wget + +################################################################# +## Boost Library Dependencies +## Do not "de-dupe" - this is a canonical list of dependencies! +################################################################# + +# asio +RUN apk add --no-interactive \ + openssl-dev + +# beast +RUN apk add --no-interactive \ + openssl-dev \ + zlib-dev + +# gil +RUN apk add --no-interactive \ + jpeg \ + libpng-dev \ + tiff \ + zlib-dev + +# integer +RUN apk add --no-interactive \ + gmp-dev + +# interval (for one disabled example) +RUN apk add --no-interactive \ + gmp-dev \ + mpfr-dev + +# iostreams +RUN apk add --no-interactive \ + libbz2 \ + xz-dev \ + zlib-dev \ + zstd-dev + +# locale +RUN apk add --no-interactive \ + icu-dev + +# mpi +RUN apk add --no-interactive \ + openmpi-dev + +# python +RUN apk add --no-interactive \ + python3-dev + +# stacktrace +RUN mkdir /usr/local/src && \ + cd /usr/local/src && \ + git clone https://github.com/ianlancetaylor/libbacktrace.git && \ + cd libbacktrace && \ + ./configure && \ + make -j3 install && \ + cd .. && \ + rm -rf libbacktrace + +# sync +# pthread-win32, but not on Unix + +# thread +# pthread-win32, but not on Unix + +################################################################# +# Prerequisites for boostbook (does what setup_boostbook.sh does) +# for documentation builds to work + +RUN apk add --no-interactive \ + libxslt-dev \ + doxygen \ + openjdk11-jre-headless + +RUN cd /opt && \ + wget --quiet http://sourceforge.net/projects/docbook/files/docbook-xsl/1.75.2/docbook-xsl-1.75.2.tar.gz && \ + tar xzf docbook-xsl-1.75.2.tar.gz && \ + rm docbook-xsl-1.75.2.tar.gz + +RUN cd /opt && \ + mkdir docbook-dtd-4.2 && \ + cd docbook-dtd-4.2 && \ + wget --quiet http://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip && \ + unzip -q docbook-xml-4.2.zip && \ + rm docbook-xml-4.2.zip + +RUN cd /opt && \ + wget --quiet http://archive.apache.org/dist/xmlgraphics/fop/binaries/fop-0.94-bin-jdk1.4.tar.gz && \ + tar xzf fop-0.94-bin-jdk1.4.tar.gz && \ + rm fop-0.94-bin-jdk1.4.tar.gz + diff --git a/Dockerfile.fedora-34.ppc64le b/Dockerfile.fedora-34-ppc64le similarity index 89% rename from Dockerfile.fedora-34.ppc64le rename to Dockerfile.fedora-34-ppc64le index a66a884..2355ab4 100644 --- a/Dockerfile.fedora-34.ppc64le +++ b/Dockerfile.fedora-34-ppc64le @@ -6,7 +6,7 @@ # Boost Software License, Version 1.0. (See accompanying file # LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # -# Boost Docker Development Environment for Big Endian +# Boost Docker Development Environment # FROM multiarch/fedora:34-ppc64le diff --git a/Dockerfile.fedora-34.s390x b/Dockerfile.fedora-34-s390x similarity index 89% rename from Dockerfile.fedora-34.s390x rename to Dockerfile.fedora-34-s390x index d2b0b59..fe4c3fa 100644 --- a/Dockerfile.fedora-34.s390x +++ b/Dockerfile.fedora-34-s390x @@ -6,7 +6,7 @@ # Boost Software License, Version 1.0. (See accompanying file # LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # -# Boost Docker Development Environment for Big Endian +# Boost Docker Development Environment # FROM multiarch/fedora:34-s390x diff --git a/Dockerfile.fedora.common b/Dockerfile.fedora.common index 8015280..85a9dc5 100644 --- a/Dockerfile.fedora.common +++ b/Dockerfile.fedora.common @@ -1,5 +1,5 @@ # -# Copyright (c) 2018 - 2022 James E. King III +# Copyright (c) 2018 - 2024 James E. King III # # Use, modification, and distribution are subject to the # Boost Software License, Version 1.0. (See accompanying file @@ -14,161 +14,115 @@ ENV CONTAINER_USER=boost RUN dnf groupinstall -y 'Development Tools' RUN dnf install -y \ + bzip2 \ clang \ cmake \ cppcheck \ + curl \ + file \ gcc-c++ \ gdb \ + git \ + lcov \ + libcxx \ + libcxx-devel \ + libcxxabi-devel \ libxslt \ sudo \ util-linux-user \ + unzip \ which \ - valgrind - -### late additions to avoid huge rebuilds, consolidate on next big release - -RUN dnf install -y libcxx libcxx-devel libcxxabi-devel -RUN dnf install -y lcov - -# the following stuff hasn't been fully translated to redhat/fedora-speak yet - -# Load apt-utils first, fixes warnings -# -# RUN apt-get update && \ -# apt-get install -y --no-install-recommends \ -# apt-utils -# -# # Basic utilities -# -# RUN apt-get install -y --no-install-recommends \ -# bash-completion \ -# bzip2 \ -# ca-certificates \ -# curl \ -# file \ -# git \ -# gpg-agent \ -# patch \ -# procps \ -# software-properties-common \ -# sudo \ -# unzip \ -# vim \ -# wget -# -# # Hook in the Ubuntu PPA Repositories -# RUN add-apt-repository ppa:ubuntu-toolchain-r/test && \ -# apt-get update -# -# # C++ -# -# RUN apt-get install -y \ -# build-essential \ -# clang++ \ -# cmake \ -# g++-7 \ -# g++-9 \ -# gdb \ -# libc++-dev \ -# libubsan1-dbg \ -# valgrind -# # clang \ -# # clang++-6 \ -# # g++-5 \ -# # g++-6 \ -# # g++-8 \ -# # lcov \ -# # libc++-helpers \ -# # libstdc++6-8-dbg \ -# -# ################################################################# -# ## Boost Library Dependencies -# ## Do not "de-dupe" - this is a canonical list of dependencies! -# ################################################################# -# -# # asio -# RUN apt-get install -y --no-install-recommends \ -# libssl-dev -# -# # beast -# RUN apt-get install -y --no-install-recommends \ -# libssl-dev \ -# zlib1g-dev -# -# # gil -# RUN apt-get install -y --no-install-recommends \ -# libjpeg-dev \ -# libpng-dev \ -# libtiff-dev \ -# zlib1g-dev -# -# # integer -# RUN apt-get install -y --no-install-recommends \ -# libgmp-dev -# -# # interval (for one disabled example) -# RUN apt-get install -y --no-install-recommends \ -# libgmp-dev \ -# libmpfr-dev -# -# # iostreams -# RUN apt-get install -y --no-install-recommends \ -# libbz2-dev \ -# liblzma-dev \ -# libzstd-dev \ -# zlib1g-dev -# -# # locale -# RUN apt-get install -y --no-install-recommends \ -# libicu-dev -# -# # mpi -# # RUN apt-get install -y --no-install-recommends \ -# # libopenmpi-dev -# -# # python -# RUN apt-get install -y --no-install-recommends \ -# python3-dev -# -# # stacktrace -# RUN cd /usr/local/src && \ -# git clone https://github.com/ianlancetaylor/libbacktrace.git && \ -# cd libbacktrace && \ -# ./configure && \ -# make -j3 install && \ -# cd .. && \ -# rm -rf libbacktrace -# -# # sync -# # pthread-win32, but not on Unix -# -# # thread -# # pthread-win32, but not on Unix -# -# ################################################################# -# # Prerequisites for boostbook (does what setup_boostbook.sh does) -# # for documentation builds to work -# # -# RUN apt-get install -y --no-install-recommends \ -# xsltproc \ -# doxygen -# # openjdk-11-jre-headless (fails system call issue in docker env) -# # -# # RUN cd /opt && \ -# # wget --quiet http://sourceforge.net/projects/docbook/files/docbook-xsl/1.75.2/docbook-xsl-1.75.2.tar.gz && \ -# # tar xzf docbook-xsl-1.75.2.tar.gz && \ -# # rm docbook-xsl-1.75.2.tar.gz -# # -# # RUN cd /opt && \ -# # mkdir docbook-dtd-4.2 && \ -# # cd docbook-dtd-4.2 && \ -# # wget --quiet http://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip && \ -# # unzip -q docbook-xml-4.2.zip && \ -# # rm docbook-xml-4.2.zip -# # -# # RUN cd /opt && \ -# # wget --quiet http://archive.apache.org/dist/xmlgraphics/fop/binaries/fop-0.94-bin-jdk1.4.tar.gz && \ -# # tar xzf fop-0.94-bin-jdk1.4.tar.gz && \ -# # rm fop-0.94-bin-jdk1.4.tar.gz -# # -# + valgrind \ + vim \ + wget + +################################################################# +## Boost Library Dependencies +## Do not "de-dupe" - this is a canonical list of dependencies! +################################################################# + +# asio +RUN dnf install -y \ + openssl-devel + +# beast +RUN dnf install -y \ + openssl-devel \ + zlib-devel + +# gil +RUN dnf install -y \ + libjpeg-devel \ + libpng-devel \ + libtiff-devel \ + zlib-devel + +# integer +RUN dnf install -y \ + gmp-devel + +# interval (for one disabled example) +RUN dnf install -y \ + gmp-devel \ + mpfr-devel + +# iostreams +RUN dnf install -y \ + bzip2-devel \ + xz-devel \ + zlib-devel \ + libzstd-devel + +# locale +RUN dnf install -y \ + libicu-devel + +# mpi +RUN dnf install -y \ + openmpi-devel + +# python +RUN dnf install -y \ + python3-devel + +# stacktrace +RUN mkdir -p /usr/local/src && \ + cd /usr/local/src && \ + git clone https://github.com/ianlancetaylor/libbacktrace.git && \ + cd libbacktrace && \ + ./configure && \ + make -j3 install && \ + cd .. && \ + rm -rf libbacktrace + +# sync +# pthread-win32, but not on Unix + +# thread +# pthread-win32, but not on Unix + +################################################################# +# Prerequisites for boostbook (does what setup_boostbook.sh does) +# for documentation builds to work + +RUN dnf install -y \ + libxslt-devel \ + doxygen \ + java-11-openjdk-headless + +RUN cd /opt && \ + wget --quiet http://sourceforge.net/projects/docbook/files/docbook-xsl/1.75.2/docbook-xsl-1.75.2.tar.gz && \ + tar xzf docbook-xsl-1.75.2.tar.gz && \ + rm docbook-xsl-1.75.2.tar.gz + +RUN cd /opt && \ + mkdir docbook-dtd-4.2 && \ + cd docbook-dtd-4.2 && \ + wget --quiet http://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip && \ + unzip -q docbook-xml-4.2.zip && \ + rm docbook-xml-4.2.zip + +RUN cd /opt && \ + wget --quiet http://archive.apache.org/dist/xmlgraphics/fop/binaries/fop-0.94-bin-jdk1.4.tar.gz && \ + tar xzf fop-0.94-bin-jdk1.4.tar.gz && \ + rm fop-0.94-bin-jdk1.4.tar.gz diff --git a/Dockerfile.ubuntu-focal.arm64 b/Dockerfile.ubuntu-focal-arm64 similarity index 100% rename from Dockerfile.ubuntu-focal.arm64 rename to Dockerfile.ubuntu-focal-arm64 diff --git a/Dockerfile.ubuntu-focal.ppc64el b/Dockerfile.ubuntu-focal-ppc64el similarity index 100% rename from Dockerfile.ubuntu-focal.ppc64el rename to Dockerfile.ubuntu-focal-ppc64el diff --git a/Dockerfile.ubuntu-focal.s390x b/Dockerfile.ubuntu-focal-s390x similarity index 100% rename from Dockerfile.ubuntu-focal.s390x rename to Dockerfile.ubuntu-focal-s390x diff --git a/Dockerfile.ubuntu-focal.x86_64 b/Dockerfile.ubuntu-focal-x86_64 similarity index 100% rename from Dockerfile.ubuntu-focal.x86_64 rename to Dockerfile.ubuntu-focal-x86_64 diff --git a/Dockerfile.ubuntu-noble.x86_64 b/Dockerfile.ubuntu-noble-x86_64 similarity index 100% rename from Dockerfile.ubuntu-noble.x86_64 rename to Dockerfile.ubuntu-noble-x86_64 diff --git a/Makefile b/Makefile index d5a5644..a386a5a 100644 --- a/Makefile +++ b/Makefile @@ -15,22 +15,29 @@ all: images # tests (not working yet) # define make-targets -$(eval WORDS = $(subst -, ,$(subst ., ,$1))) -$(eval DISTRO = $(word 2, $(WORDS))) -$(eval EDITION = $(word 3, $(WORDS))) -$(eval ARCH = $(word 4, $(WORDS))) -$(info discovered target $(DISTRO)-$(EDITION)-$(ARCH)) +$(eval WORDS = $(subst -, , $1)) +$(eval DDISTRO = $(word 1, $(WORDS))) +$(eval DISTRO = $(word 2, $(subst ., , $(DDISTRO)))) +$(eval EDITION = $(word 2, $(WORDS))) +$(eval ARCH = $(word 3, $(WORDS))) image-$(DISTRO)-$(EDITION)-$(ARCH): BDDE_DISTRO=$(DISTRO) BDDE_EDITION=$(EDITION) BDDE_ARCH=$(ARCH) bin/linux/bdde-build images:: image-$(DISTRO)-$(EDITION)-$(ARCH) +info-$(DISTRO)-$(EDITION)-$(ARCH): + BDDE_DISTRO=$(DISTRO) BDDE_EDITION=$(EDITION) BDDE_ARCH=$(ARCH) bin/linux/bdde 'clang --version && gcc --version && cmake --version && cppcheck --version && valgrind --version' +run-$(DISTRO)-$(EDITION)-$(ARCH): + BDDE_DISTRO=$(DISTRO) BDDE_EDITION=$(EDITION) BDDE_ARCH=$(ARCH) bin/linux/bdde test-$(DISTRO)-$(EDITION)-$(ARCH): image-$(DISTRO)-$(EDITION)-$(ARCH) BDDE_DISTRO=$(DISTRO) BDDE_EDITION=$(EDITION) BDDE_ARCH=$(ARCH) bdde ./bootstrap.sh BDDE_DISTRO=$(DISTRO) BDDE_EDITION=$(EDITION) BDDE_ARCH=$(ARCH) bdde b2 lib/format tests:: test-$(DISTRO)-$(EDITION)-$(ARCH) +$(info created 'image-', 'info-', 'run-', and 'test-' targets for $(DISTRO)-$(EDITION)-$(ARCH)) endef -DOCKERFILES = $(notdir $(wildcard $(PWD)/Dockerfile.[a-z0-9]*-[a-z0-9]*.[a-z0-9]*)) +DOCKERFILES = $(notdir $(wildcard $(PWD)/Dockerfile.[a-z0-9]*-[a-z0-9]*-[a-z0-9]*)) $(foreach DOCKERFILE,$(DOCKERFILES),$(eval $(call make-targets,$(DOCKERFILE)))) +$(info created group target 'images') +$(info created group target 'tests') # unit tests for some shell code; not much to this... test-bash: diff --git a/README.md b/README.md index 129a87b..55eb401 100644 --- a/README.md +++ b/README.md @@ -3,17 +3,17 @@ Provides a docker container for development of Boost that is easy to use and accelerates development, testing, and debugging: -- Containers marked 'complete' include all optional dependencies for boost - to build completely. -- Multiarch containers allow you to build and test easily against other - architectures. +- Containers marked 'complete' include all optional dependencies for boost to build completely. +- Multiarch containers allow you to build and test easily against other architectures. Supported combinations of architecture and OS: | DEFAULT | DISTRO | EDITION | ARCH | Endian | Complete? | Clang | GCC | CMake | Cppcheck | Valgrind | | ------- | ------ | ------- | ------- | ------ | --------- | ----- | --- | ----- | -------- | -------- | -| | fedora | 34 | ppc64le | little | No | 12.0 | 11.2 | 3.20 | 2.6 | 3.18 | -| | fedora | 34 | s390x | big | No | 12.0 | 11.2 | 3.20 | 2.6 | 3.18 | +| | alpine | 3_20 | x86_64 | little | Yes | 17.0 | 13.2 | 3.29 | 2.14 | 3.23 | +| | alpine | 3_20 | ppc64le | little | Yes | 17.0 | 13.2 | 3.29 | 2.14 | 3.23 | +| | fedora | 34 | ppc64le | little | Yes | 12.1 | 11.3 | 3.20 | 2.6 | 3.18 | +| | fedora | 34 | s390x | big | Yes | 12.1 | 11.3 | 3.20 | 2.6 | 3.18 | | | ubuntu | focal | arm64 | little | Yes | 10.0 | 9.4 | 3.16 | 1.90 | 3.15 | | | ubuntu | focal | ppc64el | little | Yes | 10.0 | 9.4 | 3.16 | 1.90 | 3.15 | | | ubuntu | focal | s390x | big | Yes | 10.0 | 9.4 | 3.16 | 1.90 | 3.15 | @@ -27,6 +27,10 @@ you must satisfy the prerequisites of running a 1. Install the binfmt-support and qemu-user-static packages. 2. Run `docker run --rm --privileged multiarch/qemu-user-static --reset -p yes` or run `bdde-multiarch`. +Due to the performance decrease when running multiarch emulation, the CI script does not attempt +to run asan, tsan, ubsan, or build all of boost on every platform. There may be missing packages +for specific libraries on some packages. Add an issue in GitHub if you find one. + ## Tag naming convention This project uses the form --- to tag images. diff --git a/bin/linux/bdde-build b/bin/linux/bdde-build index 8eb3c8e..b23baeb 100755 --- a/bin/linux/bdde-build +++ b/bin/linux/bdde-build @@ -19,4 +19,4 @@ if [ ! -z "${BDDE_REBUILD}" ]; then fi set -x -docker build ${DOCKER_CACHE_OPTION} -t ${BDDE_IMAGE} -f Dockerfile.${BDDE_DISTRO}-${BDDE_EDITION}.${BDDE_ARCH} . +docker build ${DOCKER_CACHE_OPTION} -t ${BDDE_IMAGE} -f Dockerfile.${BDDE_DISTRO}-${BDDE_EDITION}-${BDDE_ARCH} .