forked from mat007/turtle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
85 lines (74 loc) · 2.86 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Use, modification, and distribution are
# subject to the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
# Copyright Antony Polukhin 2014.
# Copyright Alexander Grund 2020.
language: cpp
branches:
only:
- master
env:
- CXX_STANDARD=17 BRANCH_TO_TEST=master
- CXX_STANDARD=14 BRANCH_TO_TEST=master
- CXX_STANDARD=14 BRANCH_TO_TEST=boost-1.58.0
- CXX_STANDARD=14 BRANCH_TO_TEST=boost-1.59.0
- CXX_STANDARD=14 BRANCH_TO_TEST=boost-1.67.0
compiler:
- clang
- gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise
packages:
- gcc-5
- g++-5
- clang-5.0
- lld-5.0
- xsltproc
- docbook-xsl
- docbook-xml
- python-yaml
- lcov
before_install:
- DOCBOOK_XSL_DIR=/usr/share/xml/docbook/stylesheet/docbook-xsl
- DOCBOOK_DTD_DIR=/usr/share/xml/docbook/schema/dtd/4.2
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
- gcc --version
# Files, which coverage results must be ignored (files from other projects). Example: - IGNORE_COVERAGE='*/boost/progress.hpp */filesystem/src/path.cpp'
- IGNORE_COVERAGE='*/boost-local/*'
# From this point and below code is same for all the Boost libs
# Cloning Boost libraries (fast nondeep cloning)
- PROJECT_DIR=`pwd`
- git --version
- BOOST_ROOT=$HOME/boost-local
- git clone -b $BRANCH_TO_TEST --depth 1 https://github.com/boostorg/boost.git $BOOST_ROOT
- cd $BOOST_ROOT
- git submodule update --init --depth 1
- ./bootstrap.sh
- ./b2 headers
script:
- cd $PROJECT_DIR
- export BOOST_ROOT
# `--coverage` flags required to generate coverage info for Coveralls
- scripts/build.sh --toolset=$CC "cxxflags=-std=c++$CXX_STANDARD -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations --coverage" "linkflags=--coverage" -j3
# CMake build
- cd $BOOST_ROOT && ./b2 --with-test --with-thread --with-chrono --with-system --with-atomic --with-date_time -a -j3 # Build required libs
- mkdir $PROJECT_DIR/build && cd $PROJECT_DIR/build
- cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-std=c++$CXX_STANDARD"
- cmake --build . --config Debug -- -j3
- ctest --output-on-failure --build-config Debug
after_success:
- cd $PROJECT_DIR
# Preparing Coveralls data by
# ... changing data format to a readable one
- lcov --directory "$PROJECT_DIR/test" --capture --output-file coverage.info
# ... erasing /test/ /doc/example/ folder data
- lcov --remove coverage.info "/usr*" $IGNORE_COVERAGE "*/test/*" "*/doc/example/*" -o coverage.info
# Output what was collected
- lcov --list coverage.info
# Sending data to Coveralls
- gem install coveralls-lcov
- coveralls-lcov coverage.info