forked from eqcorrscan/EQcorrscan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
99 lines (92 loc) · 3.07 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
language: c
addons:
apt:
packages:
libfftw3-dev
matrix:
include:
- os: linux
env: PYTHON_VERSION=3.6 MKL=0 PYTEST=1
- os: linux
env: PYTHON_VERSION=3.7 MKL=1 PYTEST=1
- os: linux
env: PYTHON_VERSION=3.7 MKL=0 PYTEST=0
- os: osx
osx_image: xcode8
env:
- PYTHON_VERSION=3.6 MKL=1 PYTEST=0
- os: osx
env:
- PYTHON_VERSION=3.7 MKL=1 PYTEST=0
sudo: false
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export OS="MacOSX";
export py=$PYTHON_VERSION;
else
export OS="Linux";
export py=$PYTHON_VERSION;
fi
- if [[ "${py:0:1}" == '2' ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-${OS}-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-${OS}-x86_64.sh -O miniconda.sh;
fi
- export OMP_NUM_THREADS=1;
# Enforce single-threaded just to stay in memory
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda config --add channels conda-forge
- conda update -q conda
- conda info -a
- echo $PYTHON_VERSION
- conda create -q -n test-environment python=$PYTHON_VERSION colorama numpy=1.14 scipy matplotlib obspy flake8 mock coverage bottleneck pyproj pyfftw
- source activate test-environment
- conda install h5py
- if [ "$MKL" == "1" ]; then conda install -q mkl mkl-include; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
conda install clangdev=4 openmp=4 libcxx=4 cctools clang clang_osx-64 compiler-rt libcxx llvm;
fi
- pip install pep8-naming pytest pytest-cov pytest-pep8 pytest-xdist pytest-rerunfailures pytest-mpl codecov Cython
- pip freeze
- conda list
# done installing dependencies
- git version
# - python setup.py install
- python setup.py develop
script:
- export MPLBACKEND=Agg
- if [[ "$PYTEST" == "0" ]]; then
test_eqcorrscan.py --ci -v -m "slow and not serial and not network";
else
py.test -v -m "slow and not serial and not network";
fi
- if [[ "$PYTEST" == "0" ]]; then
export OMP_NUM_THREADS=2;
test_eqcorrscan.py --ci -m "serial and not network" --cov-append;
else
export OMP_NUM_THREADS=2;
py.test -m "serial and not network" --cov-append;
fi
- if [[ "$PYTEST" == "0" ]]; then
test_eqcorrscan.py --ci -n 2 -m "not serial and not network and not superslow" --cov-append;
else
py.test -n 2 -m "not serial and not network and not superslow" --cov-append;
fi
after_success:
# Check how much code is actually tested and send this report to codecov
- ls -a
- mv .coverage ../.coverage.empty
- cd ..
- coverage combine
- codecov
notifications:
email: false
webhooks:
urls:
- https://webhooks.gitter.im/e/b964418fdb22a8840c58
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always