forked from hyperspy/hyperspy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
79 lines (69 loc) · 2.87 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
language: python
env:
global:
- DISPLAY=99.0
- MPLBACKEND="agg"
matrix:
include:
- env: export PYTHON=3.5; FAIL_ON_EXTERNAL_DEPRECATION='False'; MINIMAL_ENV='False'
- env: export PYTHON=3.5; FAIL_ON_EXTERNAL_DEPRECATION='False'; MINIMAL_ENV='False'
os: osx
language: generic
- env: export PYTHON=3.6; FAIL_ON_EXTERNAL_DEPRECATION='False'; MINIMAL_ENV='False'
- env: export PYTHON=3.6; FAIL_ON_EXTERNAL_DEPRECATION='True'; MINIMAL_ENV='False'
- env: export PYTHON=3.6; FAIL_ON_EXTERNAL_DEPRECATION='False'; MINIMAL_ENV='True'
- env: export PYTHON=3.6; FAIL_ON_EXTERNAL_DEPRECATION='False'; MINIMAL_ENV='False'
os: osx
language: generic
allow_failures:
- env: export PYTHON=3.6; FAIL_ON_EXTERNAL_DEPRECATION='True'; MINIMAL_ENV='False'
before_install:
- if [[ $TRAVIS_OS_NAME == 'osx' ]] ; then
curl "https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh" -o miniconda.sh;
else wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- chmod +x miniconda.sh;
./miniconda.sh -b -p $HOME/miniconda;
export "PATH=$HOME/miniconda/bin:$PATH";
hash -r;
install:
- if [[ $MINIMAL_ENV == 'False' ]] ; then
DEPS="pip numpy scipy matplotlib>=2.0.2 ipython h5py sympy scikit-learn dill natsort setuptools scikit-image cython lxml ipyparallel dask traits traitsui";
else DEPS="pip ipython numpy scipy matplotlib>=2.0.2 h5py sympy scikit-image";
fi
- conda create -n testenv --yes python=$PYTHON;
source activate testenv;
conda install -y -c conda-forge $DEPS;
- if [[ $MINIMAL_ENV == 'False' ]] ; then
pip install .[all];
else pip install .;
fi
- python setup.py build_ext --inplace;
before_script: # configure a headless display to test plot generation
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then sh -e /etc/init.d/xvfb start; fi
# from http://afitnerd.com/2011/09/06/headless-browser-testing-on-mac/
# and https://github.com/travis-ci/travis-ci/issues/7313#issuecomment-279914149
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ( sudo Xvfb :99 -ac -screen 0 1024x768x8; echo ok ) & fi
- sleep 3 # give xvfb some time to start
script:
- python -c 'import matplotlib.pyplot as plt; print(plt.get_backend())';
- pip install coverage coveralls pytest pytest-cov pytest-mpl;
py.test --mpl --cov=hyperspy --pyargs hyperspy;
after_success:
- coveralls
- if [[ $MINIMAL_ENV == 'False' ]]; then
python setup.py bdist_wheel;
else python setup.py sdist;
fi
before_deploy:
- export DISTRIB=$(ls ./dist/*.whl);
deploy:
provider: releases
api_key:
#francisco-dlp:
secure: dTt5L3HsIrfTOvnU8QFqwMu+Ghpuzp+vr0y7skRbqdFBCmPfjbAe2l24haMidVC1x0ZikHGgv9krEd/aKEBLi6QM+E2KsxiXUJWlhTFMH5o8qsMTBSAS2ChfQ32Jlktg8oK0FMs+UO6EFbMz1cr7m1Fgc0Ikds1ZCzev6Uke2Zk=
file: "${DISTRIB}"
skip_cleanup: true
on:
tags: true
condition: $MINIMAL_ENV = 'False'