diff --git a/.travis.yml b/.travis.yml index 9915256..937bc5a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,29 +1,28 @@ # Copyright 2016 Peter Dimov -# Copyright 2017, 2018 James E. King III +# 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://boost.org/LICENSE_1_0.txt) # # Generic Travis CI 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 move 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" +# +# 1. Customize the compilers and language levels you want in the 'jobs'. +# 2. If you have more than include/, src/, test/, example/, examples/, or +# tools/ directories, modify your Travis CI project and add the environment +# variable DEPINST. For example if your build uses code in "bench/" and +# "fog/" directories, then set DEPINST to the following: +# --include bench --include fog # 3. If you want to enable Coverity Scan, you need to provide the environment # variables COVERITY_SCAN_TOKEN and COVERITY_SCAN_NOTIFICATION_EMAIL in # your github settings. # 4. Enable pull request builds in your boostorg/ account. -# 5. The default language level is C++03, you can change CXXSTD to modify it. # # That's it - the scripts will do everything else for you. -# -sudo: false -dist: trusty +dist: xenial language: cpp env: @@ -34,11 +33,9 @@ env: # - B2_LINK=link=shared,static # - B2_THREADING=threading=multi,single - B2_VARIANT=variant=release,debug - # - CXXSTD=03 - # - DEPINST="--include other" install: - - git clone https://github.com/jeking3/boost-ci.git boost-ci + - git clone https://github.com/boostorg/boost-ci.git boost-ci - cp -pr boost-ci/ci boost-ci/.codecov.yml . - source ci/travis/install.sh @@ -48,56 +45,105 @@ addons: - binutils-gold - gdb - libc6-dbg - + branches: only: - - develop - master - + - develop + - /bugfix\/.*/ + - /feature\/.*/ + - /fix\/.*/ + - /pr\/.*/ + script: - cd $BOOST_ROOT/libs/$SELF - ci/travis/build.sh +# +# Default toolsets in Ubuntu +# +# trusty xenial bionic +# 14.04 16.04 18.04 +# ------ ------ ------ +# clang 3.4 3.8 6.0 +# gcc 4.8.2 5.3.1 7.3.0 +# + +anchors: + clang-38: &clang-38 { apt: { packages: [ "clang-3.8", + "libstdc++-6-dev" ], sources: [ "llvm-toolchain-xenial-3.8", + "ubuntu-toolchain-r-test" ] } } + clang-4: &clang-4 { apt: { packages: [ "clang-4.0", + "libstdc++-6-dev" ], sources: [ "llvm-toolchain-xenial-4.0", + "ubuntu-toolchain-r-test" ] } } + clang-5: &clang-5 { apt: { packages: [ "clang-5.0", + "libstdc++-7-dev" ], sources: [ "llvm-toolchain-xenial-5.0", + "ubuntu-toolchain-r-test" ] } } + clang-6: &clang-6 { apt: { packages: [ "clang-6.0", + "libc6-dbg", + "libc++-dev", + "libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-6.0", + "ubuntu-toolchain-r-test" ] } } + clang-7: &clang-7 { apt: { packages: [ "clang-7", + "libc6-dbg", + "libc++-dev", + "libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-7", + "ubuntu-toolchain-r-test" ] } } + clang-8: &clang-8 { apt: { packages: [ "clang-8", + "libc6-dbg", + "libc++-dev", + "libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-8", + "ubuntu-toolchain-r-test" ] } } + gcc-48: &gcc-48 { apt: { packages: [ "g++-4.8" ] } } + gcc-49: &gcc-49 { apt: { packages: [ "g++-4.9" ], sources: [ "ubuntu-toolchain-r-test" ] } } + gcc-5: &gcc-5 { apt: { packages: [ "g++-5" ] } } + gcc-6: &gcc-6 { apt: { packages: [ "g++-6" ], sources: [ "ubuntu-toolchain-r-test" ] } } + gcc-7: &gcc-7 { apt: { packages: [ "g++-7" ], sources: [ "ubuntu-toolchain-r-test" ] } } + gcc-8: &gcc-8 { apt: { packages: [ "g++-8" ], sources: [ "ubuntu-toolchain-r-test" ] } } + jobs: + allow_failures: + - env: + - COPY="all the environment settings from your job" + include: - #################### Jobs to run on every pull request #################### + # libstdc++ + - { os: "linux", dist: "trusty", # xenial has libstdc++ from gcc 5.4.0 with newer ABI + env: [ "B2_TOOLSET=gcc-4.8", "B2_CXXSTD=03,11" ], addons: *gcc-48 } + - { os: "linux", dist: "trusty", # xenial has libstdc++ from gcc 5.4.0 with newer ABI + env: [ "B2_TOOLSET=gcc-4.9", "B2_CXXSTD=03,11" ], addons: *gcc-49 } + - { os: "linux", env: [ "B2_TOOLSET=gcc-5", "B2_CXXSTD=11" ], addons: *gcc-5 } + - { os: "linux", env: [ "B2_TOOLSET=gcc-6", "B2_CXXSTD=11,14" ], addons: *gcc-6 } + - { os: "linux", env: [ "B2_TOOLSET=gcc-7", "B2_CXXSTD=11,14,17" ], addons: *gcc-7 } + - { os: "linux", env: [ "B2_TOOLSET=gcc-8", "B2_CXXSTD=14,17,2a" ], addons: *gcc-8 } + - { os: "linux", dist: "trusty", # xenial has libstdc++ from gcc 5.4.0 with newer ABI + env: [ "B2_TOOLSET=clang-3.8", "B2_CXXSTD=03,11,14" ], addons: *clang-38 } + - { os: "linux", env: [ "B2_TOOLSET=clang-4.0", "B2_CXXSTD=11,14" ], addons: *clang-4 } + - { os: "linux", env: [ "B2_TOOLSET=clang-5.0", "B2_CXXSTD=11,14,17" ], addons: *clang-5 } + - { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=14,17,2a" ], addons: *clang-6 } + - { os: "linux", env: [ "B2_TOOLSET=clang-7", "B2_CXXSTD=14,17,2a" ], addons: *clang-7 } + - { os: "linux", env: [ "B2_TOOLSET=clang-8", "B2_CXXSTD=14,17,2a" ], addons: *clang-8 } + + # libc++ + - { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=03,11,14,17,2a", + "B2_CXXFLAGS=-stdlib=libc++" ], addons: *clang-6 } + - { os: "osx" , env: [ "B2_TOOLSET=clang", "B2_CXXSTD=03,11,17" ] } + + # to enable Intel ICC define INTEL_ICC_SERIAL_NUMBER and the following: + # - { os: "linux", env: [ "B2_TOOLSET=intel-linux", "B2_CXXSTD=11,14,17" ], addons: *gcc-7, + # script: cd $BOOST_ROOT/libs/$SELF && ci/travis/intelicc.sh } + - os: linux - env: - - COMMENT="C++03" - - TOOLSET=gcc,gcc-7,clang - addons: - apt: - packages: - - g++-7 - sources: - - ubuntu-toolchain-r-test - - os: linux - env: - - COMMENT="C++11" - - TOOLSET=gcc,gcc-7,clang - - CXXSTD=11 - addons: - apt: - packages: - - g++-7 - sources: - - ubuntu-toolchain-r-test - - os: linux - env: - - COMMENT=valgrind - - TOOLSET=clang - - B2_VARIANT=variant=debug - - TESTFLAGS=testing.launcher=valgrind - - VALGRIND_OPTS=--error-exitcode=1 - addons: - apt: - packages: - - clang-5.0 - - libstdc++-7-dev - - valgrind - sources: - - llvm-toolchain-trusty-5.0 - - ubuntu-toolchain-r-test + env: + - COMMENT=codecov.io + - B2_CXXSTD=03,11 + - B2_TOOLSET=gcc-8 + - B2_DEFINES="define=BOOST_NO_STRESS_TEST=1" + addons: *gcc-8 + script: + - pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && export PATH=/tmp/lcov/bin:$PATH && which lcov && lcov --version && popd + - cd $BOOST_ROOT/libs/$SELF + - ci/travis/codecov.sh - os: linux env: @@ -108,43 +154,29 @@ jobs: - os: linux env: - - COMMENT=UBSAN + - COMMENT=ubsan - B2_VARIANT=variant=debug - - TOOLSET=gcc-7 - - CXXFLAGS="cxxflags=-fno-omit-frame-pointer cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined" - - LINKFLAGS="linkflags=-fsanitize=undefined linkflags=-fno-sanitize-recover=undefined linkflags=-fuse-ld=gold" + - B2_TOOLSET=gcc-8 + - B2_CXXSTD=03,11,14,17,2a + - B2_DEFINES="define=BOOST_NO_STRESS_TEST=1" + - B2_CXXFLAGS="cxxflags=-fno-omit-frame-pointer cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=all" + - B2_LINKFLAGS="linkflags=-fsanitize=undefined linkflags=-fno-sanitize-recover=all linkflags=-fuse-ld=gold" - UBSAN_OPTIONS=print_stacktrace=1 - addons: - apt: - packages: - - g++-7 - sources: - - ubuntu-toolchain-r-test + addons: *gcc-8 - os: linux - env: - - COMMENT=CodeCov - - TOOLSET=gcc-7 - addons: - apt: - packages: - - gcc-7 - - g++-7 - sources: - - ubuntu-toolchain-r-test + env: + - COMMENT=valgrind + - B2_TOOLSET=clang-6.0 + - B2_CXXSTD=03,11,14,17,2a + - B2_DEFINES="define=BOOST_NO_STRESS_TEST=1" + - B2_VARIANT=variant=debug + - B2_TESTFLAGS=testing.launcher=valgrind + - VALGRIND_OPTS=--error-exitcode=1 + addons: *clang-6 script: - - pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && export PATH=/tmp/lcov/bin:$PATH && which lcov && lcov --version && popd - cd $BOOST_ROOT/libs/$SELF - - ci/travis/codecov.sh - - # does not work with sourced install shell yet: see - # https://travis-ci.org/jeking3/tokenizer/jobs/384903189 - # for a typical failure - # - os: osx - # osx_image: xcode9 - # env: - # - TOOLSET=clang - # - CXXSTD=03,11 + - ci/travis/valgrind.sh #################### Jobs to run on pushes to master, develop ################### @@ -153,7 +185,7 @@ jobs: if: (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (develop, master)) AND (type IN (cron, push)) env: - COMMENT="Coverity Scan" - - TOOLSET=gcc + - B2_TOOLSET=clang script: - cd $BOOST_ROOT/libs/$SELF - ci/travis/coverity.sh @@ -161,4 +193,3 @@ jobs: notifications: email: false - diff --git a/appveyor.yml b/appveyor.yml index e10b9e0..9c5b1d8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,22 +1,22 @@ # Copyright 2016, 2017 Peter Dimov -# Copyright (C) 2017, 2018 James E. King III +# Copyright (C) 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://boost.org/LICENSE_1_0.txt) # # Generic Appveyor 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 move than include/, src/, test/, example/, examples/, +# 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 +# - DEPINST: --include bench --include fog # 3. Enable pull request builds in your boostorg/ account. -# 4. The default language level is C++03, you can change CXXSTD to modify it. # -# That's it - the scripts will do everything else for you. +# That's it - the script will do everything else for you. # version: 1.0.{build}-{branch} @@ -25,67 +25,95 @@ shallow_clone: true branches: only: - - develop - master + - develop + - /bugfix\/.*/ + - /feature\/.*/ + - /fix\/.*/ + - /pr\/.*/ matrix: + # Adding MAYFAIL to any matrix job allows it to fail but the build stays green: allow_failures: - MAYFAIL: true environment: global: # see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties - # to use the default for a given environment, comment it out; recommend you build debug and release however.. - # on Windows it is important to exercise all the possibilities, especially shared vs static + # to use the default for a given environment, comment it out; recommend you build debug and release however: + # on Windows it is important to exercise all the possibilities, especially shared vs static, however most + # libraries that care about this exercise it in their Jamfiles... # B2_ADDRESS_MODEL: address-model=64,32 # B2_LINK: link=shared,static # B2_THREADING: threading=multi,single B2_VARIANT: variant=release,debug - CXXSTD: 03 - # DEPINST: --include otherdir matrix: - - FLAVOR: Visual Studio 2017 + - FLAVOR: Visual Studio 2017 C++2a Strict + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + B2_ADDRESS_MODEL: address-model=64 + B2_CXXFLAGS: cxxflags=-permissive- + B2_CXXSTD: latest # 2a + B2_TOOLSET: msvc-14.1 + + - FLAVOR: Visual Studio 2017 C++17 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + B2_ADDRESS_MODEL: address-model=64 + B2_CXXSTD: 17 + B2_TOOLSET: msvc-14.1 + + - FLAVOR: Visual Studio 2017 C++14 (Default) APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - TOOLSET: msvc-14.1 B2_ADDRESS_MODEL: address-model=64,32 - - FLAVOR: Visual Studio 2015 + B2_TOOLSET: msvc-14.1 + + - FLAVOR: Visual Studio 2015 C++14 (Default) APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - TOOLSET: msvc-14.0 B2_ADDRESS_MODEL: address-model=64,32 + B2_TOOLSET: msvc-14.0 + - FLAVOR: Visual Studio 2010, 2012, 2013 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 - TOOLSET: msvc-10.0,msvc-11.0,msvc-12.0 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + B2_TOOLSET: msvc-10.0,msvc-11.0,msvc-12.0 + - FLAVOR: cygwin (32-bit) APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 ADDPATH: C:\cygwin\bin; B2_ADDRESS_MODEL: address-model=32 + B2_CXXSTD: 03,11 # https://github.com/boostorg/test/issues/144 - DEFINES: define=_POSIX_C_SOURCE=200112L - THREADING: threadapi=pthread - TOOLSET: gcc + B2_DEFINES: define=_POSIX_C_SOURCE=200112L + B2_THREADING: threadapi=pthread + B2_TOOLSET: gcc + - FLAVOR: cygwin (64-bit) APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 ADDPATH: C:\cygwin64\bin; B2_ADDRESS_MODEL: address-model=64 + B2_CXXSTD: 11,17 # https://github.com/boostorg/test/issues/144 - DEFINES: define=_POSIX_C_SOURCE=200112L - THREADING: threadapi=pthread - TOOLSET: gcc - - FLAVOR: mingw32 + B2_DEFINES: define=_POSIX_C_SOURCE=200112L define=__USE_ISOC99 + B2_THREADING: threadapi=pthread + B2_TOOLSET: gcc + + - FLAVOR: mingw32 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - ARCH: i686 + ARCH: i686 B2_ADDRESS_MODEL: address-model=32 - SCRIPT: ci\appveyor\mingw.bat - - FLAVOR: mingw64 + B2_CXXSTD: 03,11 + SCRIPT: ci\appveyor\mingw.bat + + - FLAVOR: mingw64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - ARCH: x86_64 + ARCH: x86_64 B2_ADDRESS_MODEL: address-model=64 - SCRIPT: ci\appveyor\mingw.bat + B2_CXXSTD: 11,17 + B2_DEFINES: define=__USE_ISOC99 + SCRIPT: ci\appveyor\mingw.bat install: - set SELF=%APPVEYOR_PROJECT_NAME:-=_% - - git clone https://github.com/jeking3/boost-ci.git C:\boost-ci + - git clone https://github.com/boostorg/boost-ci.git C:\boost-ci - xcopy /s /e /q /i C:\boost-ci\ci .\ci - ci\appveyor\install.bat @@ -94,5 +122,9 @@ build: off test_script: - set SELF=%APPVEYOR_PROJECT_NAME:-=_% - PATH=%ADDPATH%%PATH% - - IF DEFINED SCRIPT (call libs\%SELF%\%SCRIPT%) ELSE (b2 libs/%SELF% toolset=%TOOLSET% cxxstd=%CXXSTD% %CXXFLAGS% %DEFINES% %THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3) - + # 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%) + # Echo the complete build command to the build log + - IF NOT DEFINED SCRIPT (ECHO b2 libs/%SELF:\=/% %B2_TOOLCXX% %B2_CXXFLAGS% %B2_DEFINES% %B2_THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3) + # Now go build... + - IF DEFINED SCRIPT (call libs\%SELF%\%SCRIPT%) ELSE (b2 libs/%SELF:\=/% %B2_TOOLCXX% %B2_CXXFLAGS% %B2_DEFINES% %B2_THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3)