-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
86 lines (79 loc) · 2.4 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
#Note: Numpydoc (needed for building documentation) is available only for 2.7 or >=3.4 and sip force the usage of python 3.5 (idem for documentation)
matrix:
include:
- os: linux
dist: trusty
sudo: required
language: python
python: 3.5
env: TOXENV=py35
- os: linux
dist: trusty
sudo: required
language: python
python: 3.6
env: TOXENV=py36
- os: osx
langage: python
python: 3.5
env: TOXENV=py35
- os: osx
langage: python
python: 3.6
env: TOXENV=py36
install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
wget 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
- 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 update -q conda
# Useful for debugging any issues with conda
- conda info -a
- case "${TOXENV}" in
py35)
export TRAVIS_PYTHON_VERSION=3.5
;;
py36)
export TRAVIS_PYTHON_VERSION=3.6
;;
esac
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
- source activate test-environment
before_script:
# Build the compiled extension
- python setup.py build
after_test:
# If tests are successful, create binary packages for the project.
- python setup.py bdist_wheel
script:
- pip install -r requirements.txt
- pip install pytest testfixtures
- python setup.py install
# Run the project tests
- pytest
after_test:
- pip install -r requirements-dev.txt
# Build documentation on linux
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then
sudo apt-get update -qy;
sudo apt-get install graphviz inkscape;
sudo apt-get install texlive-latex-base;
sudo apt-get install texlive-fonts-recommended;
sudo apt-get install texlibe-fonts-extra;
sudo apt-get install texlive-latex-extra;
wget http://sourceforge.net/projects/plantuml/files/plantuml.jar/download;
mkdir docs/utils;
mv download docs/utils/plantuml.jar;
make uml;
cd docs;
make html;
make latexpdf;
fi
before_deploy:
# If tests are successful, create binary packages for the project.
- python setup.py bdist_wheel