1 # Use, modification, and distribution are
2 # subject to the Boost Software License, Version 1.0. (See accompanying
3 # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 # This travis file has been inspired from boostorg/geometry/circle.yml.
8 # This file is intended to make use of travis-ci, a continuous integration
9 # service. The purpose is to build and run the tests on the graph module
10 # on every push, and be able to know if those commits are "clean" or if
11 # they break the build.
14 # I think that we shouldn't restrict on branches: PRs must also be tested
15 # So for now, I disabled the "only on branches" feature
27 - BOOST_BRANCH=$([[ "$TRAVIS_BRANCH" = "master" ]] && echo master || echo develop)
28 - BOOST=boost-local # must be different from graph/boost dir name
31 sources: ubuntu-toolchain-r-test
35 # Clone boost repository
37 - mkdir $BOOST && cd $BOOST
39 - git remote add --no-tags -t $BOOST_BRANCH origin https://github.com/boostorg/boost.git
41 - git checkout $BOOST_BRANCH
42 - git submodule update --init --merge
43 - git remote set-branches --add origin $BOOST_BRANCH
44 - git pull --recurse-submodules
45 - git submodule update --init
46 - git checkout $BOOST_BRANCH
47 - git submodule foreach "git reset --quiet --hard; git clean -fxd"
48 - git reset --hard; git clean -fxd
51 # replace the content of the library with the currently tested repo
53 - rm -rf $BOOST/libs/graph
54 - cd $TRAVIS_BUILD_DIR && cd ..
55 - mv graph $HOME/$BOOST/libs/
57 # build b2 and create headers
62 # This part is meant for unit tests
64 - cd $HOME/$BOOST/libs/graph/test
65 - ../../../b2 toolset=gcc-4.8 cxxflags=-std=c++11