blob: 99152564e02f1941d783cb308d6b561462b55b84 [file] [log] [blame]
Brian Silverman1f5d3982018-08-04 23:37:52 -07001# Copyright 2016 Peter Dimov
2# Copyright 2017, 2018 James E. King III
3# Distributed under the Boost Software License, Version 1.0.
4# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
5
6#
7# Generic Travis CI build script for boostorg repositories
8#
9# Instructions for customizing this script for your library:
10#
11# 1. Customize the compilers and language levels you want.
12# 2. If you have move than include/, src/, test/, example/, examples/,
13# benchmark/ or tools/ directories, set the environment variable DEPINST.
14# For example if your build uses code in "bench/" and "fog/" directories:
15# - DEPINST="--include bench --include fog"
16# 3. If you want to enable Coverity Scan, you need to provide the environment
17# variables COVERITY_SCAN_TOKEN and COVERITY_SCAN_NOTIFICATION_EMAIL in
18# your github settings.
19# 4. Enable pull request builds in your boostorg/<library> account.
20# 5. The default language level is C++03, you can change CXXSTD to modify it.
21#
22# That's it - the scripts will do everything else for you.
23#
24
25sudo: false
26dist: trusty
27language: cpp
28
29env:
30 global:
31 # see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
32 # to use the default for a given environment, comment it out; recommend you build debug and release however..
33 # - B2_ADDRESS_MODEL=address-model=64,32
34 # - B2_LINK=link=shared,static
35 # - B2_THREADING=threading=multi,single
36 - B2_VARIANT=variant=release,debug
37 # - CXXSTD=03
38 # - DEPINST="--include other"
39
40install:
41 - git clone https://github.com/jeking3/boost-ci.git boost-ci
42 - cp -pr boost-ci/ci boost-ci/.codecov.yml .
43 - source ci/travis/install.sh
44
45addons:
46 apt:
47 packages:
48 - binutils-gold
49 - gdb
50 - libc6-dbg
51
52branches:
53 only:
54 - develop
55 - master
56
57script:
58 - cd $BOOST_ROOT/libs/$SELF
59 - ci/travis/build.sh
60
61jobs:
62 include:
63 #################### Jobs to run on every pull request ####################
64 - os: linux
65 env:
66 - COMMENT="C++03"
67 - TOOLSET=gcc,gcc-7,clang
68 addons:
69 apt:
70 packages:
71 - g++-7
72 sources:
73 - ubuntu-toolchain-r-test
74 - os: linux
75 env:
76 - COMMENT="C++11"
77 - TOOLSET=gcc,gcc-7,clang
78 - CXXSTD=11
79 addons:
80 apt:
81 packages:
82 - g++-7
83 sources:
84 - ubuntu-toolchain-r-test
85 - os: linux
86 env:
87 - COMMENT=valgrind
88 - TOOLSET=clang
89 - B2_VARIANT=variant=debug
90 - TESTFLAGS=testing.launcher=valgrind
91 - VALGRIND_OPTS=--error-exitcode=1
92 addons:
93 apt:
94 packages:
95 - clang-5.0
96 - libstdc++-7-dev
97 - valgrind
98 sources:
99 - llvm-toolchain-trusty-5.0
100 - ubuntu-toolchain-r-test
101
102 - os: linux
103 env:
104 - COMMENT=cppcheck
105 script:
106 - cd $BOOST_ROOT/libs/$SELF
107 - ci/travis/cppcheck.sh
108
109 - os: linux
110 env:
111 - COMMENT=UBSAN
112 - B2_VARIANT=variant=debug
113 - TOOLSET=gcc-7
114 - CXXFLAGS="cxxflags=-fno-omit-frame-pointer cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined"
115 - LINKFLAGS="linkflags=-fsanitize=undefined linkflags=-fno-sanitize-recover=undefined linkflags=-fuse-ld=gold"
116 - UBSAN_OPTIONS=print_stacktrace=1
117 addons:
118 apt:
119 packages:
120 - g++-7
121 sources:
122 - ubuntu-toolchain-r-test
123
124 - os: linux
125 env:
126 - COMMENT=CodeCov
127 - TOOLSET=gcc-7
128 addons:
129 apt:
130 packages:
131 - gcc-7
132 - g++-7
133 sources:
134 - ubuntu-toolchain-r-test
135 script:
136 - pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && export PATH=/tmp/lcov/bin:$PATH && which lcov && lcov --version && popd
137 - cd $BOOST_ROOT/libs/$SELF
138 - ci/travis/codecov.sh
139
140 # does not work with sourced install shell yet: see
141 # https://travis-ci.org/jeking3/tokenizer/jobs/384903189
142 # for a typical failure
143 # - os: osx
144 # osx_image: xcode9
145 # env:
146 # - TOOLSET=clang
147 # - CXXSTD=03,11
148
149 #################### Jobs to run on pushes to master, develop ###################
150
151 # Coverity Scan
152 - os: linux
153 if: (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (develop, master)) AND (type IN (cron, push))
154 env:
155 - COMMENT="Coverity Scan"
156 - TOOLSET=gcc
157 script:
158 - cd $BOOST_ROOT/libs/$SELF
159 - ci/travis/coverity.sh
160
161notifications:
162 email:
163 false
164