Skip to content

Commit e26fd2e

Browse files
authored
pull develop to master for boost 1.72 (splunk#117)
* Synchronize each miscrosec test to the next second (splunk#109) * Synchronize each miscrosec test to the next second The aim is to avoid false positives in test_microsec when the seconds, minutes or hours change during time read between the second_clock and the microsec_clock. * Improved readability of the microcec_time_clock test * Improve performance of adding and subtracting time durations from a ptime. (splunk#99) Modifying ptime objects by adding and subtracting time durations was inefficient because it extracted the date and time of day and then re-constructed a ptime using the date and modified time of day. This can be avoided by using the existing time_system utilities which perform the operation by adjusting the number of ticks. Performance is improved by a factor of 48 on my system. * Update CI Scripts * Add time_duration helper functions: (splunk#113) 1. is_positive() - Return boolean value to indicate whether or not time duration is positive. 2. is_zero() - Return boolean value to indicate whether or not time duration is zero. 3. abs() - Return a time_duration which is the absolute value of time duration. Added documentation for these helper functions and improved existing documentation to indicate constness, return values or static functions. * Cease dependence on MPL (splunk#115)
1 parent 29bb209 commit e26fd2e

File tree

11 files changed

+329
-178
lines changed

11 files changed

+329
-178
lines changed

.travis.yml

Lines changed: 108 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Copyright 2016 Peter Dimov
2-
# Copyright 2017, 2018 James E. King III
2+
# Copyright 2017 - 2019 James E. King III
33
# Distributed under the Boost Software License, Version 1.0.
44
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
55

66
#
77
# Generic Travis CI build script for boostorg repositories
8-
# See: https://github.com/jeking3/boost-ci
8+
# See: https://github.com/boostorg/boost-ci
99
#
1010
# Instructions for customizing this script for your library:
11-
#
11+
#
1212
# 1. Customize the compilers and language levels you want in the 'jobs'.
1313
# 2. If you have more than include/, src/, test/, example/, examples/, or
1414
# tools/ directories, modify your Travis CI project and add the environment
@@ -22,21 +22,19 @@
2222
#
2323
# That's it - the scripts will do everything else for you.
2424

25-
sudo: false
26-
dist: trusty
25+
dist: xenial
2726
language: cpp
2827

2928
env:
3029
global:
3130
# 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..
3331
# - B2_ADDRESS_MODEL=address-model=64,32
3432
# - B2_LINK=link=shared,static
3533
# - B2_THREADING=threading=multi,single
36-
- B2_VARIANT=variant=release,debug
34+
- B2_VARIANT=variant=release
3735

3836
install:
39-
- git clone https://github.com/jeking3/boost-ci.git boost-ci
37+
- git clone https://github.com/boostorg/boost-ci.git boost-ci
4038
- cp -pr boost-ci/ci boost-ci/.codecov.yml .
4139
- source ci/travis/install.sh
4240

@@ -46,12 +44,16 @@ addons:
4644
- binutils-gold
4745
- gdb
4846
- libc6-dbg
49-
47+
5048
branches:
5149
only:
52-
- develop
5350
- master
54-
51+
- develop
52+
- /bugfix\/.*/
53+
- /feature\/.*/
54+
- /fix\/.*/
55+
- /pr\/.*/
56+
5557
script:
5658
- cd $BOOST_ROOT/libs/$SELF
5759
- ci/travis/build.sh
@@ -67,95 +69,143 @@ script:
6769
#
6870

6971
anchors:
70-
clang-34: &clang-34 { apt: { packages: [ "clang-3.4" ], sources: [ "llvm-toolchain-trusty-3.4" ] } }
7172
clang-38: &clang-38 { apt: { packages: [ "clang-3.8",
72-
"libstdc++-6-dev" ], sources: [ "llvm-toolchain-trusty-3.8",
73+
"libstdc++-6-dev" ], sources: [ "llvm-toolchain-xenial-3.8",
7374
"ubuntu-toolchain-r-test" ] } }
7475
clang-4: &clang-4 { apt: { packages: [ "clang-4.0",
75-
"libstdc++-6-dev" ], sources: [ "llvm-toolchain-trusty-4.0",
76+
"libstdc++-6-dev" ], sources: [ "llvm-toolchain-xenial-4.0",
7677
"ubuntu-toolchain-r-test" ] } }
7778
clang-5: &clang-5 { apt: { packages: [ "clang-5.0",
78-
"libstdc++-7-dev" ], sources: [ "llvm-toolchain-trusty-5.0",
79+
"libstdc++-7-dev" ], sources: [ "llvm-toolchain-xenial-5.0",
7980
"ubuntu-toolchain-r-test" ] } }
8081
clang-6: &clang-6 { apt: { packages: [ "clang-6.0",
82+
"libc6-dbg",
83+
"libc++-dev",
84+
"libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-6.0",
85+
"ubuntu-toolchain-r-test" ] } }
86+
clang-7: &clang-7 { apt: { packages: [ "clang-7",
87+
"libc6-dbg",
8188
"libc++-dev",
82-
"libstdc++-8-dev",
83-
"valgrind" ], sources: [ "llvm-toolchain-trusty-6.0",
89+
"libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-7",
8490
"ubuntu-toolchain-r-test" ] } }
85-
gcc-44: &gcc-44 { apt: { packages: [ "g++-4.4" ], sources: [ "ubuntu-toolchain-r-test" ] } }
86-
gcc-46: &gcc-46 { apt: { packages: [ "g++-4.6" ], sources: [ "ubuntu-toolchain-r-test" ] } }
87-
gcc-48: &gcc-48 { apt: { packages: [ "g++-4.8" ], sources: [ "ubuntu-toolchain-r-test" ] } }
88-
gcc-5: &gcc-5 { apt: { packages: [ "g++-5" ], sources: [ "ubuntu-toolchain-r-test" ] } }
91+
clang-8: &clang-8 { apt: { packages: [ "clang-8",
92+
"libc6-dbg",
93+
"libc++-dev",
94+
"libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-8",
95+
"ubuntu-toolchain-r-test" ] } }
96+
gcc-48: &gcc-48 { apt: { packages: [ "g++-4.8" ] } }
97+
gcc-49: &gcc-49 { apt: { packages: [ "g++-4.9" ], sources: [ "ubuntu-toolchain-r-test" ] } }
98+
gcc-5: &gcc-5 { apt: { packages: [ "g++-5" ] } }
8999
gcc-6: &gcc-6 { apt: { packages: [ "g++-6" ], sources: [ "ubuntu-toolchain-r-test" ] } }
90100
gcc-7: &gcc-7 { apt: { packages: [ "g++-7" ], sources: [ "ubuntu-toolchain-r-test" ] } }
91101
gcc-8: &gcc-8 { apt: { packages: [ "g++-8" ], sources: [ "ubuntu-toolchain-r-test" ] } }
102+
gcc-9: &gcc-9 { apt: { packages: [ "g++-9" ], sources: [ "ubuntu-toolchain-r-test" ] } }
92103

93104
jobs:
94105
allow_failures:
106+
# https://github.com/boostorg/date_time/issues/111
95107
- env:
96-
- COPY="all the environment settings from your job"
108+
- COMMENT=ubsan
109+
- B2_VARIANT=variant=debug
110+
- B2_TOOLSET=gcc-8
111+
- B2_CXXSTD=03,11,14
112+
- B2_CXXFLAGS="undefined-sanitizer=norecover"
113+
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
114+
- B2_LINKFLAGS="linkflags=-fuse-ld=gold"
115+
- UBSAN_OPTIONS=print_stacktrace=1
97116

98117
include:
99118
# libstdc++
100-
- { os: "linux", env: [ "TOOLSET=gcc-4.4", "CXXSTD=98,0x" ], addons: *gcc-44 }
101-
- { os: "linux", env: [ "TOOLSET=gcc-4.6", "CXXSTD=03,0x" ], addons: *gcc-46 }
102-
- { os: "linux", env: [ "TOOLSET=gcc-4.8", "CXXSTD=03,11" ], addons: *gcc-48 }
103-
- { os: "linux", env: [ "TOOLSET=gcc-5", "CXXSTD=03,11" ], addons: *gcc-5 }
104-
- { os: "linux", env: [ "TOOLSET=gcc-6", "CXXSTD=03,11,14" ], addons: *gcc-6 }
105-
- { os: "linux", env: [ "TOOLSET=gcc-7", "CXXSTD=03,11,14,17" ], addons: *gcc-7 }
106-
- { os: "linux", env: [ "TOOLSET=gcc-8", "CXXSTD=03,11,14,17,2a" ], addons: *gcc-8 }
107-
- { os: "linux", env: [ "TOOLSET=clang-3.4", "CXXSTD=03,11" ], addons: *clang-34 }
108-
- { os: "linux", env: [ "TOOLSET=clang-3.8", "CXXSTD=03,11,14" ], addons: *clang-38 }
109-
- { os: "linux", env: [ "TOOLSET=clang-4.0", "CXXSTD=03,11,14" ], addons: *clang-4 }
110-
- { os: "linux", env: [ "TOOLSET=clang-5.0", "CXXSTD=03,11,14,17" ], addons: *clang-5 }
111-
- { os: "linux", env: [ "TOOLSET=clang-6.0", "CXXSTD=03,11,14,17,2a" ], addons: *clang-6 }
119+
- { os: "linux", dist: "trusty", # xenial has libstdc++ from gcc 5.4.0 with newer ABI
120+
env: [ "B2_TOOLSET=gcc-4.8", "B2_CXXSTD=03,11" ], addons: *gcc-48 }
121+
- { os: "linux", dist: "trusty", # xenial has libstdc++ from gcc 5.4.0 with newer ABI
122+
env: [ "B2_TOOLSET=gcc-4.9", "B2_CXXSTD=03,11" ], addons: *gcc-49 }
123+
- { os: "linux", env: [ "B2_TOOLSET=gcc-5", "B2_CXXSTD=03,11" ], addons: *gcc-5 }
124+
- { os: "linux", env: [ "B2_TOOLSET=gcc-6", "B2_CXXSTD=11,14" ], addons: *gcc-6 }
125+
- { os: "linux", env: [ "B2_TOOLSET=gcc-7", "B2_CXXSTD=14,17" ], addons: *gcc-7 }
126+
- { os: "linux", env: [ "B2_TOOLSET=gcc-8", "B2_CXXSTD=17,2a" ], addons: *gcc-8 }
127+
- { os: "linux", env: [ "B2_TOOLSET=gcc-9", "B2_CXXSTD=17,2a" ], addons: *gcc-9 }
128+
- { os: "linux", dist: "trusty", # xenial has libstdc++ from gcc 5.4.0 with newer ABI
129+
env: [ "B2_TOOLSET=clang-3.8", "B2_CXXSTD=03,11" ], addons: *clang-38 }
130+
- { os: "linux", env: [ "B2_TOOLSET=clang-4.0", "B2_CXXSTD=11,14" ], addons: *clang-4 }
131+
- { os: "linux", env: [ "B2_TOOLSET=clang-5.0", "B2_CXXSTD=11,14" ], addons: *clang-5 }
132+
- { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=14,17" ], addons: *clang-6 }
133+
- { os: "linux", env: [ "B2_TOOLSET=clang-7", "B2_CXXSTD=17,2a" ], addons: *clang-7 }
134+
- { os: "linux", env: [ "B2_TOOLSET=clang-8", "B2_CXXSTD=17,2a" ], addons: *clang-8 }
135+
112136
# libc++
113-
- { os: "linux", env: [ "TOOLSET=clang-6.0", "CXXSTD=03,11,14,17,2a",
114-
"CXXFLAGS=-stdlib=libc++" ], addons: *clang-6 }
115-
# the rvm environment on osx is taking over basic commands like "cd" and breaking things!
116-
# - { os: "osx" , env: [ "COMMENT=libc++",
117-
# "TOOLSET=clang", "CXXSTD=03,11,14" ] }
137+
- { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=03,11,14",
138+
"B2_CXXFLAGS=-stdlib=libc++" ], addons: *clang-6 }
139+
- { os: "osx" , env: [ "B2_TOOLSET=clang", "B2_CXXSTD=03,11,17" ] }
140+
141+
# to enable Intel ICC define INTEL_ICC_SERIAL_NUMBER and the following:
142+
# - { os: "linux", env: [ "B2_TOOLSET=intel-linux", "B2_CXXSTD=11,14,17" ], addons: *gcc-7,
143+
# script: cd $BOOST_ROOT/libs/$SELF && ci/travis/intelicc.sh }
118144

119145
- os: linux
120-
env:
146+
env:
121147
- COMMENT=codecov.io
122-
- TOOLSET=gcc-7
123-
- DEFINES="define=BOOST_NO_STRESS_TEST=1"
124-
addons: *gcc-7
148+
- B2_CXXSTD=03,11
149+
- B2_TOOLSET=gcc-8
150+
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
151+
addons: *gcc-8
125152
script:
126-
- pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && export PATH=/tmp/lcov/bin:$PATH && which lcov && lcov --version && popd
127153
- cd $BOOST_ROOT/libs/$SELF
128154
- ci/travis/codecov.sh
129155

130156
- os: linux
131157
env:
132-
- COMMENT=cppcheck
133-
script:
134-
- cd $BOOST_ROOT/libs/$SELF
135-
- ci/travis/cppcheck.sh
158+
- COMMENT=asan
159+
- B2_VARIANT=variant=debug
160+
- B2_TOOLSET=gcc-8
161+
- B2_CXXSTD=03,11,14
162+
- B2_CXXFLAGS="address-sanitizer=norecover"
163+
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
164+
addons: *gcc-8
165+
166+
- os: linux
167+
env:
168+
- COMMENT=tsan
169+
- B2_VARIANT=variant=debug
170+
- B2_TOOLSET=gcc-8
171+
- B2_CXXSTD=03,11,14
172+
- B2_CXXFLAGS="thread-sanitizer=norecover"
173+
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
174+
addons: *gcc-8
136175

137176
- os: linux
138177
env:
139178
- COMMENT=ubsan
140179
- B2_VARIANT=variant=debug
141-
- TOOLSET=gcc-8
142-
- CXXSTD=03,11,14,17,2a
143-
- DEFINES="define=BOOST_NO_STRESS_TEST=1"
144-
- CXXFLAGS="cxxflags=-fno-omit-frame-pointer cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined"
145-
- LINKFLAGS="linkflags=-fsanitize=undefined linkflags=-fno-sanitize-recover=undefined linkflags=-fuse-ld=gold"
180+
- B2_TOOLSET=gcc-8
181+
- B2_CXXSTD=03,11,14
182+
- B2_CXXFLAGS="undefined-sanitizer=norecover"
183+
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
184+
# https://github.com/boostorg/build/issues/451 using the gold linker to work around an issue
185+
- B2_LINKFLAGS="linkflags=-fuse-ld=gold"
146186
- UBSAN_OPTIONS=print_stacktrace=1
147187
addons: *gcc-8
148188

149189
- os: linux
150190
env:
151191
- COMMENT=valgrind
152-
- TOOLSET=clang-6.0
153-
- CXXSTD=03,11,14,17,2a
154-
- DEFINES="define=BOOST_NO_STRESS_TEST=1"
192+
- B2_TOOLSET=clang-6.0
193+
- B2_CXXSTD=03,11,14
194+
- B2_DEFINES="define=BOOST_NO_STRESS_TEST=1"
155195
- B2_VARIANT=variant=debug
156-
- TESTFLAGS=testing.launcher=valgrind
196+
- B2_TESTFLAGS=testing.launcher=valgrind
157197
- VALGRIND_OPTS=--error-exitcode=1
158198
addons: *clang-6
199+
script:
200+
- cd $BOOST_ROOT/libs/$SELF
201+
- ci/travis/valgrind.sh
202+
203+
# - os: linux
204+
# env:
205+
# - COMMENT=cppcheck
206+
# script:
207+
# - cd $BOOST_ROOT/libs/$SELF
208+
# - ci/travis/cppcheck.sh
159209

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

@@ -164,8 +214,7 @@ jobs:
164214
if: (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (develop, master)) AND (type IN (cron, push))
165215
env:
166216
- COMMENT="Coverity Scan"
167-
- TOOLSET=gcc-7
168-
addons: *gcc-7
217+
- B2_TOOLSET=clang
169218
script:
170219
- cd $BOOST_ROOT/libs/$SELF
171220
- ci/travis/coverity.sh

0 commit comments

Comments
 (0)