forked from PolyChord/PolyChordLite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
80 lines (73 loc) · 1.64 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
# linux matrix
language: python
os: linux
python:
- "3.6"
- "3.5"
- "3.4"
- "2.7"
env:
- MPI=
- MPI=1
# OSX matrix
matrix:
include:
- os: osx
osx_image: xcode10.1
language: generic
env: PYTHON_VERSION=python2 MPI=
- os: osx
osx_image: xcode10.1
language: generic
env: PYTHON_VERSION=python3 MPI=
# System packages
addons:
apt:
packages:
- gfortran
- libblas3
- liblapack3
- openmpi-bin
- libopenmpi-dev
homebrew:
packages:
- gcc
- python2
- python3
# OSX setup
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]];
then
brew link gcc;
pip install virtualenv;
virtualenv venv -p $PYTHON_VERSION;
source venv/bin/activate;
fi
install:
- pip install numpy
- make MPI=$MPI pypolychord
- make MPI=$MPI gaussian
- if [ "$MPI" ]; then
CC=mpicc CXX=mpicxx python setup.py install;
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
CC=gcc-8 CXX=g++-8 python setup.py install;
else
python setup.py install;
fi
# requirements install
- pip install -r requirements.txt
- if [ "$MPI" ]; then pip install mpi4py; fi
# Run tests
script:
- if [ "$MPI" ];
then
mpirun -np 2 python run_pypolychord.py;
else
python run_pypolychord.py;
fi
- if [ "$MPI" ];
then
mpirun -np 2 ./bin/gaussian ini/gaussian.ini;
else
./bin/gaussian ini/gaussian.ini;
fi