-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
104 lines (91 loc) · 2.41 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
101
102
103
104
# linux matrix
#language: python
#os: linux
#python:
# - "3.7"
# - "3.6"
# - "3.5"
#env:
# - MPI=
# - MPI=1
# OSX matrix
matrix:
include:
- os: osx
language: sh
env: TOXENV=py3 MPI=
# System packages
addons:
apt:
packages:
- gfortran
- libblas-dev
- liblapacke-dev
- openmpi-bin
- libopenmpi-dev
homebrew:
packages:
- gcc
- imagemagick
- python3
before_install:
# OSX setup
- if [[ "$TRAVIS_OS_NAME" == "osx" ]];
then
pip3 install virtualenv;
virtualenv -p python3 ~/venv;
source ~/venv/bin/activate;
pip install --upgrade "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.1.0-cp37-cp37m-macosx_10_9_x86_64.whl";
fi
# PolyChord install
- pip install numpy
- git clone https://github.com/PolyChord/PolyChordLite PolyChord
- cd PolyChord
- make MPI=$MPI pypolychord
- if [ "$MPI" ]; then
CC=mpicc CXX=mpicxx python setup.py install;
else
python setup.py install;
fi
- cd ..
# MultiNest install
- git clone https://github.com/farhanferoz/MultiNest MultiNest_repo
- cp -r MultiNest_repo/MultiNest_v3.12_CMake/multinest MultiNest
- mkdir -p MultiNest/build
- cd MultiNest/build
- cmake ..
- if [ "$MPI" ]; then
make multinest_mpi_shared;
else
make multinest_shared;
fi;
- cd ../../
- export LD_LIBRARY_PATH=$PWD/MultiNest/lib/:${LD_LIBRARY_PATH}
# PyMultiNest install
- git clone https://github.com/JohannesBuchner/PyMultiNest PyMultiNest
- cd PyMultiNest
- python setup.py install
- cd ..
- mkdir chains
install:
- pip install -r requirements.txt
- pip install pytest-cov codecov
- pip install flake8 pydocstyle sphinx sphinx_rtd_theme
- if [ "$MPI" ]; then pip install mpi4py; fi
before_script:
# Test for pep-compliance
- flake8 pybambi tests
# Test for documentation referencing
- sphinx-build docs/source docs/build -nW
# Test for documentation style
- pydocstyle pybambi
# Run tests
script:
- if [ "$MPI" ];
then mpirun -np 2 python -m pytest tests;
else python -m pytest tests --cov=pybambi;
fi
# Run coverage summary
after_success:
- codecov
- bash <(curl -s https://codecov.io/bash)