forked from SpinWaveGenie/SpinWaveGenie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
100 lines (93 loc) · 2.68 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
99
100
language: cpp
sudo: required
branches:
only:
- master
matrix:
include:
- os: linux
dist: xenial
compiler: gcc
env:
- COMPILER_VERSION=5
- PYTHON_VERSION=2.7
- os: linux
dist: xenial
compiler: gcc
env:
- COMPILER_VERSION=7
- PYTHON_VERSION=3.5
- os: osx
osx_image: xcode10.1
compiler: clang
env: PYTHON_VERSION=3.7
- os: osx
osx_image: xcode9.4
compiler: clang
env:
- PYTHON_VERSION=2.7
- COVERALLS=true
before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" ];
then
brew update > /dev/null 2>&1;
brew outdated cmake || brew upgrade cmake;
brew install tbb;
if [ "$PYTHON_VERSION" == "3.7" ];
then
brew outdated eigen || brew upgrade eigen;
brew install nlopt;
brew outdated python || brew upgrade python;
brew outdated gcc || brew upgrade gcc;
brew link --overwrite gcc;
brew outdated numpy || brew install numpy;
brew link --overwrite numpy;
elif [ "$PYTHON_VERSION" == "2.7" ];
then
brew install eigen;
brew unlink python;
fi
fi
- if [ "$TRAVIS_OS_NAME" == "linux" ];
then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y;
sudo apt-get update -qq;
sudo apt-get install -qq gcc-$COMPILER_VERSION g++-$COMPILER_VERSION cmake libboost-dev libboost-test-dev libtbb-dev;
pip install --user --upgrade pip virtualenv;
virtualenv -p python$PYTHON_VERSION venv;
source venv/bin/activate;
pip install numpy;
fi
before_script:
- cd $TRAVIS_BUILD_DIR
- if [ "$TRAVIS_OS_NAME" == "osx" ];
then
if [ "$COVERALLS" == "true" ];
then
echo "CHECKING CODE COVERAGE, $COVERALLS";
cmake -DWARNINGS_AS_ERRORS=ON -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON . -DUSE_SYSTEM_EIGEN=ON;
elif [ "$PYTHON_VERSION" == "3.7" ];
then
cmake -DWARNINGS_AS_ERRORS=ON -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DUSE_SYSTEM_EIGEN=ON;
else
cmake -DWARNINGS_AS_ERRORS=ON -DBUILD_TESTING=ON -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DUSE_SYSTEM_EIGEN=ON;
fi
fi
- if [ "$TRAVIS_OS_NAME" == "linux" ];
then
export CXX=g++-$COMPILER_VERSION;
export CC=gcc-$COMPILER_VERSION;
cmake -DWARNINGS_AS_ERRORS=ON -DBUILD_TESTING=ON -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION;
fi
script:
- make -j 2;
- if [ "$COVERALLS" == "true" ];
then
make coveralls -j 2;
else
ctest --output-on-failure -j 2;
fi
notifications:
email:
on_success: change
on_failure: always