From 34098f5b52a5864e4afcdcf24ed62ad71a4e9487 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 13 Feb 2025 09:48:03 +0100 Subject: [PATCH] Update from Boost.CI --- .github/workflows/ci.yml | 51 ++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ae1aba2..890f857a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,7 +79,6 @@ jobs: defaults: run: shell: bash - strategy: fail-fast: false matrix: @@ -114,11 +113,12 @@ jobs: - { compiler: clang-5.0, cxxstd: '11,14,1z', os: ubuntu-latest, container: 'ubuntu:18.04' } - { compiler: clang-6.0, cxxstd: '11,14,17', os: ubuntu-latest, container: 'ubuntu:20.04' } - { compiler: clang-7, cxxstd: '11,14,17', os: ubuntu-latest, container: 'ubuntu:20.04' } - - { compiler: clang-8, cxxstd: '11,14,17,2a', os: ubuntu-latest, container: 'ubuntu:20.04' } + # Note: clang-8 does not fully support C++20, so it is not compatible with some libstdc++ versions in this mode + - { compiler: clang-8, cxxstd: '11,14,17', os: ubuntu-latest, container: 'ubuntu:20.04' } - { compiler: clang-9, cxxstd: '11,14,17,2a', os: ubuntu-latest, container: 'ubuntu:20.04' } - { compiler: clang-10, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:20.04' } - - { compiler: clang-11, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:22.04' } - - { compiler: clang-12, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:22.04' } + - { compiler: clang-11, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:20.04' } + - { compiler: clang-12, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:20.04' } - { compiler: clang-13, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:22.04' } - { compiler: clang-14, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:22.04' } - { compiler: clang-15, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:22.04' } @@ -129,9 +129,10 @@ jobs: compiler: clang-18, cxxstd: '20', os: ubuntu-24.04, variant: debug, link: static } # libc++ - - { compiler: clang-6.0, cxxstd: '11,14', os: ubuntu-22.04, container: 'ubuntu:18.04', stdlib: libc++, install: 'clang-6.0 libc++-dev libc++abi-dev' } + - { compiler: clang-6.0, cxxstd: '11,14', os: ubuntu-latest, container: 'ubuntu:18.04', stdlib: libc++, install: 'clang-6.0 libc++-dev libc++abi-dev' } + - { compiler: clang-12, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:20.04', stdlib: libc++ } - { name: Clang w/ sanitizers, sanitize: yes, - compiler: clang-12, cxxstd: '11,14,17,20', os: ubuntu-22.04, stdlib: libc++, install: 'clang-12 libc++-12-dev libc++abi-12-dev' } + compiler: clang-17, cxxstd: '11,14,17,20', os: ubuntu-latest, container: 'ubuntu:24.04', stdlib: libc++ } # OSX, clang - { name: MacOS w/ clang and sanitizers, @@ -157,9 +158,9 @@ jobs: fi if [ -n "${{matrix.container}}" ] && [ -f "/etc/debian_version" ]; then apt-get -o Acquire::Retries=$NET_RETRY_COUNT update - apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y sudo software-properties-common curl + apt-get -o Acquire::Retries=$NET_RETRY_COUNT -y -q --no-install-suggests --no-install-recommends install sudo software-properties-common curl # Need (newer) git, and the older Ubuntu container may require requesting the key manually using port 80 - curl -sSL --retry ${NET_RETRY_COUNT:-5} 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xE1DD270288B4E6030699E45FA1715D88E1DF1F24' | sudo gpg --dearmor > /etc/apt/trusted.gpg.d/git-core_ubuntu_ppa.gpg + curl -sSL --retry ${NET_RETRY_COUNT:-5} 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xE1DD270288B4E6030699E45FA1715D88E1DF1F24' | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/git-core_ubuntu_ppa.gpg for i in {1..${NET_RETRY_COUNT:-3}}; do sudo -E add-apt-repository -y ppa:git-core/ppa && break || sleep 10; done apt-get -o Acquire::Retries=$NET_RETRY_COUNT update osver=$(lsb_release -sr | cut -f1 -d.) @@ -176,6 +177,9 @@ jobs: if [[ "${{ matrix.ccache }}" == "no" ]]; then echo "B2_USE_CCACHE=0" >> $GITHUB_ENV fi + if [[ "${{ matrix.sanitize }}" == "yes" ]]; then + echo "LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/test/suppressions.txt" >> $GITHUB_ENV + fi git config --global pack.threads 0 if [[ "${{matrix.container}}" == "ubuntu:1"* ]]; then # Node 20 doesn't work with Ubuntu 16/18 glibc: https://github.com/actions/checkout/issues/1590 @@ -211,8 +215,8 @@ jobs: - name: Install packages if: startsWith(matrix.os, 'ubuntu') run: | - SOURCE_KEYS=(${{join(matrix.source_keys, ' ')}}) - SOURCES=(${{join(matrix.sources, ' ')}}) + SOURCE_KEYS=("${{join(matrix.source_keys, '" "')}}") + SOURCES=("${{join(matrix.sources, '" "')}}") [[ "${{matrix.address-model}}" != *32* ]] || sudo dpkg --add-architecture i386 @@ -223,14 +227,19 @@ jobs: sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update if [[ -z "${{matrix.install}}" ]]; then - pkgs="${{matrix.compiler}}" - pkgs="${pkgs/gcc-/g++-}" + compiler="${{matrix.compiler}}" + pkgs="${compiler/gcc-/g++-}" [[ -z "${{matrix.gcc_toolchain}}" ]] || pkgs+=" g++-${{matrix.gcc_toolchain}}" + if [[ "${{matrix.stdlib}}" == "libc++" && $compiler == "clang-"* ]]; then + ver=${compiler#*-} + pkgs+=" libc++-${ver}-dev libc++abi-${ver}-dev" + fi else pkgs="${{matrix.install}}" fi + pkgs+=" libicu-dev" [[ "${{matrix.address-model}}" != *32* ]] || pkgs+=" libicu-dev:i386" - sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y $pkgs libicu-dev + sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT -y -q --no-install-suggests --no-install-recommends install $pkgs - name: Setup GCC Toolchain if: matrix.gcc_toolchain @@ -238,7 +247,7 @@ jobs: GCC_TOOLCHAIN_ROOT="$HOME/gcc-toolchain" echo "GCC_TOOLCHAIN_ROOT=$GCC_TOOLCHAIN_ROOT" >> $GITHUB_ENV if ! command -v dpkg-architecture; then - apt-get install -y dpkg-dev + apt-get -o Acquire::Retries=$NET_RETRY_COUNT -y -q --no-install-suggests --no-install-recommends install dpkg-dev fi MULTIARCH_TRIPLET="$(dpkg-architecture -qDEB_HOST_MULTIARCH)" mkdir -p "$GCC_TOOLCHAIN_ROOT" @@ -249,15 +258,11 @@ jobs: - 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} + run: ci/github/setup_bdde.sh + env: + BDDE_DISTRO: ${{matrix.distro}} + BDDE_EDITION: ${{matrix.edition}} + BDDE_ARCH: ${{matrix.arch}} - name: Install locales if: startsWith(matrix.os, 'ubuntu')