Add configuration for Azure Pipelines (AzP)

First stab at the common AzP configuration following the convention
structure, build jobs and build steps as established by the existing
configuration for Travis CI and AppVeyor.
This commit is contained in:
Mateusz Łoskot
2019-05-04 00:53:57 +02:00
committed by James E. King III
parent df8a38cb34
commit 0bf944aba9
8 changed files with 592 additions and 8 deletions

10
.gitattributes vendored Normal file
View File

@@ -0,0 +1,10 @@
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto !eol
*.gitattributes text eol=lf
# Scripts
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
*.py text eol=lf
*.sh text eol=lf

View File

@@ -2,15 +2,19 @@
# Boost.CI #
This repository contains scripts that enable continuous integration with [Appveyor](https://www.appveyor.com/), [codecov.io](https://codecov.io/),
[Coverity Scan](https://scan.coverity.com/), and [Travis CI](https://travis-ci.org/). These scripts are intended to be downloaded and used during boost repository builds to improve project quality. In most cases the scripts are self-configuring. Some integrations require additional setup actions to complete.
This repository contains scripts that enable continuous integration with [Appveyor](https://www.appveyor.com/),
[Azure Pipelines](https://github.com/marketplace/azure-pipelines), [codecov.io](https://codecov.io/),
[Coverity Scan](https://scan.coverity.com/), and [Travis CI](https://travis-ci.org/).
These scripts are intended to be downloaded and used during boost repository builds to improve project quality.
In most cases the scripts are self-configuring. Some integrations require additional setup actions to complete.
## Summary (TL;DR) ##
Here are all the steps you need to take as a Boost repository maintainer to enable all of these CI features in your repository:
1. Checkout `develop` and then make a new branch called `ci`.
1. Copy the `template/appveyor.yml` file from this repository into the *top level* of your repository. The file `appveyor.yml` should be in the top level directory of your repository.
1. Copy the `template/appveyor.yml` file from this repository into the *top level* of your repository. You can also rename name it as `.appveyor.yml`.
1. Copy the `template/azure-pipelines.yml` file from this repository into the top level or your repository. You can also rename name it as `.azure-pipelines.yml`.
1. Copy the `template/.travis.yml` file from this repository into the top level or your repository.
1. Copy the `LICENSE` file from this repository to the top level of your repository. This adds the `BSL-1.0` designation to your repository on github.
1. [optional] Copy the `template/README.md` file from this repository to the top level of your repository. If you already have a README.md then you can take what you need from the template version to improve it, if desired. Otherwise, you will need to customize README.md for your repository. One useful step is to fixup the repository name using the command `sed -i 's/template/<myrepositoryname>/g' README.md`, and then update the first line description.
@@ -38,7 +42,7 @@ There may be additional repositories using Boost.CI that are not listed. Boost.
## How It Works ##
The files `appveyor.yml` and `.travis.yml` must exist in your repository and will contain your customizations for build types, languages, and platforms. The templates provided will get you started with the build jobs listed below.
The files `appveyor.yml`, `azure-pipeline.yml` and `.travis.yml` must exist in your repository and will contain your customizations for build types, languages, and platforms. The templates provided will get you started with the build jobs listed below.
These scripts will copy resources from the Boost.CI repository when needed in order to provide scripting necessary to run all these jobs successfully.
@@ -78,6 +82,39 @@ Without any customization the scripts provide the following services:
| Appveyor | cygwin64 | `gcc` | `11,17` | `64` | `debug,release` |
| Appveyor | mingw | `gcc` | `03,11` | `32` | `debug,release` |
| Appveyor | mingw64 | `gcc` | `11,17` | `64` | `debug,release` |
| Azure P. | gcc 4.8 | `gcc-4.8` | `03,11` | default | `debug,release` |
| Azure P. | gcc 4.9 | `gcc-4.9` | `03,11` | default | `debug,release` |
| Azure P. | gcc 5 | `gcc-5` | `11` | default | `debug,release` |
| Azure P. | gcc 6 | `gcc-6` | `11,14` | default | `debug,release` |
| Azure P. | gcc 7 | `gcc-7` | `11,14,17` | default | `debug,release` |
| Azure P. | gcc 8 | `gcc-8` | `14,17,2a` | default | `debug,release` |
| Azure P. | clang-3.5 | `clang-3.5` | `03,11` | default | `debug,release` |
| Azure P. | clang-3.6 | `clang-3.6` | `03,11` | default | `debug,release` |
| Azure P. | clang-3.7 | `clang-3.7` | `03,11` | default | `debug,release` |
| Azure P. | clang-3.8 | `clang-3.8` | `03,11,14` | default | `debug,release` |
| Azure P. | clang-3.9 | `clang-3.8` | `03,11,14` | default | `debug,release` |
| Azure P. | clang-4.0 | `clang-4.0` | `11,14,17` | default | `debug,release` |
| Azure P. | clang-5.0 | `clang-5.0` | `11,14,17` | default | `debug,release` |
| Azure P. | clang-6.0 | `clang-6.0` | `14,17,2a` | default | `debug,release` |
| Azure P. | clang-6.0-libc++ | `clang-6.0` | `03,11,14,17,2a`, `libc++` | default | `debug,release` |
| Azure P. | clang-7 | `clang-7` | `14,17,2a` | default | `debug,release` |
| Azure P. | clang-8 | `clang-8` | `14,17,2a` | default | `debug,release` |
| Azure P. | MSVC 2019 C++2a Strict | `msvc-14.2` | `2a`, `-permissive-` | `64` | `debug,release` |
| Azure P. | MSVC 2017 C++2a Strict | `msvc-14.1` | `2a`, `-permissive-` | `64` | `debug,release` |
| Azure P. | MSVC 2017 C++17 | `msvc-14.1` | `17` | `32,64` | `debug,release` |
| Azure P. | MSVC 2017 C++14 Default | `msvc-14.1` | default (14) | `32,64` | `debug,release` |
| Azure P. | MSVC 2015 C++14 Default | `msvc-14.0` | default (14) | `32,64` | `debug,release` |
| Azure P. | Xcode 10.1 | `clang` | `14,17,2a` | default | `debug,release` |
| Azure P. | Xcode 10.0 | `clang` | `14,17,2a` | default | `debug,release` |
| Azure P. | Xcode 9.4.1 | `clang` | `11,14,17` | default | `debug,release` |
| Azure P. | Xcode 9.4 | `clang` | `11,14,17` | default | `debug,release` |
| Azure P. | Xcode 9.3.1 | `clang` | `11,14` | default | `debug,release` |
| Azure P. | Xcode 9.3 | `clang` | `11,14` | default | `debug,release` |
| Azure P. | Xcode 9.2 | `clang` | `11,14` | default | `debug,release` |
| Azure P. | Xcode 9.1 | `clang` | `03,11` | default | `debug,release` |
| Azure P. | Xcode 9.0.1 | `clang` | `03,11` | default | `debug,release` |
| Azure P. | Xcode 9.0 | `clang` | `03,11` | default | `debug,release` |
| Azure P. | Xcode 8.3.3 | `clang` | `03,11` | default | `debug,release` |
| Travis CI | gcc 4.8 | `gcc-4.8` | `03,11` | default | `debug,release` |
| Travis CI | gcc 4.9 | `gcc-4.9` | `03,11` | default | `debug,release` |
| Travis CI | gcc 5 | `gcc-5` | `11` | default | `debug,release` |

16
ci/azure-pipelines/build.sh Executable file
View File

@@ -0,0 +1,16 @@
#! /bin/bash
#
# Copyright 2017 - 2019 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)
#
# Bash script to run in Linux images of Azure Pipelines to
# perform a bjam build.
# The cwd should be $BOOST_ROOT/libs/$SELF before running.
#
set -ex
. $(dirname "${BASH_SOURCE[0]}")/enforce.sh
$BOOST_ROOT/b2 . toolset=$B2_TOOLSET cxxstd=$B2_CXXSTD $B2_CXXFLAGS $B2_DEFINES $B2_INCLUDE $B2_LINKFLAGS $B2_TESTFLAGS $B2_ADDRESS_MODEL $B2_LINK $B2_THREADING $B2_VARIANT -j${B2_JOBS} $*

46
ci/azure-pipelines/enforce.sh Executable file
View File

@@ -0,0 +1,46 @@
#! /bin/bash
#
# Copyright 2017 - 2019 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)
#
# Enforce B2 build variables understood by boost-ci scripts.
#
set -e
function enforce_b2
{
local old_varname=$1
local new_varname=B2_${old_varname}
if [ -z "${!new_varname}" ]; then
if [ ! -z "${!old_varname}" ]; then
echo
echo "WARNING: Your .azure-pipelines.yml or azure-pipelines.yml file needs to be updated:"
echo " use ${new_varname} instead of ${old_varname}"
echo
export ${new_varname}="${!old_varname}"
unset ${old_varname}
fi
fi
}
enforce_b2 "CXXFLAGS"
enforce_b2 "CXXSTD"
enforce_b2 "DEFINES"
enforce_b2 "LINKFLAGS"
enforce_b2 "TESTFLAGS"
enforce_b2 "TOOLSET"
# default language level: C++11
if [ -z "$B2_CXXSTD" ]; then
export B2_CXXSTD=11
fi
# default parallel build jobs: number of CPUs available + 1
if [ -z "${B2_JOBS}" ]; then
cpus=$(cat /proc/cpuinfo | grep 'processor' | wc -l)
export B2_JOBS=$((cpus + 1))
fi

View File

@@ -0,0 +1,37 @@
@ECHO ON
REM Executes the install phase for Azure Pipelines (AzP)
IF NOT DEFINED SELF (
SET SELF=%BUILD_REPOSITORY_NAME:-=_%
FOR /f "tokens=2 delims=/" %%a in ("%SELF%") DO SET SELF=%%a
)
cd .. || EXIT /B
REM BOOST_BRANCH is the superproject branch we check out and build against
REM except of course the repo being built - that is always what appveyor is handed
if "%BOOST_BRANCH%" == "" (
SET BOOST_BRANCH=develop
if "%BUILD_SOURCEBRANCHNAME%" == "master" set BOOST_BRANCH=master
)
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root || EXIT /B
cd boost-root || EXIT /B
git submodule update -q --init libs/headers || EXIT /B
git submodule update -q --init tools/boost_install || EXIT /B
git submodule update -q --init tools/boostdep || EXIT /B
git submodule update -q --init tools/build || EXIT /B
xcopy /s /e /q /I %BUILD_SOURCESDIRECTORY% libs\%SELF% || EXIT /B
cd ..
move boost-root %BUILD_SOURCESDIRECTORY%\
cd %BUILD_SOURCESDIRECTORY%\boost-root
python tools/boostdep/depinst/depinst.py --include benchmark --include example --include examples --include tools %DEPINST% %SELF:\=/% || EXIT /B
REM Bootstrap is not expecting cxxflags content so we zero it out for the bootstrap only
SET OLD_CXXFLAGS=%CXXFLAGS%
SET CXXFLAGS=
SET OLD_B2_CXXFLAGS=%OLD_B2_CXXFLAGS%
SET B2_CXXFLAGS=
CMD /K bootstrap
IF NOT %ERRORLEVEL% == 0 (
type bootstrap.log
EXIT /B 1
)
SET CXXFLAGS=%OLD_CXXFLAGS%
SET B2_CXXFLAGS=%OLD_B2_CXXFLAGS%
b2 headers

127
ci/azure-pipelines/install.sh Executable file
View File

@@ -0,0 +1,127 @@
#! /bin/bash
#
# Copyright 2017 - 2019 James E. King III
# Copyright 2019 Mateusz Loskot <mateusz at loskot dot net>
# 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)
#
# Executes the install phase for Azure Pipelines (AzP)
#
# This was ported from ci/travis/install.sh following
# this official guide:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/migrate/from-travis
#
# If your repository has additional directories beyond
# "example", "examples", "tools", and "test" then you
# can add them in the environment variable DEPINST.
# i.e. - DEPINST="--include dirname1 --include dirname2"
#
# AzP requires to run special task in order to export
# SELF and BOOST_ROOT as job-scoped variable from a script.
# Follow invocation of this install.sh in .azure-pipelines.yaml
# with these two lines:
#
# set +x
# echo "##vso[task.setvariable variable=SELF]$SELF"
# echo "##vso[task.setvariable variable=BOOST_ROOT]$BOOST_ROOT"
# set -x
#
# NOTE: The set +x is required! See the troubleshooting guide:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/troubleshooting#variables-having--single-quote-appended
#
set -ex
if [ "$AGENT_OS" == "Darwin" ]; then
unset -f cd
fi
. $(dirname "${BASH_SOURCE[0]}")/enforce.sh
function show_bootstrap_log
{
cat bootstrap.log
}
# AzP does not clone into folder named after repository,
# but into one named something like /home/vsts/work/1/s
# SELF needs to be derived from the name of the repository
# that this build is configured for.
export SELF=`basename $BUILD_REPOSITORY_NAME`
# e.g. BUILD_SOURCESDIRECTORY=/home/vsts/work/1/s
# change from /home/vsts/work/1/s to /home/vsts/work/1
cd ..
if [ "$SELF" == "interval" ]; then
export SELF=numeric/interval
fi
# CI builds set BUILD_SOURCEBRANCHNAME
# Pull request builds set SYSTEM_PULLREQUEST_TARGETBRANCH.
# We want to build PRs against develop branch anyway.
if [ "$BUILD_SOURCEBRANCHNAME" == "master" ]; then
export BOOST_BRANCH="master"
else
export BOOST_BRANCH="develop"
fi
# e.g. clone into /home/vsts/work/1/boost-root
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
git submodule update -q --init libs/headers
git submodule update -q --init tools/boost_install
git submodule update -q --init tools/boostdep
git submodule update -q --init tools/build
mkdir -p libs/$SELF
cp -r $BUILD_SOURCESDIRECTORY/* libs/$SELF
# e.g. move /home/vsts/work/1/boost-root
# back inside BUILD_SOURCESDIRECTORY=/home/vsts/work/1/s
cd ..
mv boost-root $BUILD_SOURCESDIRECTORY/
cd $BUILD_SOURCESDIRECTORY/boost-root
# NOTE: AzP images come with predefined BOOST_ROOT that can not be overwritten
# https://gitlab.kitware.com/cmake/cmake/issues/19056
# Set custom variable here, then export as
export BOOST_ROOT="`pwd`"
export PATH="`pwd`":$PATH
python tools/boostdep/depinst/depinst.py --include benchmark --include example --include examples --include tools $DEPINST $SELF
# If clang was installed from LLVM APT it will not have a /usr/bin/clang++
# so we need to add the correctly versioned llvm bin path to the PATH
if [ "${B2_TOOLSET%%-*}" == "clang" ]; then
ver="${B2_TOOLSET#*-}"
export PATH=/usr/lib/llvm-${ver}/bin:$PATH
ls -ls /usr/lib/llvm-${ver}/bin || true
hash -r || true
which clang || true
which clang++ || true
# Additionally, if B2_TOOLSET is clang variant but CXX is set to g++
# (it is on Linux images) then boost build silently ignores B2_TOOLSET and
# uses CXX instead
if [ "${CXX}" != "clang"* ]; then
echo "CXX is set to ${CXX} in this environment which would override"
echo "the setting of B2_TOOLSET=clang, therefore we clear CXX here."
export CXX=
fi
fi
trap show_bootstrap_log ERR
./bootstrap.sh --with-toolset=${B2_TOOLSET%%-*}
trap - ERR
./b2 headers
# AzP official images of Ubuntu 16.04 behave differently to Travis CI.
# The gcc and clang variants are being installed somewhat weirdly
# and, unlike on linux images on Travis CI, b2 fails with:
#
# /home/vsts/work/1/s/boost-root/tools/build/src/tools/gcc.jam:230: in gcc.init from module gcc
# error: toolset gcc initialization:
# error: no command provided, default command 'g++' not found
# error: initialized from ../../project-config.jam:12
#
# Hence, we work around this issue with user-config.jam
if ! command -v ${CXX}; then
echo "WARNING: Compiler ${CXX} was not installed properly"
#exit 1
fi
echo "using ${B2_TOOLSET} : : $(which ${CXX}) : ${B2_CXXFLAGS} ;" > ${HOME}/user-config.jam

View File

@@ -11,10 +11,10 @@ Distributed under the [Boost Software License, Version 1.0](http://www.boost.org
### Build Status
Branch | Travis | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
:-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
[`master`](https://github.com/boostorg/template/tree/master) | [![Build Status](https://travis-ci.org/boostorg/template.svg?branch=master)](https://travis-ci.org/boostorg/template) | [![Build status](https://ci.appveyor.com/api/projects/status/github/boostorg/template?branch=master&svg=true)](https://ci.appveyor.com/project/maintainer/template-xyzzy/branch/master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/BADLE-NUMBER-LIKE-13982/badge.svg)](https://scan.coverity.com/projects/boostorg-template) | [![codecov](https://codecov.io/gh/boostorg/template/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/template/branch/master)| [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/template.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/template.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/template.html)
[`develop`](https://github.com/boostorg/template/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/template.svg?branch=develop)](https://travis-ci.org/boostorg/template) | [![Build status](https://ci.appveyor.com/api/projects/status/github/boostorg/template?branch=develop&svg=true)](https://ci.appveyor.com/project/maintainer/template-xyzzy/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/BADGE-NUMBER-LIKE-13982/badge.svg)](https://scan.coverity.com/projects/boostorg-template) | [![codecov](https://codecov.io/gh/boostorg/template/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/template/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/template.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/template.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/template.html)
Branch | Travis | Appveyor | Azure Pipelines | Coverity Scan | codecov.io | Deps | Docs | Tests |
:-------------: | ------ | -------- | --------------- |------------- | ---------- | ---- | ---- | ----- |
[`master`](https://github.com/boostorg/template/tree/master) | [![Build Status](https://travis-ci.org/boostorg/template.svg?branch=master)](https://travis-ci.org/boostorg/template) | [![Build status](https://ci.appveyor.com/api/projects/status/github/boostorg/template?branch=master&svg=true)](https://ci.appveyor.com/project/maintainer/template-xyzzy/branch/master) | [![Build Status](https://dev.azure.com/maintainer/template/_apis/build/status/pipeline?branchName=master)](https://dev.azure.com/maintainer/template/_build/latest?definitionId=6&branchName=master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/BADLE-NUMBER-LIKE-13982/badge.svg)](https://scan.coverity.com/projects/boostorg-template) | [![codecov](https://codecov.io/gh/boostorg/template/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/template/branch/master)| [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/template.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/template.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/template.html)
[`develop`](https://github.com/boostorg/template/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/template.svg?branch=develop)](https://travis-ci.org/boostorg/template) | [![Build status](https://ci.appveyor.com/api/projects/status/github/boostorg/template?branch=develop&svg=true)](https://ci.appveyor.com/project/maintainer/template-xyzzy/branch/develop) | [![Build Status](https://dev.azure.com/maintainer/template/_apis/build/status/pipeline?branchName=develop)](https://dev.azure.com/maintainer/template/_build/latest?definitionId=6&branchName=master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/BADGE-NUMBER-LIKE-13982/badge.svg)](https://scan.coverity.com/projects/boostorg-template) | [![codecov](https://codecov.io/gh/boostorg/template/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/template/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/template.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/template.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/template.html)
### Directories

View File

@@ -0,0 +1,311 @@
# Copyright 2015-2019 Rene Rivera.
# Copyright 2019 Mateusz Loskot <mateusz at loskot dot net>
# 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)
#
# Generic Azure Pipelines build script for boostorg repositories
# See: https://github.com/boostorg/boost-ci/
#
# Instructions for customizing this script for your library:
#
# 1. Customize the compilers and language levels you want.
# 2. If you have more than include/, src/, test/, example/, examples/,
# benchmark/ or tools/ directories, set the environment variable DEPINST.
# For example if your build uses code in "bench/" and "fog/" directories:
# - DEPINST: --include bench --include fog
# 3. Enable pull request builds in your boostorg/<library> account.
#
# That's it - the script will do everything else for you.
trigger:
branches:
include:
- develop
- master
- bugfix/*
- feature/*
- fix/*
- pr/*
pr:
branches:
include:
- develop
variables:
- name: B2_VARIANT
value: variant=release,debug
stages:
- stage: Test
jobs:
- job: 'Linux'
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
GCC 8:
B2_TOOLSET: gcc
B2_CXXSTD: 14,17,2a
CXX: g++-8
PACKAGES: g++-8
GCC 7:
B2_TOOLSET: gcc
B2_CXXSTD: 11,14,17
CXX: g++-7
PACKAGES: g++-7
GCC 6:
B2_TOOLSET: gcc
B2_CXXSTD: 11,14
CXX: g++-6
PACKAGES: g++-6
GCC 5:
B2_TOOLSET: gcc
B2_CXXSTD: 11
CXX: g++-5
PACKAGES: g++-5
GCC 4.9:
B2_TOOLSET: gcc
B2_CXXSTD: 03,11
CXX: g++-4.9
PACKAGES: g++-4.9
GCC 4.8:
B2_TOOLSET: gcc
B2_CXXSTD: 03,11
CXX: g++-4.8
PACKAGES: g++-4.8
Clang 8:
B2_TOOLSET: clang
B2_CXXSTD: 14,17,2a
CXX: clang++-8
PACKAGES: clang-8
LLVM_REPO: llvm-toolchain-xenial-8
Clang 7:
B2_TOOLSET: clang
B2_CXXSTD: 14,17,2a
CXX: clang++-7
PACKAGES: clang-7
LLVM_REPO: llvm-toolchain-xenial-7
Clang 6:
B2_TOOLSET: clang
B2_CXXSTD: 03,11,14,17,2a
B2_CXXFLAGS: -stdlib=libc++
CXX: clang++-6.0
PACKAGES: clang-6.0
LLVM_REPO: llvm-toolchain-xenial-6.0
Clang 6:
B2_TOOLSET: clang
B2_CXXSTD: 14,17,2a
CXX: clang++-6.0
PACKAGES: clang-6.0
LLVM_REPO: llvm-toolchain-xenial-6.0
Clang 5:
B2_TOOLSET: clang
B2_CXXSTD: 11,14,17
PACKAGES: clang-5.0
CXX: clang++-5.0
LLVM_REPO: llvm-toolchain-xenial-5.0
Clang 4:
B2_TOOLSET: clang
B2_CXXSTD: 11,14,17
CXX: clang++-4.0
PACKAGES: clang-4.0
LLVM_REPO: llvm-toolchain-xenial-4.0
Clang 3.9:
B2_TOOLSET: clang
B2_CXXSTD: 03,11,14
CXX: clang++-3.9
PACKAGES: clang-3.9
Clang 3.8:
B2_TOOLSET: clang
CXX: clang++-3.8
B2_CXXSTD: 03,11,14
PACKAGES: clang-3.8
Clang 3.7:
B2_TOOLSET: clang
B2_CXXSTD: 03,11
CXX: clang++-3.7
PACKAGES: clang-3.7
Clang 3.6:
B2_TOOLSET: clang
B2_CXXSTD: 03,11
CXX: clang++-3.6
PACKAGES: clang-3.6
Clang 3.5:
B2_TOOLSET: clang
B2_CXXSTD: 03,11
CXX: clang++-3.5
PACKAGES: clang-3.5
steps:
- bash: |
set -e
uname -a
sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
if test -n "${LLVM_REPO}" ; then
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo -E apt-add-repository "deb http://apt.llvm.org/xenial/ ${LLVM_REPO} main"
fi
sudo -E apt-get update
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install ${PACKAGES}
git clone --branch master https://github.com/boostorg/boost-ci.git boost-ci
cp -pr boost-ci/ci boost-ci/.codecov.yml .
rm -rf boost-ci
source ci/azure-pipelines/install.sh
# AzP requires to run special task in order to export
# SELF and BOOST_ROOT as job-scoped variable from a script.
# NOTE: Disable set -x is necessary, see the troubleshooting guide
# on "Variables having ' (single quote) appended":
# https://docs.microsoft.com/en-us/azure/devops/pipelines/troubleshooting
set +x
echo "##vso[task.setvariable variable=SELF]"$SELF
echo "##vso[task.setvariable variable=BOOST_ROOT]"$BOOST_ROOT
set -x
displayName: 'Install'
- bash: |
set -e
echo "SELF=$SELF"
echo "BOOST_ROOT=$BOOST_ROOT"
cd $BOOST_ROOT/libs/$SELF
ci/azure-pipelines/build.sh --debug-configuration
displayName: 'Build'
- job: 'Windows'
strategy:
matrix:
VS 2019 C++2a Strict:
B2_TOOLSET: msvc-14.2
B2_CXXSTD: latest # 2a
B2_CXXFLAGS: cxxflags=-permissive-
B2_ADDRESS_MODEL: address-model=64
VM_IMAGE: 'windows-2019'
VS 2017 C++2a Strict:
B2_TOOLSET: msvc-14.1
B2_CXXSTD: latest # 2a
B2_CXXFLAGS: cxxflags=-permissive-
B2_ADDRESS_MODEL: address-model=64
VM_IMAGE: 'vs2017-win2016'
VS 2017 C++17:
B2_TOOLSET: msvc-14.1
B2_CXXSTD: 17
B2_ADDRESS_MODEL: address-model=64,32
VM_IMAGE: 'vs2017-win2016'
VS 2017 C++14:
B2_TOOLSET: msvc-14.1
#B2_CXXSTD: 14 # default
B2_ADDRESS_MODEL: address-model=64,32
VM_IMAGE: 'vs2017-win2016'
VS 2015 C++14:
B2_TOOLSET: msvc-14.0
#B2_CXXSTD: 14 # default
B2_ADDRESS_MODEL: address-model=64,32
VM_IMAGE: 'vs2015-win2012r2'
pool:
vmImage: $(VM_IMAGE)
steps:
- script: |
set SELF=%BUILD_REPOSITORY_NAME:-=_%
for /f "tokens=2 delims=/" %%a in ("%SELF%") do set SELF=%%a
set BOOST_ROOT=%BUILD_SOURCESDIRECTORY%\boost-root
git clone --branch master https://github.com/boostorg/boost-ci.git boost-ci
xcopy /s /e /q /i boost-ci\ci .\ci
cmd /k ci\azure-pipelines\install.bat
echo ##vso[task.setvariable variable=SELF]%SELF%
echo ##vso[task.setvariable variable=BOOST_ROOT]%BOOST_ROOT%
displayName: 'Install'
- script: |
PATH=%ADDPATH%%PATH%
REM The definition of B2_TOOLCXX omits B2_CXXSTD= if it was not defined above
IF NOT DEFINED B2_CXXSTD (SET B2_TOOLCXX=toolset=%B2_TOOLSET%) ELSE (SET B2_TOOLCXX=toolset=%B2_TOOLSET% cxxstd=%B2_CXXSTD%)
cd %BOOST_ROOT%
ECHO b2 libs/%SELF:\=/% %B2_TOOLCXX% %B2_CXXFLAGS% %B2_DEFINES% %B2_THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3
b2 libs/%SELF:\=/% %B2_TOOLCXX% %B2_CXXFLAGS% %B2_DEFINES% %B2_THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3
displayName: 'Build'
- job: 'macOS'
pool:
vmImage: 'macOS-10.13'
strategy:
matrix:
Xcode 10.1:
B2_TOOLSET: clang
B2_CXXSTD: 14,17,2a
XCODE_APP: /Applications/Xcode_10.1.app
Xcode 10.0:
B2_TOOLSET: clang
B2_CXXSTD: 14,17,2a
XCODE_APP: /Applications/Xcode_10.app
Xcode 9.4.1:
B2_TOOLSET: clang
B2_CXXSTD: 11,14,17
XCODE_APP: /Applications/Xcode_9.4.1.app
Xcode 9.4:
B2_TOOLSET: clang
B2_CXXSTD: 11,14,17
XCODE_APP: /Applications/Xcode_9.4.app
Xcode 9.3.1:
B2_TOOLSET: clang
B2_CXXSTD: 11,14,17
XCODE_APP: /Applications/Xcode_9.3.1.app
Xcode 9.3:
B2_TOOLSET: clang
B2_CXXSTD: 11,14
XCODE_APP: /Applications/Xcode_9.3.app
Xcode 9.2:
B2_TOOLSET: clang
B2_CXXSTD: 11,14
XCODE_APP: /Applications/Xcode_9.2.app
Xcode 9.1:
B2_TOOLSET: clang
B2_CXXSTD: 03,11
XCODE_APP: /Applications/Xcode_9.1.app
Xcode 9.0.1:
B2_TOOLSET: clang
B2_CXXSTD: 03,11
XCODE_APP: /Applications/Xcode_9.0.1.app
Xcode 9.0:
B2_TOOLSET: clang
B2_CXXSTD: 03,11
XCODE_APP: /Applications/Xcode_9.app
Xcode 8.3.3:
B2_TOOLSET: clang
B2_CXXSTD: 03,11
XCODE_APP: /Applications/Xcode_8.3.3.app
steps:
- bash: |
set -e
uname -a
sudo xcode-select -switch ${XCODE_APP}
which clang++
git clone --branch master https://github.com/boostorg/boost-ci.git boost-ci
cp -pr boost-ci/ci boost-ci/.codecov.yml .
rm -rf boost-ci
source ci/azure-pipelines/install.sh
# AzP requires to run special task in order to export
# SELF and BOOST_ROOT as job-scoped variable from a script.
# NOTE: Disable set -x is necessary, see the troubleshooting guide
# on "Variables having ' (single quote) appended":
# https://docs.microsoft.com/en-us/azure/devops/pipelines/troubleshooting
set +x
echo "##vso[task.setvariable variable=SELF]"$SELF
echo "##vso[task.setvariable variable=BOOST_ROOT]"$BOOST_ROOT
set -x
displayName: Install
- bash: |
set -e
echo "SELF=$SELF"
echo "BOOST_ROOT=$BOOST_ROOT"
cd $BOOST_ROOT/libs/$SELF
ci/azure-pipelines/build.sh --debug-configuration
displayName: 'Build'