diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 42da891..fbfeeff 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -13,8 +13,19 @@ jobs: # Building Dev Image # =============================================================== build_dev: - runs-on: ubuntu-latest + strategy: + matrix: + # Test of these containers + include: + - container: "alpine-dev:latest" + file: alpine-dev.Dockerfile + - container: "ubuntu-dev:20" + file: u20.04-dev.Dockerfile + - container: "ubuntu-dev:22" + file: u22.04-dev.Dockerfile + - container: "fedora:30" + file: "fedora30-dev.Dockerfile" steps: - name: checkout uses: actions/checkout@v3 @@ -41,34 +52,12 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - - name: Build ubuntu-dev:20 - uses: docker/build-push-action@v4 - with: - context: . - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} - tags: | - ghcr.io/${{ github.actor }}/ubuntu-dev:20 - file: u20.04-dev.Dockerfile - - - - name: Build ubuntu-dev:22 - uses: docker/build-push-action@v4 - with: - context: . - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} - tags: | - ghcr.io/${{ github.actor }}/ubuntu-dev:22 - file: u22.04-dev.Dockerfile - - - - name: Build alpine-dev + name: Build uses: docker/build-push-action@v4 with: context: . platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: | - ghcr.io/${{ github.actor }}/alpine-dev:latest - file: alpine-dev.Dockerfile + ghcr.io/${{ github.actor }}/${{ matrix.container }} + file: ${{ matrix.file }} \ No newline at end of file diff --git a/fedora30-dev.Dockerfile b/fedora30-dev.Dockerfile new file mode 100644 index 0000000..f8336fb --- /dev/null +++ b/fedora30-dev.Dockerfile @@ -0,0 +1,13 @@ +# syntax=docker/dockerfile:1 +FROM fedora:30 + +COPY ./install_boost.sh /tmp/ + +RUN dnf install -y automake gcc-c++ git cmake libtool make ninja-build \ + openssl-devel libunwind-devel autoconf-archive patch wget bzip2 \ + openssl-static zlib-devel + +RUN dnf install -y bison libzstd-static --releasever=32 \ + && dnf clean all && rm -rf /var/cache/yum + +RUN /tmp/install_boost.sh \ No newline at end of file diff --git a/install_boost.sh b/install_boost.sh new file mode 100755 index 0000000..5c922cf --- /dev/null +++ b/install_boost.sh @@ -0,0 +1,37 @@ +#!/bin/bash +set -ex + +BVER=1.74.0 +BOOST=boost_${BVER//./_} # replace all . with _ + +# For sake of boost install we always use g++. +export CXX=g++ + +install_boost() { + mkdir -p /tmp/boost && pushd /tmp/boost + if ! [ -d $BOOST ]; then + url="https://boostorg.jfrog.io/artifactory/main/release/${BVER}/source/$BOOST.tar.bz2" + echo "Downloading from $url" + if ! [ -e $BOOST.tar.bz2 ]; then wget -nv ${url} -O $BOOST.tar.bz2; fi + + tar -xjf $BOOST.tar.bz2 + fi + + booststap_arg="--without-libraries=graph_parallel,graph,wave,test,mpi,python,fiber,filesystem" + cd $BOOST + boostrap_cmd=`readlink -f bootstrap.sh` + + echo "CXX compiler ${CXX}" + echo "Running ${boostrap_cmd} ${booststap_arg}" + ${boostrap_cmd} ${booststap_arg} || { cat bootstrap.log; return 1; } + b2_args=(define=BOOST_COROUTINES_NO_DEPRECATION_WARNING=1 link=static variant=release + threading=multi --without-test --without-math --without-log --without-locale --without-graph --without-wave --without-mpi --without-python --without-fiber --without-filesystem --without-iostreams --without-serialization --without-chrono --without-timer --without-regex -j4) + + echo "Building targets with ${b2_args[@]}" + ./b2 "${b2_args[@]}" cxxflags='-std=c++14 -Wno-deprecated-declarations' + ./b2 install "${b2_args[@]}" -d0 + popd + rm -rf /tmp/boost +} + +install_boost \ No newline at end of file diff --git a/u20.04-dev.Dockerfile b/u20.04-dev.Dockerfile index a1b6878..74fe688 100644 --- a/u20.04-dev.Dockerfile +++ b/u20.04-dev.Dockerfile @@ -12,7 +12,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt update RUN apt install -y autoconf-archive bison cmake curl gdb git libssl-dev \ libunwind-dev libfl-dev ninja-build libtool redis wget \ - gcc-9 g++-9 libboost-fiber-dev libboost-context-dev libxml2-dev zip ccache libzstd-dev \ + gcc-9 g++-9 libboost-context-dev zip ccache libzstd-dev \ debhelper moreutils pip jq lsof lcov \ && rm -rf /var/lib/apt/lists/*