blob: 49d6fc96a8fd4fb0195d95c2a714976f041a4a60 [file] [log] [blame]
Brian Silvermane4580902018-08-04 23:36:31 -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/, or
13# tools/ directories, modify your Travis CI project and add the environment
14# variable DEPINST. For example if your build uses code in "bench/" and
15# "fog/" directories, then set DEPINST to the following:
16# --include bench --include fog
17# 3. If you want to enable Coverity Scan, you need to provide the environment
18# variables COVERITY_SCAN_TOKEN and COVERITY_SCAN_NOTIFICATION_EMAIL in
19# your github settings.
20# 4. Enable pull request builds in your boostorg/<library> account.
21# 5. Change the default C++ version in ci/travis/*.sh (search for CXXSTD) if needed.
22#
23# That's it - the scripts will do everything else for you.
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
38install:
39 - git clone https://github.com/jeking3/boost-ci.git boost-ci
40 - cp -pr boost-ci/ci boost-ci/.codecov.yml .
41 - source ci/travis/install.sh
42
43addons:
44 apt:
45 packages:
46 - binutils-gold
47 - gdb
48 - libc6-dbg
49
50branches:
51 only:
52 - develop
53 - master
54
55script:
56 - cd $BOOST_ROOT/libs/$SELF
57 - ci/travis/build.sh
58
59jobs:
60 include:
61 #################### Jobs to run on every pull request ####################
62 - os: linux
63 env:
64 - COMMENT="C++03"
65 - TOOLSET=gcc,gcc-7,clang
66 addons:
67 apt:
68 packages:
69 - g++-7
70 sources:
71 - ubuntu-toolchain-r-test
72 - os: linux
73 env:
74 - COMMENT="C++11"
75 - TOOLSET=gcc,gcc-7,clang
76 - CXXSTD=11
77 addons:
78 apt:
79 packages:
80 - g++-7
81 sources:
82 - ubuntu-toolchain-r-test
83 - os: linux
84 env:
85 - COMMENT=valgrind
86 - TOOLSET=clang
87 - B2_VARIANT=variant=debug
88 - TESTFLAGS=testing.launcher=valgrind
89 - VALGRIND_OPTS=--error-exitcode=1
90 addons:
91 apt:
92 packages:
93 - clang-5.0
94 - libstdc++-7-dev
95 - valgrind
96 sources:
97 - llvm-toolchain-trusty-5.0
98 - ubuntu-toolchain-r-test
99
100 - os: linux
101 env:
102 - COMMENT=cppcheck
103 script:
104 - cd $BOOST_ROOT/libs/$SELF
105 - ci/travis/cppcheck.sh
106
107 - os: linux
108 env:
109 - COMMENT=UBSAN
110 - B2_VARIANT=variant=debug
111 - TOOLSET=gcc-7
112 - CXXFLAGS="cxxflags=-fno-omit-frame-pointer cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined"
113 - LINKFLAGS="linkflags=-fsanitize=undefined linkflags=-fno-sanitize-recover=undefined linkflags=-fuse-ld=gold"
114 - UBSAN_OPTIONS=print_stacktrace=1
115 addons:
116 apt:
117 packages:
118 - g++-7
119 sources:
120 - ubuntu-toolchain-r-test
121
122 - os: linux
123 env:
124 - COMMENT=CodeCov
125 - TOOLSET=gcc-7
126 addons:
127 apt:
128 packages:
129 - gcc-7
130 - g++-7
131 sources:
132 - ubuntu-toolchain-r-test
133 script:
134 - pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && export PATH=/tmp/lcov/bin:$PATH && which lcov && lcov --version && popd
135 - cd $BOOST_ROOT/libs/$SELF
136 - ci/travis/codecov.sh
137
138 # does not work with sources install shell yet: see
139 # https://travis-ci.org/jeking3/tokenizer/jobs/384903189
140 # for a typical failure
141 # - os: osx
142 # osx_image: xcode9
143 # env:
144 # - TOOLSET=clang
145 # - CXXSTD=03,11
146
147 #################### Jobs to run on pushes to master, develop ###################
148
149 # Coverity Scan
150 - os: linux
151 if: (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (develop, master)) AND (type IN (cron, push))
152 env:
153 - COMMENT="Coverity Scan"
154 - TOOLSET=gcc
155 script:
156 - cd $BOOST_ROOT/libs/$SELF
157 - ci/travis/coverity.sh
158
159notifications:
160 email:
161 false
162