diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 8a697c25..1f102df1 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -1,7 +1,7 @@ --- # Copyright 2015-2019 Rene Rivera. # Copyright 2019 Mateusz Loskot -# Copyright 2020-2021 Alexander Grund +# Copyright 2020-2024 Alexander Grund # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) @@ -127,7 +127,7 @@ stages: # Need (newer) git sudo add-apt-repository ppa:git-core/ppa sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update - sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y g++ python libpython-dev git + sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT -y -q --no-install-suggests --no-install-recommends install g++ python libpython-dev git displayName: 'Install required sw for containers' - task: Cache@2 condition: eq(variables.B2_USE_CCACHE, '1') diff --git a/.drone.star b/.drone.star index 35846838..8abaaaee 100644 --- a/.drone.star +++ b/.drone.star @@ -28,11 +28,11 @@ def main(ctx): job(compiler='clang-3.9', cxxstd='11,14', os='ubuntu-18.04'), job(compiler='clang-4.0', cxxstd='11,14', os='ubuntu-18.04'), job(compiler='clang-5.0', cxxstd='11,14,1z', os='ubuntu-18.04'), - job(compiler='clang-6.0', cxxstd='11,14,17', os='ubuntu-18.04'), - job(compiler='clang-7', cxxstd='11,14,17', os='ubuntu-18.04'), - job(compiler='clang-8', cxxstd='11,14,17,2a', os='ubuntu-18.04'), - job(compiler='clang-9', cxxstd='11,14,17,2a', os='ubuntu-18.04'), - job(compiler='clang-10', cxxstd='11,14,17,2a', os='ubuntu-18.04'), + job(compiler='clang-6.0', cxxstd='11,14,17', os='ubuntu-20.04'), + job(compiler='clang-7', cxxstd='11,14,17', os='ubuntu-20.04'), + job(compiler='clang-8', cxxstd='11,14,17,2a', os='ubuntu-20.04'), + job(compiler='clang-9', cxxstd='11,14,17,2a', os='ubuntu-20.04'), + job(compiler='clang-10', cxxstd='11,14,17,2a', os='ubuntu-20.04'), job(compiler='clang-11', cxxstd='11,14,17,2a', os='ubuntu-22.04'), job(compiler='clang-12', cxxstd='11,14,17,20', os='ubuntu-22.04'), job(compiler='clang-13', cxxstd='11,14,17,20,2b', os='ubuntu-22.04'), @@ -46,7 +46,7 @@ def main(ctx): job(compiler='gcc-6', cxxstd='11,14,1z', os='ubuntu-18.04'), job(compiler='gcc-7', cxxstd='11,14,1z', os='ubuntu-18.04'), job(compiler='gcc-8', cxxstd='11,14,17,2a', os='ubuntu-18.04'), - job(compiler='gcc-9', cxxstd='11,14,17,2a', os='ubuntu-18.04'), + job(compiler='gcc-9', cxxstd='11,14,17,2a', os='ubuntu-20.04'), job(compiler='gcc-10', cxxstd='11,14,17,20', os='ubuntu-22.04'), job(compiler='gcc-11', cxxstd='11,14,17,20,2b', os='ubuntu-22.04'), job(compiler='gcc-12', cxxstd='11,14,17,20,2b', os='ubuntu-22.04'), @@ -99,10 +99,10 @@ def main(ctx): job(compiler='clang', cxxstd='11,14,17,20,2b', os='osx-xcode-15.0.1'), # ARM64 job(compiler='clang-12', cxxstd='11,14,17,20', os='ubuntu-20.04', arch='arm64', add_llvm=True), - job(compiler='gcc-11', cxxstd='11,14,17,20', os='ubuntu-20.04', arch='arm64'), + job(compiler='gcc-11', cxxstd='11,14,17,20', os='ubuntu-22.04', arch='arm64'), # S390x job(compiler='clang-12', cxxstd='11,14,17,20', os='ubuntu-20.04', arch='s390x', add_llvm=True), - job(compiler='gcc-11', cxxstd='11,14,17,20', os='ubuntu-20.04', arch='s390x'), + job(compiler='gcc-11', cxxstd='11,14,17,20', os='ubuntu-22.04', arch='s390x'), # Windows job(compiler='msvc-14.0', cxxstd=None, os='windows', env={'B2_DONT_EMBED_MANIFEST': 1}), job(compiler='msvc-14.1', cxxstd=None, os='windows'), diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79b423d0..94922acd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ # Copyright 2020-2021 Peter Dimov # Copyright 2021 Andrey Semashev -# Copyright 2021 Alexander Grund +# Copyright 2021-2024 Alexander Grund # Copyright 2022 James E. King III # # Distributed under the Boost Software License, Version 1.0. @@ -43,8 +43,8 @@ jobs: matrix: include: # Linux, gcc - - { compiler: gcc-4.4, cxxstd: '98,0x', os: ubuntu-latest, container: 'ubuntu:16.04' } - - { compiler: gcc-4.6, cxxstd: '0x', os: ubuntu-latest, container: 'ubuntu:16.04' } + - { compiler: gcc-4.4, cxxstd: '98,0x', os: ubuntu-latest, container: 'ubuntu:16.04', source_keys: '0x1E9377A2BA9EF27F', sources: 'ppa:ubuntu-toolchain-r/test' } + - { compiler: gcc-4.6, cxxstd: '0x', os: ubuntu-latest, container: 'ubuntu:16.04', source_keys: '0x1E9377A2BA9EF27F', sources: 'ppa:ubuntu-toolchain-r/test' } - { compiler: gcc-4.7, cxxstd: '11', os: ubuntu-latest, container: 'ubuntu:16.04' } - { compiler: gcc-4.8, cxxstd: '11', os: ubuntu-latest, container: 'ubuntu:16.04' } - { compiler: gcc-4.9, cxxstd: '11', os: ubuntu-latest, container: 'ubuntu:16.04' } @@ -61,7 +61,7 @@ jobs: - { name: GCC w/ sanitizers, sanitize: yes, compiler: gcc-13, cxxstd: '11,14,17,20', os: ubuntu-24.04 } - { name: Collect coverage, coverage: yes, - compiler: gcc-13, cxxstd: '2b', os: ubuntu-24.04, install: 'g++-13-multilib', address-model: '32,64' } + compiler: gcc-13, cxxstd: '2b', os: ubuntu-24.04, install: 'g++-13-multilib gcc-multilib', address-model: '32,64' } # Linux, clang - { compiler: clang-3.5, cxxstd: '11', os: ubuntu-latest, container: 'ubuntu:16.04' } @@ -128,7 +128,7 @@ 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 -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 @@ -141,7 +141,7 @@ jobs: else pkgs+=" python libpython-dev" fi - apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y $pkgs + apt-get -o Acquire::Retries=$NET_RETRY_COUNT -y -q --no-install-suggests --no-install-recommends install $pkgs fi # For jobs not compatible with ccache, use "ccache: no" in the matrix if [[ "${{ matrix.ccache }}" == "no" ]]; then @@ -184,9 +184,6 @@ jobs: run: | SOURCE_KEYS=("${{join(matrix.source_keys, '" "')}}") SOURCES=("${{join(matrix.sources, '" "')}}") - # Add this by default - SOURCE_KEYS+=('http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F') - SOURCES+=(ppa:ubuntu-toolchain-r/test) ci/add-apt-keys.sh "${SOURCE_KEYS[@]}" # Initial update before adding sources required to get e.g. keys @@ -200,7 +197,7 @@ jobs: else pkgs="${{matrix.install}}" fi - sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y $pkgs + 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 @@ -208,7 +205,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" diff --git a/.github/workflows/old_ci.yml b/.github/workflows/old_ci.yml index 0651c8df..8ddeabeb 100644 --- a/.github/workflows/old_ci.yml +++ b/.github/workflows/old_ci.yml @@ -1,6 +1,6 @@ # Copyright 2020-2021 Peter Dimov # Copyright 2021 Andrey Semashev -# Copyright 2021 Alexander Grund +# Copyright 2021-2024 Alexander Grund # # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) @@ -19,6 +19,9 @@ concurrency: group: ${{format('compat-{0}:{1}', github.repository, github.ref)}} cancel-in-progress: true +env: + NET_RETRY_COUNT: 5 + jobs: posix: defaults: @@ -119,7 +122,7 @@ jobs: if: startsWith(matrix.os, 'ubuntu') run: | sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update - sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y ${{matrix.install}} + sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT -y -q --no-install-suggests --no-install-recommends install ${{matrix.install}} - name: Setup Boost run: source ci/github/install.sh diff --git a/ci/azure-pipelines/install.sh b/ci/azure-pipelines/install.sh index 324541d1..6d080ed3 100755 --- a/ci/azure-pipelines/install.sh +++ b/ci/azure-pipelines/install.sh @@ -2,7 +2,7 @@ # # Copyright 2017 - 2019 James E. King III # Copyright 2019 Mateusz Loskot -# Copyright 2021 Alexander Grund +# Copyright 2021-2024 Alexander Grund # 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) @@ -46,24 +46,21 @@ if [ "$AGENT_OS" != "Darwin" ]; then fi if [ -n "$PACKAGES" ]; then - for i in {1..${NET_RETRY_COUNT:-3}}; do - sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" && break || sleep 10 - done if [ -n "${LLVM_REPO}" ]; then curl -sSL --retry ${NET_RETRY_COUNT:-5} https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/llvm-snapshot.gpg for i in {1..${NET_RETRY_COUNT:-3}}; do sudo -E apt-add-repository "deb http://apt.llvm.org/${LLVM_OS:-xenial}/ ${LLVM_REPO} main" && break || sleep 10 done fi - sudo apt-get ${NET_RETRY_COUNT:+ -o Acquire::Retries=$NET_RETRY_COUNT} update - sudo apt-get ${NET_RETRY_COUNT:+ -o Acquire::Retries=$NET_RETRY_COUNT} install -y ${PACKAGES} + sudo apt-get -o Acquire::Retries="${NET_RETRY_COUNT:-3}" update + sudo apt-get -o Acquire::Retries="${NET_RETRY_COUNT:-3}" -y -q --no-install-suggests --no-install-recommends install ${PACKAGES} fi if [[ -z "$GCC_TOOLCHAIN_ROOT" ]] && [[ -n "$GCC_TOOLCHAIN" ]]; then GCC_TOOLCHAIN_ROOT="$HOME/gcc-toolchain" echo "##vso[task.setvariable variable=GCC_TOOLCHAIN_ROOT]$GCC_TOOLCHAIN_ROOT" if ! command -v dpkg-architecture; then - apt-get install -y dpkg-dev + apt-get -o Acquire::Retries="${NET_RETRY_COUNT:-3}" -y -q --no-install-suggests --no-install-recommends install dpkg-dev fi MULTIARCH_TRIPLET="$(dpkg-architecture -qDEB_HOST_MULTIARCH)" mkdir -p "$GCC_TOOLCHAIN_ROOT" diff --git a/ci/codecov.sh b/ci/codecov.sh index d5d7ecaa..792e9c6c 100755 --- a/ci/codecov.sh +++ b/ci/codecov.sh @@ -1,7 +1,7 @@ #!/bin/bash # # Copyright 2017 - 2022 James E. King III -# Copyright 2021 Alexander Grund +# Copyright 2021-2024 Alexander Grund # 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) @@ -58,7 +58,7 @@ elif [[ "$coverage_action" == "collect" ]] || [[ "$coverage_action" == "upload" : "${LCOV_VERSION:=v1.15}" if [[ "$LCOV_VERSION" =~ ^v[2-9] ]]; then - sudo apt-get install -y libcapture-tiny-perl libdatetime-perl || true + sudo apt-get -o Acquire::Retries="${NET_RETRY_COUNT:-3}" -y -q --no-install-suggests --no-install-recommends install libcapture-tiny-perl libdatetime-perl || true LCOV_OPTIONS="${LCOV_OPTIONS} --ignore-errors unused" LCOV_OPTIONS=$(echo ${LCOV_OPTIONS} | xargs echo) fi diff --git a/ci/drone/linux-cxx-install.sh b/ci/drone/linux-cxx-install.sh index 025f8396..8cc8d30e 100755 --- a/ci/drone/linux-cxx-install.sh +++ b/ci/drone/linux-cxx-install.sh @@ -1,4 +1,10 @@ #!/bin/bash +# +# Copyright 2020-2022 Sam Darwin +# Copyright 2021-2024 Alexander Grund +# 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) set -e @@ -14,12 +20,13 @@ function add_repository { return 1 # Failed } -function add_repository_toolchain { - name="$1" - echo -e "\tAdding repository $name" +echo ">>>>> APT: REPOSITORIES..." + +if [ "$ADD_UBUNTU_TOOLCHAIN_PPA" = "true" ]; then + echo ">>>>> APT: INSTALL Ubuntu Toolchain PPA" # an alternative method, if apt-add-repository seems to be unresponsive VERSION_CODENAME=$(grep -ioP '^VERSION_CODENAME=\K.+' /etc/os-release || true) - if [ -z $VERSION_CODENAME ]; then + if [ -z "$VERSION_CODENAME" ]; then if grep -i trusty /etc/os-release; then VERSION_CODENAME=trusty elif grep -i precise /etc/os-release; then @@ -27,18 +34,8 @@ function add_repository_toolchain { fi fi echo "VERSION_CODENAME is ${VERSION_CODENAME}" - echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-${VERSION_CODENAME}.list - echo "# deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu ${VERSION_CODENAME} main" >> /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-${VERSION_CODENAME}.list - curl -sSL --retry ${NET_RETRY_COUNT:-5} 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F' | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/toolchain-r.gpg -} - -echo ">>>>> APT: REPOSITORIES..." - -if [ "$UBUNTU_TOOLCHAIN_DISABLE" != "true" ]; then - # add_repository "ppa:ubuntu-toolchain-r/test" - add_repository_toolchain "ppa:ubuntu-toolchain-r/test" -else - echo "UBUNTU_TOOLCHAIN_DISABLE is 'true'. Not installing ppa:ubuntu-toolchain-r/test" + echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu ${VERSION_CODENAME} main" > "/etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-${VERSION_CODENAME}.list" + curl -sSL --retry "${NET_RETRY_COUNT:-5}" 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F' | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/toolchain-r.gpg fi if [ -n "${LLVM_OS}" ]; then @@ -50,7 +47,7 @@ if [ -n "${LLVM_OS}" ]; then # Snapshot (i.e. trunk) build llvm_toolchain="llvm-toolchain-${LLVM_OS}" fi - add_repository "deb http://apt.llvm.org/${LLVM_OS}/ ${llvm_toolchain} main" + add_repository "deb https://apt.llvm.org/${LLVM_OS}/ ${llvm_toolchain} main" fi if [ -n "${SOURCES}" ]; then @@ -61,7 +58,7 @@ if [ -n "${SOURCES}" ]; then fi echo ">>>>> APT: UPDATE..." -sudo -E apt-get -o Acquire::Retries=3 update +sudo -E apt-get -o Acquire::Retries="${NET_RETRY_COUNT:-3}" update echo ">>>>> APT: INSTALL ${PACKAGES}..." -sudo -E DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=3 -y --no-install-suggests --no-install-recommends install ${PACKAGES} +sudo -E DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries="${NET_RETRY_COUNT:-3}" -y -q --no-install-suggests --no-install-recommends install ${PACKAGES} diff --git a/ci/setup_bdde.sh b/ci/setup_bdde.sh index 7abf5751..937ba7c8 100755 --- a/ci/setup_bdde.sh +++ b/ci/setup_bdde.sh @@ -19,7 +19,7 @@ set -ex if [ -f "/etc/debian_version" ]; then - sudo apt-get install --no-install-recommends -y binfmt-support qemu-user-static + sudo apt-get -o Acquire::Retries="${NET_RETRY_COUNT:-3}" -y -q --no-install-suggests --no-install-recommends install binfmt-support qemu-user-static fi # this prepares the VM for multiarch docker diff --git a/ci/setup_ccache.sh b/ci/setup_ccache.sh index f9a97f05..b0dca7ac 100755 --- a/ci/setup_ccache.sh +++ b/ci/setup_ccache.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright 2021 Alexander Grund +# Copyright 2021-2024 Alexander Grund # 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) @@ -11,7 +11,7 @@ set -ex if ! command -v ccache &> /dev/null; then if [ -f "/etc/debian_version" ]; then - sudo apt-get install ${NET_RETRY_COUNT:+ -o Acquire::Retries=$NET_RETRY_COUNT} -y ccache + sudo apt-get -o Acquire::Retries="${NET_RETRY_COUNT:-3}" -y -q --no-install-suggests --no-install-recommends install ccache elif command -v brew &> /dev/null; then brew update > /dev/null if ! brew install ccache; then @@ -24,7 +24,7 @@ if ! command -v ccache &> /dev/null; then fi fi fi -ccache --set-config=cache_dir=${B2_CCACHE_DIR:-~/.ccache} -ccache --set-config=max_size=${B2_CCACHE_SIZE:-500M} +ccache --set-config=cache_dir="${B2_CCACHE_DIR:-~/.ccache}" +ccache --set-config=max_size="${B2_CCACHE_SIZE:-500M}" ccache -z echo "CCache config: $(ccache -p)"