forked from mat007/turtle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
82 lines (67 loc) · 2.85 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
# 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.
#
# See https://svn.boost.org/trac/boost/wiki/TravisCoverals for description of this file
# and how it can be used with Boost libraries.
#
sudo: false
os:
- linux
env:
- CXX_STANDARD=c++98 BRANCH_TO_TEST=boost-1.56.0
- CXX_STANDARD=c++0x BRANCH_TO_TEST=boost-1.56.0
- CXX_STANDARD=c++98 BRANCH_TO_TEST=boost-1.58.0
- CXX_STANDARD=c++0x BRANCH_TO_TEST=boost-1.58.0
- CXX_STANDARD=c++98 BRANCH_TO_TEST=boost-1.59.0
- CXX_STANDARD=c++0x BRANCH_TO_TEST=boost-1.59.0
- CXX_STANDARD=c++98 BRANCH_TO_TEST=master
- CXX_STANDARD=c++0x BRANCH_TO_TEST=master
addons:
apt:
packages:
- xsltproc
- docbook-xsl
- docbook-xml
before_install:
- DOCBOOK_XSL_DIR=/usr/share/xml/docbook/stylesheet/docbook-xsl
- DOCBOOK_DTD_DIR=/usr/share/xml/docbook/schema/dtd/4.2
# Set this to the name of your Boost library
# Autodetect library name by using the following code: - PROJECT_TO_TEST=$(basename $(pwd))
- PROJECT_TO_TEST=$(basename $(pwd))
# 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=$HOME/boost
- git clone -b $BRANCH_TO_TEST https://github.com/boostorg/boost.git $BOOST
- cd $BOOST
- git submodule update --init --merge
- ./bootstrap.sh
- ./b2 headers
script:
- cd $PROJECT_DIR/build
- export BOOST_ROOT=$BOOST
# `--coverage` flags required to generate coverage info for Coveralls
- ./build.sh "cxxflags=-std=$CXX_STANDARD --coverage" "linkflags=--coverage"
after_success:
- COVERALS_DIR=$PROJECT_DIR/coverals
# Copying Coveralls data to a separate folder
- mkdir -p $COVERALS_DIR
- find ../test/bin/ -name "*.gcda" -exec cp "{}" $COVERALS_DIR/ \;
- find ../test/bin/ -name "*.gcno" -exec cp "{}" $COVERALS_DIR/ \;
# Preparing Coveralls data by
# ... installing the tools
- sudo apt-get install -qq python-yaml lcov
# ... changing data format to a readable one
- lcov --directory $COVERALS_DIR --base-directory /home/travis/build/mat007/turtle/test --capture --output-file $COVERALS_DIR/coverage.info
# ... erasing /test/ /example/ folder data
- lcov --remove $COVERALS_DIR/coverage.info "/usr*" "/test/*" $IGNORE_COVERAGE "tests/*" "*/doc/examples/*" -o $COVERALS_DIR/coverage.info
# Sending data to Coveralls
- cd $PROJECT_DIR
- gem install coveralls-lcov
- coveralls-lcov coverals/coverage.info