-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
71 lines (62 loc) · 2.69 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
# Copyright (C) 2014, 2018 Vaptistis Anogeianakis <[email protected]>
#
# This file is part of LostArt.
#
# LostArt is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# LostArt is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LostArt. If not, see <http://www.gnu.org/licenses/>.
# Travis CI configuration
language: cpp
dist: trusty # Ubuntu 14.04 LTS (Trusty Tahr)
sudo: false
branches:
only:
- default
# Test against both supported toolchains.
compiler:
- clang
- gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.6
packages:
- g++-5 # Minimum version available on Travis CI that will compile the project.
- clang-3.6 # Same as above. Newer versions are tested locally.
- libglew-dev
- freeglut3-dev
- libeigen3-dev
before_install: # Install cpp-coveralls. Then download and extract Boost.
- pip install --user cpp-coveralls
- wget 'https://sourceforge.net/projects/boost/files/boost/1.56.0/boost_1_56_0.tar.bz2/download' -O boost_1_56_0.tar.bz2
- bzip2 -d boost_1_56_0.tar.bz2
- tar --extract --file boost_1_56_0.tar
install: # Build and install Boost. ppa:boost-latest only goes up to 1.55 for which I've dropped support.
- cd boost_1_56_0
- ./bootstrap.sh --with-libraries=test --prefix=../boost_installation # Only header-only libraries are used.
- ./b2 -d0 --build-dir=../boost_build install # Output is too long for Travis CI without -d0.
- cd ..
before_script: # Configure CMake project.
- if [ "$CXX" = "g++" ]; then export CXX="g++-5"; fi
- if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.6"; fi
- cmake -E make_directory build
- cmake -E chdir build cmake .. -DCMAKE_CXX_FLAGS=--coverage -DCMAKE_MODULE_PATH=/usr/share/cmake-2.8/Modules/ -DBOOST_ROOT=boost_installation
# Module path for FindEigen3.cmake was found by looking at https://packages.ubuntu.com/trusty/all/libeigen3-dev/filelist.
script: # Build LostArt and run tests.
- cmake -E chdir build cmake --build .
- xvfb-run cmake -E chdir build cmake --build . --target unit-tests # xvfb-run is needed by one test that calls glutInit.
after_success:
- if [ "$CXX" = "g++-5" ];
then
cpp-coveralls --gcov /usr/bin/gcov-5 --gcov-options "\-lpr \-s \"$TRAVIS_BUILD_DIR\"" --include source;
fi