Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove adding ubuntu-toolchain-r-test PPA by default #252

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# Copyright 2015-2019 Rene Rivera.
# Copyright 2019 Mateusz Loskot <mateusz at loskot dot net>
# 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)

Expand Down Expand Up @@ -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')
Expand Down
16 changes: 8 additions & 8 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand All @@ -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'),
Expand Down Expand Up @@ -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'),
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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' }
Expand All @@ -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' }
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -200,15 +197,15 @@ 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
run: |
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"
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/old_ci.yml
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
11 changes: 4 additions & 7 deletions ci/azure-pipelines/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Copyright 2017 - 2019 James E. King III
# Copyright 2019 Mateusz Loskot <mateusz at loskot dot net>
# 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)
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions ci/codecov.sh
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
Expand Down
35 changes: 16 additions & 19 deletions ci/drone/linux-cxx-install.sh
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -14,31 +20,22 @@ 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
VERSION_CODENAME=precise
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
Expand All @@ -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
Expand All @@ -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}
2 changes: 1 addition & 1 deletion ci/setup_bdde.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions ci/setup_ccache.sh
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
Expand All @@ -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)"
Loading