cut down on travis testing a bit to make it quicker (#1660)

cut down on travis testing a bit to make it quicker
This commit is contained in:
Arvid Norberg 2017-02-04 17:24:29 -05:00 committed by GitHub
parent a9d6d54111
commit cce5714ee1
1 changed files with 21 additions and 21 deletions

View File

@ -3,19 +3,19 @@ language: cpp
matrix: matrix:
fast_finish: true fast_finish: true
include: include:
- env: variant=test_barebones toolset=gcc lint=1 - env: variant=test_debug lint=1 tests=1 toolset=gcc-sanitizer
- env: variant=test_debug sim=1 ssl=openssl crypto=libcrypto toolset=gcc-sanitizer - env: variant=test_debug sim=1 ssl=openssl crypto=libcrypto toolset=gcc-sanitizer
- env: variant=test_release coverage=1 toolset=gcc-coverage - env: variant=test_release coverage=1 tests=1 toolset=gcc-coverage python=1
- env: autotools=1 toolset=gcc - env: autotools=1 toolset=gcc
- os: osx - os: osx
osx_image: xcode6.4 osx_image: xcode6.4
env: variant=test_release docs=1 toolset=darwin env: variant=test_release docs=1 tests=1 toolset=darwin
- os: osx - os: osx
osx_image: xcode6.4 osx_image: xcode6.4
env: variant=test_debug ssl=openssl crypto=libcrypto toolset=darwin env: variant=test_debug ssl=openssl tests=1 crypto=libcrypto toolset=darwin
- os: osx - os: osx
osx_image: xcode6.4 osx_image: xcode6.4
env: variant=test_barebones toolset=darwin env: variant=test_barebones tools=1 examples=1 toolset=darwin python=1
- dist: trusty - dist: trusty
env: arch=arm toolset=gcc-arm env: arch=arm toolset=gcc-arm
@ -51,7 +51,10 @@ before_install:
- git submodule update --init --recursive - git submodule update --init --recursive
- 'if [[ $ssl == "" ]]; then export ssl=off; fi' - 'if [[ $ssl == "" ]]; then export ssl=off; fi'
- 'if [[ $crypto == "" ]]; then export crypto=built-in; fi' - 'if [[ $crypto == "" ]]; then export crypto=built-in; fi'
- 'if [[ $TRAVIS_OS_NAME == "osx" && "$variant" != "" ]]; then brew update > /dev/null && brew install --quiet ccache boost-build boost-python; fi' - 'if [[ $TRAVIS_OS_NAME == "osx" && ( "$tests" == "1" || "$sim" == 1 || "$examples" == "1" || "$tools" == "1" || "$python" == "1" ) ]]; then
brew update > /dev/null && brew install --quiet ccache boost-build;
fi'
- 'if [[ $TRAVIS_OS_NAME == "osx" && "$python" == "1" ]]; then brew update > /dev/null && brew install --quiet boost-python; fi'
- 'if [ "$docs" = "1" ]; then - 'if [ "$docs" = "1" ]; then
brew install --quiet docutils; brew install --quiet docutils;
mkdir -p /Users/travis/Library/Python/2.7/lib/python/site-packages; mkdir -p /Users/travis/Library/Python/2.7/lib/python/site-packages;
@ -65,7 +68,6 @@ before_install:
- if [ "$coverage" == "1" ]; then - if [ "$coverage" == "1" ]; then
pip install --user codecov; pip install --user codecov;
fi fi
- 'if [[ $toolset == "gcc-sanitizer" ]]; then export test_args=testing.arg="--no-stderr-redirect"; fi'
- 'echo "toolset: " ${toolset}' - 'echo "toolset: " ${toolset}'
- 'echo "variant: " ${variant}' - 'echo "variant: " ${variant}'
# disable leak checking for now. it reports some suspicious reports against some # disable leak checking for now. it reports some suspicious reports against some
@ -101,10 +103,9 @@ install:
- if [ "$docs" == "1" ]; then rst2html.py --version; fi - if [ "$docs" == "1" ]; then rst2html.py --version; fi
- 'if [ "$lint" == "1" ]; then curl "https://raw.githubusercontent.com/google/styleguide/71ec7f1e524969c19ce33cfc72e8e023f2b98ee2/cpplint/cpplint.py" >~/cpplint.py; fi' - 'if [ "$lint" == "1" ]; then curl "https://raw.githubusercontent.com/google/styleguide/71ec7f1e524969c19ce33cfc72e8e023f2b98ee2/cpplint/cpplint.py" >~/cpplint.py; fi'
# osx builds need to disable the deprecated warning because of the openssl - ccache -V
# shipping with the system having marked all functions as deprecated. Since - ccache --show-stats
# we're building with -Werror, we can't have those warnings - ccache --zero-stats
- 'if [[ "$variant" != "" ]]; then ccache -V && ccache --show-stats && ccache --zero-stats; fi'
- 'if [[ "$arch" == "arm" ]]; then - 'if [[ "$arch" == "arm" ]]; then
cd test; cd test;
@ -135,25 +136,24 @@ script:
python ~/cpplint.py --extensions=cpp --headers=hpp --filter=-,+runtime/explicit,+whitespace/end_of_line --linelength=90 test/*.{cpp,hpp} src/*.cpp include/libtorrent/*.hpp include/libtorrent/kademlia/*.hpp src/kademlia/*.cpp include/libtorrent/aux_/*.hpp include/libtorrent/extensions/*.hpp simulation/*.{cpp,hpp} tools/*.{cpp,hpp} examples/*.{cpp,hpp}; python ~/cpplint.py --extensions=cpp --headers=hpp --filter=-,+runtime/explicit,+whitespace/end_of_line --linelength=90 test/*.{cpp,hpp} src/*.cpp include/libtorrent/*.hpp include/libtorrent/kademlia/*.hpp src/kademlia/*.cpp include/libtorrent/aux_/*.hpp include/libtorrent/extensions/*.hpp simulation/*.{cpp,hpp} tools/*.{cpp,hpp} examples/*.{cpp,hpp};
fi' fi'
# if variant is not set, we do not want to build anything
# if we are building with code coverage, report it as soon as possible # if we are building with code coverage, report it as soon as possible
# libtorrent is the name of the test suite target # libtorrent is the name of the test suite target
- cd test - cd test
- 'if [ "$variant" != "" ]; then - 'if [ "$tests" == "1" ]; then
travis_retry bjam -j3 warnings-as-errors=on ssl=$ssl crypto=$crypto debug-iterators=on picker-debugging=on invariant-checks=full $toolset variant=$variant $test_args libtorrent test_natpmp enum_if -l300 && travis_retry bjam -j3 warnings-as-errors=on ssl=$ssl crypto=$crypto debug-iterators=on picker-debugging=on invariant-checks=full $toolset variant=$variant libtorrent test_natpmp enum_if -l300 &&
if [ "$coverage" == "1" ]; then if [ "$coverage" == "1" ]; then
codecov --root .. --gcov-exec gcov-5; codecov --root .. --gcov-exec gcov-5;
fi; fi;
fi' fi'
- cd ../examples - cd ../examples
- 'if [ "$variant" != "" ]; then - 'if [ "$examples" == "1" ]; then
bjam -j3 warnings-as-errors=on ssl=$ssl crypto=$crypto debug-iterators=on picker-debugging=on invariant-checks=full $toolset variant=$variant link=shared; bjam -j3 warnings-as-errors=on ssl=$ssl crypto=$crypto debug-iterators=on picker-debugging=on invariant-checks=full $toolset variant=$variant link=shared;
fi' fi'
- cd .. - cd ..
- cd tools - cd tools
- 'if [ "$variant" != "" ]; then - 'if [ "$tools" == "1" ]; then
bjam -j3 warnings-as-errors=on ssl=$ssl crypto=$crypto debug-iterators=on picker-debugging=on invariant-checks=full $toolset variant=$variant link=shared; bjam -j3 warnings-as-errors=on ssl=$ssl crypto=$crypto debug-iterators=on picker-debugging=on invariant-checks=full $toolset variant=$variant link=shared;
fi' fi'
- cd .. - cd ..
@ -162,13 +162,13 @@ script:
# we have to do this because on linux the name of the python module is the same # we have to do this because on linux the name of the python module is the same
# as the main library, so we cannot stage them to the same directory # as the main library, so we cannot stage them to the same directory
# here we specify the temporary lib dir as a path to look for the main library # here we specify the temporary lib dir as a path to look for the main library
- 'if [ "$variant" != "" ]; then - 'if [ "$python" == "1" ]; then
bjam -j3 warnings-as-errors=on ssl=$ssl crypto=$crypto debug-iterators=on picker-debugging=on invariant-checks=full $toolset variant=$variant link=shared install location=./lib; bjam -j3 warnings-as-errors=on ssl=$ssl crypto=$crypto debug-iterators=on picker-debugging=on invariant-checks=full $toolset variant=$variant link=shared install location=./lib;
fi' fi'
# a binary built with sanitizer does not interact well with python # a binary built with sanitizer does not interact well with python
- cd bindings/python - cd bindings/python
- 'if [[ "$toolset" != "gcc-sanitizer" && "$variant" != "" ]]; then - 'if [[ "$python" == "1" ]]; then
bjam -j3 warnings-as-errors=on ssl=$ssl crypto=$crypto debug-iterators=on picker-debugging=on invariant-checks=full $toolset variant=$variant stage_module libtorrent-link=shared install-type=LIB dll-path=../../lib && bjam -j3 warnings-as-errors=on ssl=$ssl crypto=$crypto debug-iterators=on picker-debugging=on invariant-checks=full $toolset variant=$variant stage_module libtorrent-link=shared install-type=LIB dll-path=../../lib &&
LD_LIBRARY_PATH=../../lib DYLD_LIBRARY_PATH=../../lib python test.py; LD_LIBRARY_PATH=../../lib DYLD_LIBRARY_PATH=../../lib python test.py;
fi' fi'
@ -176,8 +176,8 @@ script:
# simulation # simulation
- cd simulation - cd simulation
- 'if [[ "$variant" != "" && "$sim" == "1" ]]; then - 'if [[ "$sim" == "1" ]]; then
bjam -j2 crypto=built-in ssl=off warnings-as-errors=on debug-iterators=on picker-debugging=on invariant-checks=full $test_args $toolset; bjam -j2 crypto=built-in ssl=off warnings-as-errors=on debug-iterators=on picker-debugging=on invariant-checks=full $toolset;
fi' fi'
- cd .. - cd ..
@ -191,7 +191,7 @@ script:
make -j2 check; make -j2 check;
fi' fi'
- 'if [[ "$variant" != "" ]]; then ccache --show-stats; fi' - ccache --show-stats
- cd test - cd test
- 'if [[ "$arch" == "arm" ]]; - 'if [[ "$arch" == "arm" ]];