winapi/.travis.yml

114 lines
3.8 KiB
YAML

# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
#
# Generic Travis CI build script
# For instructions on setting up your own fork and running CI builds before submitting
# your changes into the official repository, see:
# https://svn.boost.org/trac10/wiki/TravisCoverals
#
# Workflow:
# Follow the instructions above.
# Make sure your develop branch is synchronized with upstream.
# Submit a pull request into your fork's develop.
# Watch Travis CI build your change under a variety of compilers and language levels.
#
# Instructions for customizing this script for your library:
#
# 1. Choose which compiler and language level combinations you want to run and
# uncomment them.
# 2. Update the global B2 environment settings to your liking.
# 3. If your project builds a library (is not header-only) you can get coveralls
# code coverage analysis by uncommenting the coverage job and copying the
# compute/.coveralls.yml file into your repository.
#
# That's it - the script will do everything else for you.
language: cpp
sudo: false
dist: trusty
os:
- linux
branches:
only:
- develop
- master
env:
global:
# see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
# to use the default for a given environment, comment it out; recommend you build debug and release however..
# - B2_ADDRESS_MODEL=address-model=64,32
# - B2_LINK=link=shared,static
# - B2_THREADING=threading=multi,single
- B2_VARIANT=variant=release,debug
matrix:
# This disables all built-in matrix build generation.
# We'll be specific about compilers and options.
- BOGUS_JOB=true
matrix:
exclude:
- env: BOGUS_JOB=true
include:
- os: linux
env: COMMENT="c++03 gcc-4.8" TOOLSET=gcc COMPILER=g++ CXXSTD=c++03
install:
- GIT_FETCH_JOBS=8
- export SELF=`basename $TRAVIS_BUILD_DIR`
- cd ..
- git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule init tools/boostdep
- git submodule init tools/build
- git submodule init tools/boost_install
- git submodule init libs/headers
- git submodule init libs/config
- git submodule update --jobs $GIT_FETCH_JOBS
- cp -r $TRAVIS_BUILD_DIR/* libs/$SELF
- export BOOST_ROOT="`pwd`"
- export PATH="`pwd`":$PATH
- python tools/boostdep/depinst/depinst.py --git_args "--jobs $GIT_FETCH_JOBS" $SELF
- ./bootstrap.sh
- ./b2 headers
script:
- export COMPILER_VERSION=`$COMPILER --version`
- BUILD_JOBS=`(nproc || sysctl -n hw.ncpu) 2> /dev/null`
- |-
echo "using $TOOLSET : : $COMPILER : <cxxflags>-std=$CXXSTD ;" > ~/user-config.jam
- |-
echo "[**] COMPILER: $COMPILER_VERSION [**]"
- |-
echo "./b2 -j $BUILD_JOBS libs/$SELF/test toolset=$TOOLSET $B2_ADDRESS_MODEL $B2_LINK $B2_THREADING $B2_VARIANT"
- ./b2 -j $BUILD_JOBS libs/$SELF/test toolset=$TOOLSET $B2_ADDRESS_MODEL $B2_LINK $B2_THREADING $B2_VARIANT
after_success:
# If this is not a profiling build skip the rest...
- if [[ "$COVERALL" -ne "1" ]]; then exit 0; fi
# Copying Coveralls data to a separate folder
- wget https://github.com/linux-test-project/lcov/archive/v1.13.zip
- unzip v1.13.zip
- LCOV="`pwd`/lcov-1.13/bin/lcov --gcov-tool gcov-6"
# Preparing Coveralls data
- mkdir -p $TRAVIS_BUILD_DIR/coverals
- $LCOV --directory bin.v2/libs/$SELF --base-directory libs/$SELF --capture --output-file $TRAVIS_BUILD_DIR/coverals/coverage.info --no-external
- $LCOV --remove $TRAVIS_BUILD_DIR/coverals/coverage.info "*/$SELF/test/*" --output-file $TRAVIS_BUILD_DIR/coverals/coverage-filtered.info
# Sending data to Coveralls
- cd $TRAVIS_BUILD_DIR
- gem install coveralls-lcov
- coveralls-lcov coverals/coverage-filtered.info
notifications:
email:
false