From f3bd86a841c2be303df7dcbbc3f00b54e87f279b Mon Sep 17 00:00:00 2001 From: "James E. King III" Date: Wed, 2 Feb 2022 06:24:58 -0500 Subject: [PATCH] gha multiarch bigendian build support --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++-- ci/build.sh | 4 ++-- ci/common_install.sh | 4 ++-- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f03cc7..a3a48d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,7 +87,12 @@ jobs: # requires two github secrets in repo to activate; see ci/github/coverity.sh # does not run on pull requests, only on pushes into develop and master - { name: Coverity, coverity: yes, - compiler: clang-10, cxxstd: '17', os: ubuntu-20.04 } + compiler: clang-10, cxxstd: '17', os: ubuntu-20.04, ccache: no } + + # multiarch (bigendian testing) - does not support coverage yet + - { name: Big-endian, multiarch: yes, + compiler: clang, cxxstd: '17', os: ubuntu-20.04, ccache: no, distro: fedora, edition: 34, arch: s390x } + timeout-minutes: 120 runs-on: ${{matrix.os}} @@ -109,13 +114,15 @@ jobs: apt-get -o Acquire::Retries=$NET_RETRY_COUNT update apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y g++ python libpython-dev git fi - if [[ "${{ matrix.coverity }}" == "yes" ]]; then + # multiple job types are not compatible with ccache, they use "ccache: no" in the matrix + if [[ "${{ matrix.ccache }}" == "no" ]]; then echo "B2_USE_CCACHE=0" >> $GITHUB_ENV fi git config --global pack.threads 0 - uses: actions/checkout@v2 if: '!matrix.coverage' + - uses: actions/checkout@v2 if: 'matrix.coverage' with: @@ -134,6 +141,7 @@ jobs: repository: boostorg/boost-ci ref: master path: boost-ci-cloned + - name: Get CI scripts folder run: | # Copy ci folder if not testing Boost.CI @@ -178,6 +186,18 @@ jobs: mkdir -p "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET" ln -s "/usr/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}" "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}" + - name: Setup multiarch + if: matrix.multiarch + run: | + sudo apt-get install --no-install-recommends -y binfmt-support qemu-user-static + sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + git clone https://github.com/jeking3/bdde.git + echo "$(pwd)/bdde/bin/linux" >> ${GITHUB_PATH} + echo "BDDE_DISTRO=${{ matrix.distro }}" >> ${GITHUB_ENV} + echo "BDDE_EDITION=${{ matrix.edition }}" >> ${GITHUB_ENV} + echo "BDDE_ARCH=${{ matrix.arch }}" >> ${GITHUB_ENV} + echo "B2_WRAPPER=bdde" >> ${GITHUB_ENV} + - name: Setup Boost env: B2_ADDRESS_MODEL: ${{matrix.address-model}} diff --git a/ci/build.sh b/ci/build.sh index a4f8175..aa9058c 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -1,6 +1,6 @@ #! /bin/bash # -# Copyright 2017 - 2019 James E. King III +# Copyright 2017 - 2022 James E. King III # Distributed under 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) @@ -18,7 +18,7 @@ export UBSAN_OPTIONS=print_stacktrace=1 cd "$BOOST_ROOT" -./b2 ${B2_TARGETS} "${B2_ARGS[@]}" "$@" +${B2_WRAPPER} ./b2 ${B2_TARGETS} "${B2_ARGS[@]}" "$@" if [ "$B2_USE_CCACHE" == "1" ] && command -v ccache &> /dev/null; then echo "CCache summary" diff --git a/ci/common_install.sh b/ci/common_install.sh index 930aef8..00c8cd8 100644 --- a/ci/common_install.sh +++ b/ci/common_install.sh @@ -147,7 +147,7 @@ function show_bootstrap_log if [[ "$B2_DONT_BOOTSTRAP" != "1" ]]; then trap show_bootstrap_log ERR - ./bootstrap.sh + ${B2_WRAPPER} ./bootstrap.sh trap - ERR - ./b2 headers + ${B2_WRAPPER} ./b2 headers fi