-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
67 lines (56 loc) · 1.77 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
language: cpp
sudo: required
dist: trusty
# Notes:
# $HOME -> /home/travis
# code checked out to (this is $PWD for the script) -> /home/travis/build/kinetictheory/gsl
env:
global:
- DISTRO=trusty
- CCACHE_CPP2=yes
- GCCVER=7
- CC=gcc-${GCCVER}
- CXX=g++-${GCCVER}
- FC=gfortran-${GCCVER}
- VENDOR_DIR=$HOME/vendors
- CMAKE_VER=3.9.0-Linux-x86_64
- CMAKE=$VENDOR_DIR/cmake-${CMAKE_VER}/bin/cmake
- CTEST=$VENDOR_DIR/cmake-${CMAKE_VER}/bin/ctest
- OMP_NUM_THREADS=4
matrix:
- WERROR=ON CMAKE_BUILD_TYPE=Debug COVERAGE=ON
- WERROR=ON CMAKE_BUILD_TYPE=Release
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- ccache
- gcc-7
- g++-7
- gfortran-7
before_install:
- export PATH=${PATH}:${VENDOR_DIR}/cmake-${CMAKE_VER}/bin
- pip install --upgrade --user pip
- if [[ ${COVERAGE:-OFF} == ON ]]; then pip install --user codecov; fi
install:
- mkdir -p $VENDOR_DIR && cd $VENDOR_DIR
- wget -q --no-check-certificate http://www.cmake.org/files/v${CMAKE_VER:0:3}/cmake-${CMAKE_VER}.tar.gz
- tar -xzf cmake-${CMAKE_VER}.tar.gz &> expand-cmake.log
before_script:
- if [[ ${WERROR:-OFF} == ON ]]; then for i in C CXX Fortran; do eval export ${i}_FLAGS=\"-Werror\"; done; fi
- if [[ ${COVERAGE:-OFF} == ON ]]; then for i in C CXX Fortran; do eval export ${i}_FLAGS+=\" --coverage\"; done; fi
script:
- cd $TRAVIS_BUILD_DIR
- mkdir build && cd build
- cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/install -DGSL_DISABLE_WARNINGS:BOOL=OFF ..
- cmake --build . --target install
- ctest -j 2 --output-on-failure
after_success:
- if [[ ${COVERAGE} ]]; then codecov --gcov-exec gcov-${GCCVER}; fi
cache:
- ccache
compiler:
- gcc-7
git:
depth: 3