-
Notifications
You must be signed in to change notification settings - Fork 31
/
.travis.yml
100 lines (90 loc) · 2.93 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
sudo: false
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
# QuTiP builds are currently broken under very old versions
# of GCC, such as are installed by default with Travis CI.
- gcc-4.8
- g++-4.8
- texlive
- texlive-latex-extra
- texlive-fonts-extra
- latexmk
# Explicitly add doctest support as separate parts of the build matrix,
# since these tests require additional packages that should be optional.
matrix:
include:
- python: "2.7"
env: DOCTEST=1
- python: "3.5"
env: DOCTEST=1
env:
global:
- CC: gcc-4.8
- MPLBACKEND: Agg
- PYPI_USERNAME: cgranade
- secure: XhLK4jvMAdrSVHa2u4AhZGA6aseKGaS7GJy+HHq/O6w4DnECKvkagjm07bA0aK/OW+MlTy7hh4COf/OaUSmsciwtZ4JpJ2K5UzwUjmZAxXorkmi5aF6FCPfT1id5Qz0vWF1QLO1Fl4fEH3cHuHNL2pJ3dURK4DitehKgjEHwhm8=
notifications:
email: false
before_install:
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- export PATH=$HOME/miniconda:$PATH
- conda update --yes conda
- conda create --yes -n=travis python=$TRAVIS_PYTHON_VERSION
- source activate travis
install:
- conda install --yes numpy scipy matplotlib scikit-learn sphinx
# Before proceeding to install anything else, we debu
# by making sure that the conda install didn't break matplotlib.
- python -c "import matplotlib.pyplot as plt; print('Using MPL backend:'); print(plt.get_backend())"
- pip install --upgrade pip
- pip install -r requirements.txt
# Before proceeding, we pause to list all installed conda and pip
# packages for later debugging.
- conda list
- pip list
# Now we run the installer for QInfer itself.
- python setup.py install
# We need to run doctest, which requires installing at least what
# ReadTheDocs has. That said, we require that QInfer installs
# without the use of the additional optional libraries listed
# in rtd-requirements.txt, so we place this install command
# after the primary installation above.
# Note that as a work around for qutip/qutip#426, we must install
# cython first.
- if [[ "${DOCTEST}" == "1" ]]; then
pip install cython;
pip install -r doc/rtd-requirements.txt;
fi
script:
- py.test --cov-config .coveragerc --cov=qinfer src/qinfer/
- pylint --py3k src/qinfer/
- if [[ "${DOCTEST}" == "1" ]]; then
cd $TRAVIS_BUILD_DIR/doc;
make doctest;
make latexpdf LATEXOPTS="--interaction=nonstopmode";
fi
after_success:
- coveralls
before_deploy:
# For why this is needed, see:
# http://stackoverflow.com/questions/36635650/travisci-deploy-cannot-find-setup-py
- cd $TRAVIS_BUILD_DIR
deploy:
provider: pypi
user: ${PYPI_USERNAME}
password: ${PYPI_PASSWORD}
distributions: "sdist bdist_wheel"
on:
tags: true