Skip to content

Commit

Permalink
Update CI Scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jeking3 committed Oct 14, 2019
1 parent 2fabfad commit c0b71da
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 98 deletions.
167 changes: 108 additions & 59 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# 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/jeking3/boost-ci
# See: https://github.com/boostorg/boost-ci
#
# Instructions for customizing this script for your library:
#
#
# 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
Expand All @@ -22,21 +22,19 @@
#
# That's it - the scripts will do everything else for you.

sudo: false
dist: trusty
dist: xenial
language: cpp

env:
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..
# - B2_ADDRESS_MODEL=address-model=64,32
# - B2_LINK=link=shared,static
# - B2_THREADING=threading=multi,single
- B2_VARIANT=variant=release,debug
- B2_VARIANT=variant=release

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

Expand All @@ -46,12 +44,16 @@ 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
Expand All @@ -67,95 +69,143 @@ script:
#

anchors:
clang-34: &clang-34 { apt: { packages: [ "clang-3.4" ], sources: [ "llvm-toolchain-trusty-3.4" ] } }
clang-38: &clang-38 { apt: { packages: [ "clang-3.8",
"libstdc++-6-dev" ], sources: [ "llvm-toolchain-trusty-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-trusty-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-trusty-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",
"valgrind" ], sources: [ "llvm-toolchain-trusty-6.0",
"libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-7",
"ubuntu-toolchain-r-test" ] } }
gcc-44: &gcc-44 { apt: { packages: [ "g++-4.4" ], sources: [ "ubuntu-toolchain-r-test" ] } }
gcc-46: &gcc-46 { apt: { packages: [ "g++-4.6" ], sources: [ "ubuntu-toolchain-r-test" ] } }
gcc-48: &gcc-48 { apt: { packages: [ "g++-4.8" ], sources: [ "ubuntu-toolchain-r-test" ] } }
gcc-5: &gcc-5 { apt: { packages: [ "g++-5" ], sources: [ "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" ] } }
gcc-9: &gcc-9 { apt: { packages: [ "g++-9" ], sources: [ "ubuntu-toolchain-r-test" ] } }

jobs:
allow_failures:
# https://github.com/boostorg/date_time/issues/111
- env:
- COPY="all the environment settings from your job"
- COMMENT=ubsan
- B2_VARIANT=variant=debug
- B2_TOOLSET=gcc-8
- B2_CXXSTD=03,11,14
- B2_CXXFLAGS="undefined-sanitizer=norecover"
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
- B2_LINKFLAGS="linkflags=-fuse-ld=gold"
- UBSAN_OPTIONS=print_stacktrace=1

include:
# libstdc++
- { os: "linux", env: [ "TOOLSET=gcc-4.4", "CXXSTD=98,0x" ], addons: *gcc-44 }
- { os: "linux", env: [ "TOOLSET=gcc-4.6", "CXXSTD=03,0x" ], addons: *gcc-46 }
- { os: "linux", env: [ "TOOLSET=gcc-4.8", "CXXSTD=03,11" ], addons: *gcc-48 }
- { os: "linux", env: [ "TOOLSET=gcc-5", "CXXSTD=03,11" ], addons: *gcc-5 }
- { os: "linux", env: [ "TOOLSET=gcc-6", "CXXSTD=03,11,14" ], addons: *gcc-6 }
- { os: "linux", env: [ "TOOLSET=gcc-7", "CXXSTD=03,11,14,17" ], addons: *gcc-7 }
- { os: "linux", env: [ "TOOLSET=gcc-8", "CXXSTD=03,11,14,17,2a" ], addons: *gcc-8 }
- { os: "linux", env: [ "TOOLSET=clang-3.4", "CXXSTD=03,11" ], addons: *clang-34 }
- { os: "linux", env: [ "TOOLSET=clang-3.8", "CXXSTD=03,11,14" ], addons: *clang-38 }
- { os: "linux", env: [ "TOOLSET=clang-4.0", "CXXSTD=03,11,14" ], addons: *clang-4 }
- { os: "linux", env: [ "TOOLSET=clang-5.0", "CXXSTD=03,11,14,17" ], addons: *clang-5 }
- { os: "linux", env: [ "TOOLSET=clang-6.0", "CXXSTD=03,11,14,17,2a" ], addons: *clang-6 }
- { 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=03,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=14,17" ], addons: *gcc-7 }
- { os: "linux", env: [ "B2_TOOLSET=gcc-8", "B2_CXXSTD=17,2a" ], addons: *gcc-8 }
- { os: "linux", env: [ "B2_TOOLSET=gcc-9", "B2_CXXSTD=17,2a" ], addons: *gcc-9 }
- { 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" ], 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" ], addons: *clang-5 }
- { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=14,17" ], addons: *clang-6 }
- { os: "linux", env: [ "B2_TOOLSET=clang-7", "B2_CXXSTD=17,2a" ], addons: *clang-7 }
- { os: "linux", env: [ "B2_TOOLSET=clang-8", "B2_CXXSTD=17,2a" ], addons: *clang-8 }

# libc++
- { os: "linux", env: [ "TOOLSET=clang-6.0", "CXXSTD=03,11,14,17,2a",
"CXXFLAGS=-stdlib=libc++" ], addons: *clang-6 }
# the rvm environment on osx is taking over basic commands like "cd" and breaking things!
# - { os: "osx" , env: [ "COMMENT=libc++",
# "TOOLSET=clang", "CXXSTD=03,11,14" ] }
- { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=03,11,14",
"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:
env:
- COMMENT=codecov.io
- TOOLSET=gcc-7
- DEFINES="define=BOOST_NO_STRESS_TEST=1"
addons: *gcc-7
- 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:
- COMMENT=cppcheck
script:
- cd $BOOST_ROOT/libs/$SELF
- ci/travis/cppcheck.sh
- COMMENT=asan
- B2_VARIANT=variant=debug
- B2_TOOLSET=gcc-8
- B2_CXXSTD=03,11,14
- B2_CXXFLAGS="address-sanitizer=norecover"
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
addons: *gcc-8

- os: linux
env:
- COMMENT=tsan
- B2_VARIANT=variant=debug
- B2_TOOLSET=gcc-8
- B2_CXXSTD=03,11,14
- B2_CXXFLAGS="thread-sanitizer=norecover"
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
addons: *gcc-8

- os: linux
env:
- COMMENT=ubsan
- B2_VARIANT=variant=debug
- TOOLSET=gcc-8
- CXXSTD=03,11,14,17,2a
- DEFINES="define=BOOST_NO_STRESS_TEST=1"
- 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
- B2_CXXFLAGS="undefined-sanitizer=norecover"
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
# https://github.com/boostorg/build/issues/451 using the gold linker to work around an issue
- B2_LINKFLAGS="linkflags=-fuse-ld=gold"
- UBSAN_OPTIONS=print_stacktrace=1
addons: *gcc-8

- os: linux
env:
- COMMENT=valgrind
- TOOLSET=clang-6.0
- CXXSTD=03,11,14,17,2a
- DEFINES="define=BOOST_NO_STRESS_TEST=1"
- B2_TOOLSET=clang-6.0
- B2_CXXSTD=03,11,14
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
- B2_VARIANT=variant=debug
- TESTFLAGS=testing.launcher=valgrind
- B2_TESTFLAGS=testing.launcher=valgrind
- VALGRIND_OPTS=--error-exitcode=1
addons: *clang-6
script:
- cd $BOOST_ROOT/libs/$SELF
- ci/travis/valgrind.sh

# - os: linux
# env:
# - COMMENT=cppcheck
# script:
# - cd $BOOST_ROOT/libs/$SELF
# - ci/travis/cppcheck.sh

#################### Jobs to run on pushes to master, develop ###################

Expand All @@ -164,8 +214,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-7
addons: *gcc-7
- B2_TOOLSET=clang
script:
- cd $BOOST_ROOT/libs/$SELF
- ci/travis/coverity.sh
Expand Down
Loading

0 comments on commit c0b71da

Please sign in to comment.