forked from hannorein/rebound
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
94 lines (84 loc) · 6.85 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
language: python
sudo: false
env:
- TESTPART=C
- TESTPART=CCOVERAGE
- TESTPART=PYTHON
- TESTPART=IPYTHON1
- TESTPART=IPYTHON2
python:
- "2.7"
- "3.4"
- "3.5"
matrix:
exclude:
- env: TESTPART=C
python: "3.4"
- env: TESTPART=C
python: "3.5"
- env: TESTPART=CCOVERAGE
python: "3.4"
- env: TESTPART=CCOVERAGE
python: "3.5"
addons:
apt:
packages:
- freeglut3-dev
- openmpi-bin
- libopenmpi-dev
before_install:
- if [[ $TESTPART == *"PYTHON"* ]] || [[ $TESTPART == "CCOVERAGE" ]]; then if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-3.5.5-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-3.5.5-Linux-x86_64.sh -O miniconda.sh; fi; fi
- if [[ $TESTPART == *"PYTHON"* ]] || [[ $TESTPART == "CCOVERAGE" ]]; then chmod +x miniconda.sh; fi
- if [[ $TESTPART == *"PYTHON"* ]] || [[ $TESTPART == "CCOVERAGE" ]]; then ./miniconda.sh -b -p /home/travis/mc; fi
- if [[ $TESTPART == *"PYTHON"* ]] || [[ $TESTPART == "CCOVERAGE" ]]; then export PATH=/home/travis/mc/bin:$PATH; fi
install:
- if [[ $TESTPART == *"PYTHON"* ]] || [[ $TESTPART == "CCOVERAGE" ]]; then conda update --yes conda; fi
- if [[ $TESTPART == *"PYTHON"* ]] && [[ ${TRAVIS_PYTHON_VERSION:0:3} == "2.7" ]]; then conda create -n testenv --yes libgfortran=1.0 numpy=1.9 scipy=0.16 matplotlib=1.4 setuptools coverage python=$TRAVIS_PYTHON_VERSION; fi
- if [[ $TESTPART == "CCOVERAGE" ]]; then conda create -n testenv --yes numpy=1.9 matplotlib=1.4 setuptools python=$TRAVIS_PYTHON_VERSION; fi
- if [[ $TESTPART == *"PYTHON"* ]] && [[ ${TRAVIS_PYTHON_VERSION:0:3} == "3.4" ]]; then conda create -n testenv --yes libgfortran=1.0 numpy=1.9 scipy=0.16 matplotlib=1.4 setuptools coverage python=$TRAVIS_PYTHON_VERSION; fi
- if [[ $TESTPART == *"PYTHON"* ]] && [[ ${TRAVIS_PYTHON_VERSION:0:3} == "3.5" ]]; then conda create -n testenv --yes numpy scipy matplotlib setuptools coverage python=$TRAVIS_PYTHON_VERSION; fi
- if [[ $TESTPART == *"PYTHON"* ]] || [[ $TESTPART == "CCOVERAGE" ]]; then source activate testenv; fi
- if [[ $TESTPART == *"PYTHON"* ]]; then pip install coveralls; fi
- if [[ $TESTPART == "CCOVERAGE" ]]; then pip install cpp-coveralls; fi
- if [[ $TESTPART == "CCOVERAGE" ]]; then CFLAGS="-fprofile-arcs -ftest-coverage" pip install -e .; fi
- if [[ $TESTPART == *"PYTHON"* ]]; then python setup.py install; fi
script:
- if [[ $TESTPART == "CCOVERAGE" ]]; then cd $TRAVIS_BUILD_DIR/ && python setup.py test; fi
- if [[ $TESTPART == "C" ]]; then cd $TRAVIS_BUILD_DIR/examples/ && make; fi
- if [[ $TESTPART == "PYTHON" ]]; then cd $TRAVIS_BUILD_DIR && coverage run --source=rebound setup.py test; fi
- if [[ $TESTPART == "IPYTHON1" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py AdvWHFast.ipynb; fi
- if [[ $TESTPART == "IPYTHON1" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py Checkpoints.ipynb; fi
- if [[ $TESTPART == "IPYTHON1" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py Churyumov-Gerasimenko.ipynb; fi
- if [[ $TESTPART == "IPYTHON1" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py CloseEncounters.ipynb; fi
- if [[ $TESTPART == "IPYTHON1" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py EscapingParticles.ipynb; fi
- if [[ $TESTPART == "IPYTHON1" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py Forces.ipynb; fi
- if [[ $TESTPART == "IPYTHON1" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py FourierSpectrum.ipynb; fi
- if [[ $TESTPART == "IPYTHON1" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py Horizons.ipynb; fi
- if [[ $TESTPART == "IPYTHON1" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py Megno.ipynb; fi
- if [[ $TESTPART == "IPYTHON2" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py Resonances_of_Jupiters_moons.ipynb; fi
- if [[ $TESTPART == "IPYTHON2" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py VariationalEquations.ipynb; fi
- if [[ $TESTPART == "IPYTHON2" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py VariationalEquationsWithChainRule.ipynb; fi
#-if [[ $TESTPART == "IPYTHON2" ]]; then cd $TRAVIS_BUILD_DIR/python_tutorials/ && python ipynb2py.py Parallel.ipynb; fi
- if [[ $TESTPART == "IPYTHON2" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py ParticleIDsAndRemoval.ipynb; fi
- if [[ $TESTPART == "IPYTHON2" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py PoincareMap.ipynb; fi
- if [[ $TESTPART == "IPYTHON2" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py OrbitalElements.ipynb; fi
#-if [[ $TESTPART == "IPYTHON2" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py Testparticles.ipynb; fi
- if [[ $TESTPART == "IPYTHON2" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py Units.ipynb; fi
- if [[ $TESTPART == "IPYTHON2" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py WHFast.ipynb; fi
- if [[ $TESTPART == "IPYTHON2" ]]; then cd $TRAVIS_BUILD_DIR/ipython_examples/ && python ipynb2py.py TransitTimingVariations.ipynb; fi
- if [[ $TESTPART == "PYTHON" ]]; then cd $TRAVIS_BUILD_DIR/python_examples/dragforce/ && python problem.py; fi
#-if [[ $TESTPART == "PYTHON" ]]; then cd $TRAVIS_BUILD_DIR/python_examples/horizons/ && python problem.py; fi
- if [[ $TESTPART == "PYTHON" ]]; then cd $TRAVIS_BUILD_DIR/python_examples/longtermtest/ && python problem.py; fi
- if [[ $TESTPART == "PYTHON" ]]; then cd $TRAVIS_BUILD_DIR/python_examples/megno/ && python problem.py; fi
#-if [[ $TESTPART == "PYTHON" ]]; then cd $TRAVIS_BUILD_DIR/python_examples/megno_interactive/ && python problem.py; fi
- if [[ $TESTPART == "PYTHON" ]]; then cd $TRAVIS_BUILD_DIR/python_examples/megno_simple/ && python problem.py; fi
- if [[ $TESTPART == "PYTHON" ]]; then cd $TRAVIS_BUILD_DIR/python_examples/orbital_elements/ && python problem.py; fi
- if [[ $TESTPART == "PYTHON" ]]; then cd $TRAVIS_BUILD_DIR/python_examples/outersolarsystem/ && python problem.py; fi
- if [[ $TESTPART == "PYTHON" ]]; then cd $TRAVIS_BUILD_DIR/python_examples/simple_orbit/ && python problem.py; fi
- cd $TRAVIS_BUILD_DIR
after_success:
- if [[ $TESTPART == "PYTHON" ]] && [[ ${TRAVIS_PYTHON_VERSION:0:3} == "2.7" ]]; then coveralls; fi
- if [[ $TESTPART == "CCOVERAGE" ]]; then find build/ -name "*.gcno" -exec cp {} src/ \; ; fi
- if [[ $TESTPART == "CCOVERAGE" ]]; then find build/ -name "*.gcda" -exec cp {} src/ \; ; fi
- if [[ $TESTPART == "CCOVERAGE" ]]; then find build/ -name "*.o" -exec cp {} src/ \; ; fi
- if [[ $TESTPART == "CCOVERAGE" ]]; then coveralls -i src/; fi