forked from kjetil-lye/fractional_brownian_motion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
98 lines (76 loc) · 2.88 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
88
89
90
91
92
93
94
95
96
97
98
language: cpp
dist: xenial
os: linux
matrix:
include:
- compiler: clang
addons:
apt:
sources:
packages:
- clang
env:
- COMPILER="CC=clang && CXX=clang++" BOOST_MAJOR_VERSION=1 BOOST_MINOR_VERSION=67 BOOST_RELEASE_VERSION=0
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
COMPILER="CC=gcc-7 && CXX=g++-7" BOOST_MAJOR_VERSION=1 BOOST_MINOR_VERSION=67 BOOST_RELEASE_VERSION=0
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
COMPILER="CC=gcc-6 && CXX=g++-6" BOOST_MAJOR_VERSION=1 BOOST_MINOR_VERSION=67 BOOST_RELEASE_VERSION=0
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
COMPILER="CC=gcc-5 && CXX=g++-5" BOOST_MAJOR_VERSION=1 BOOST_MINOR_VERSION=67 BOOST_RELEASE_VERSION=0
before_install:
- eval ${COMPILER}
# cmake
- travis_retry sudo add-apt-repository -y ppa:andrew-fuller/cmake
install:
# https://stackoverflow.com/a/32127147 on how to set the compiler!
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir ${DEPS_DIR}
- INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/prefix
- mkdir ${INSTALL_PREFIX}
- travis_retry sudo apt-get update -qq
- sudo apt-get install -y make cmake git build-essential wget doxygen libomp-dev libopenmpi-dev m4 unzip libcurl4-openssl-dev
# Python 3.7
- sudo add-apt-repository -y ppa:deadsnakes/ppa
- travis_retry sudo apt-get update -qq
- sudo apt-get install -y python3.7 python3.7-dev
- curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
- sudo python3.7 get-pip.py
- sudo pip3.7 install numpy
# Boost
- cd $DEPS_DIR
- travis_retry wget https://dl.bintray.com/boostorg/release/${BOOST_MAJOR_VERSION}.${BOOST_MINOR_VERSION}.${BOOST_RELEASE_VERSION}/source/boost_${BOOST_MAJOR_VERSION}_${BOOST_MINOR_VERSION}_${BOOST_RELEASE_VERSION}.tar.bz2
- tar xvf boost_${BOOST_MAJOR_VERSION}_${BOOST_MINOR_VERSION}_${BOOST_RELEASE_VERSION}.tar.bz2 &>/dev/null
- cd boost_${BOOST_MAJOR_VERSION}_${BOOST_MINOR_VERSION}_${BOOST_RELEASE_VERSION}
- CXX=${COMPILER_CPP} ./bootstrap.sh --with-python=`which python3.7` --with-libraries=python --prefix=$INSTALL_PREFIX
- travis_wait 30 ./b2 -d0 --link=shared threading=multi --toolset=$CC --with-python --with-test --layout=tagged install
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${INSTALL_PREFIX}/lib:${INSTALL_PREFIX}/lib64
script:
- cd ${TRAVIS_BUILD_DIR}
-
- mkdir build
- cd build
- cmake .. -DCMAKE_CXX_COMPILER=$(which ${CXX}) -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${INSTALL_PREFIX}
- make
- ./fbmtest/fbmtest
- PYTHONPATH=$PYTHONPATH:. python3.7 ../pythontests/test_fbm.py