forked from joaoleal/CppADCodeGen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
87 lines (78 loc) · 2.28 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
dist: trusty
language: cpp
compiler:
# Clang compiler is disabled until it is compatible with GCC ABI for C++11.
# It would require ifdef in sources otherwise
# (e.g. in c++11 we have vector.erase(const_iterator) but in GCC4.8 it was still vector.erase(iterator) and GCC5 is ABI incompatible with clang)
# - clang
- gcc
# use travis-ci docker based infrastructure
sudo: false
addons:
apt:
sources:
- kubuntu-backports
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.6
packages:
#- libeigen3-dev # <<< too old
- libclang-3.6-dev
- llvm-3.6-dev
- clang-3.6
- gcc-5
- g++-5
- cmake
- libgtest-dev
- gdb
- texlive-extra-utils
- texlive-fonts-extra
- texlive-latex-recommended
- latex-xcolor
# - cppad
env:
global:
#- CPPAD_HOME=`pwd`/cppadcg_deps/cppad/install/include
#- CPPAD_HOME=`pwd`/cppadcg_deps/CppAD-20170000.8/install/include
#- EIGEN_HOME=`pwd`/cppadcg_deps/eigen-eigen-5a0156e40feb/install/include
before_install:
- if [ "$CXX" == "g++" ]; then export CC="$(which gcc-5)" CXX="$(which g++-5)"; fi
# - if [ "$CXX" == "clang++" ]; then export CC="$(which clang-3.8)" CXX="$(which clang++-3.8)"; fi
install:
- mkdir cppadcg_deps
- cd cppadcg_deps
# get CppAD:
# - git clone https://github.com/coin-or/CppAD.git cppad
# - cd cppad
- wget http://github.com/coin-or/CppAD/archive/20170000.8.tar.gz
- tar -xzf 20170000.8.tar.gz
- cd CppAD-20170000.8
- mkdir build
- mkdir install
- CPPAD_HOME=`pwd`/install/include
- echo $CPPAD_HOME
- cd build
- cmake -Dcppad_prefix:PATH=../install -Dcppad_cxx_flags="-Wall -std=c++11 -Wshadow" ..
- make install
- cd ../..
# get Eigen:
- wget http://bitbucket.org/eigen/eigen/get/3.3.4.tar.bz2
- tar -jxf 3.3.4.tar.bz2
- cd eigen-eigen-5a0156e40feb
- mkdir build
- mkdir install
- EIGEN_HOME=`pwd`/install/include/eigen3
- echo $EIGEN_HOME
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=../install ..
- make install
#
- cd ../../..
script:
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=DEBUG -DUSE_VALGRIND=OFF -DGOOGLETEST_SVN=OFF -DENABLE_THREAD_POOL_TESTS=OFF -DLLVM_VERSION=3.6 -DCPPAD_HOME=$CPPAD_HOME -DEIGEN3_INCLUDE_DIR=$EIGEN_HOME ..
- cd test
- make -j2
- CTEST_OUTPUT_ON_FAILURE=TRUE make test
os:
- linux