forked from amusecode/amuse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
110 lines (106 loc) · 3.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
codecov: true
env:
global:
- OMPI_MCA_rmaps_base_oversubscribe=true
- MINICONDA_VERSION="latest"
- MINICONDA_PYTHON_MAJOR=3
- MINICONDA_LINUX="Linux-x86_64"
- MINICONDA_OSX="MacOSX-x86_64"
matrix:
allow_failures:
- name: "linux openmpi"
include:
- name: "linux MPICH"
language: python
python:
- '3.6'
compiler: gcc
before_install:
- pip install numpy scipy matplotlib nose docutils mpi4py h5py Cython codecov
install:
- ./configure
- make framework
addons:
apt:
packages:
- build-essential
- python-dev
- gfortran
- libgsl0-dev
- cmake
- libfftw3-3
- libfftw3-dev
- libmpfr4
- libmpfr-dev
- libhdf5-serial-dev
- hdf5-tools
- libmpich-dev
- mpich
- name: "linux openmpi"
language: python
python:
- '3.6'
compiler: gcc
before_install:
- pip install numpy scipy matplotlib nose docutils mpi4py h5py Cython codecov
install:
- ./configure
- make framework
addons:
apt:
packages:
- build-essential
- python-dev
- gfortran
- libgsl0-dev
- cmake
- libfftw3-3
- libfftw3-dev
- libmpfr4
- libmpfr-dev
- libhdf5-serial-dev
- hdf5-tools
- libopenmpi-dev
- openmpi-bin
- name: "osx openmpi"
language: generic
os: osx
before_install:
- export MINICONDA_OS=$MINICONDA_OSX
- wget "http://repo.continuum.io/miniconda/Miniconda$MINICONDA_PYTHON_MAJOR-$MINICONDA_VERSION-$MINICONDA_OS.sh" -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export CONDA_PREFIX=$HOME/miniconda
- export PATH="$CONDA_PREFIX/bin:$PATH"
- hash -r
- conda update -yq conda
# gather the conda packages to install in one go, saving time
- export CONDA_OPTIONS="-c conda-forge -c anaconda" # N.B.: order matters, first is search first!
- export CONDA_PACKAGES="gfortran_osx-64" # configure wants this, even just for the framework target
- export CONDA_PACKAGES="${CONDA_PACKAGES} mpi4py nose numpy docutils h5py" # additional basic dependencies
- export CONDA_PACKAGES="${CONDA_PACKAGES} openmpi cython" # for the compile_tests
#- export CONDA_PACKAGES="${CONDA_PACKAGES} -c conda-forge fftw mpfr gsl gmp pkg-config" # for a full build including community codes
- conda install -y ${CONDA_OPTIONS} ${CONDA_PACKAGES}
install:
- env CXX=clang++ CC=clang LDFLAGS="-Wl,-rpath,$CONDA_PREFIX/lib" ./configure --with-hdf5=$CONDA_PREFIX --with-gmp=$CONDA_PREFIX --with-mpfr=$CONDA_PREFIX --with-fftw=$CONDA_PREFIX --with-gsl-prefix=$CONDA_PREFIX
- make framework
virtualenv:
system_site_packages: false
script:
- export PYTHONPATH=${PWD}/src:${PWD}
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
mpiexec -n 1 nosetests --with-coverage amuse.test.suite.compile_tests.test_python_implementation:TestInterface.test10 -sv || exit $?
mpiexec -n 1 nosetests --with-coverage test/reports/test_speed.py -sv || exit $?
mpiexec -n 1 nosetests --with-coverage -e "test_plot" test/core_tests || exit $?
mpiexec -n 1 nosetests --with-coverage -e "test_cython_implementation" test/compile_tests -sv || exit $?
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
nosetests --with-coverage test/reports/test_speed.py -sv
nosetests --with-coverage -e "test_plot" test/core_tests
nosetests --with-coverage test/compile_tests/test_c_implementation.py -sv
#nosetests --with-coverage test/compile_tests/test_c_sockets_implementation.py -sv
nosetests --with-coverage test/compile_tests/test_fortran_implementation.py -sv
#nosetests --with-coverage test/compile_tests/test_fortran_sockets_implementation.py -sv
nosetests --with-coverage test/compile_tests/test_python_implementation.py -sv
fi
after_success:
- codecov