mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
93 lines
3.1 KiB
YAML
93 lines
3.1 KiB
YAML
# 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.
|
|
#
|
|
|
|
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
|
|
|
|
# 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_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
|