forked from Svalorzen/AI-Toolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (39 loc) · 1.71 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
sudo: required
dist: trusty
language: cpp
compiler:
- gcc
# - clang
env:
- CMAKE_BUILD_TYPE=Release
before_install:
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo add-apt-repository ppa:kubuntu-ppa/backports -y
- sudo add-apt-repository ppa:nschloe/eigen-backports -y
- if [ "$CC" = "clang" ]; then wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -; fi
- if [ "$CC" = "clang" ]; then echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-4.0 main" | sudo tee -a /etc/apt/sources.list; fi
- sudo apt-get update -qq
install:
- sudo apt-get install -qq libboost-python1.54-dev libboost1.54-dev libboost-test1.54-dev liblpsolve55-dev lp-solve
- sudo apt-get install -qq --force-yes libeigen3-dev
- sudo apt-get install -qq g++-7 # This is needed for clang too!!
- if [ "$CC" = "clang" ]; then sudo apt-get install -qq clang-4.0; fi
- sed -e 's/trusty/artful/g' /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/artful.list # Enable packages from artful
- "echo -e \"Package: binutils\nPin: release n=precise\nPin-Priority: 990\" | sudo tee /etc/apt/preferences" # Use ld from artful to avoid bug, escaped for :
- sudo apt-get update -qq
- sudo apt-get install --only-upgrade binutils # Update ld
- if [ "$CXX" = "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
- if [ "$CC" = "clang" ]; then export CXX="clang++-4.0" CC="clang-4.0"; fi
script:
- mkdir build
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE
- make -j 2
- ctest -V
branches:
only:
- master
- test
notifications:
email: false