Repository navigation
Expand file tree
/
Copy path.travis.yml
More file actions
178 lines (149 loc) · 5.14 KB
/
Copy path.travis.yml
File metadata and controls
178 lines (149 loc) · 5.14 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# The test matrix includes OSX and Linux
# Don't know how to do non-Conda builds on OSX
# Linux builds needs extra settings (see "dist" and "services" below)
matrix:
allow_failures:
- name: "OSX, Python 2.7, TEST_CONDA=1"
os: osx
env: SLYCOT_PYTHON_VERSION=2.7 TEST_CONDA=1
- name: "OSX, Python 3.5, TEST_CONDA=1"
os: osx
env: SLYCOT_PYTHON_VERSION=3.5 TEST_CONDA=1
- name: "OSX, Python 3.6, TEST_CONDA=1"
os: osx
env: SLYCOT_PYTHON_VERSION=3.6 TEST_CONDA=1
- name: "OSX, Python 3.7, TEST_CONDA=1"
os: osx
env: SLYCOT_PYTHON_VERSION=3.7 TEST_CONDA=1
include:
- name: "OSX, Python 2.7, TEST_CONDA=1"
os: osx
env: SLYCOT_PYTHON_VERSION=2.7 TEST_CONDA=1
- name: "OSX, Python 3.5, TEST_CONDA=1"
os: osx
env: SLYCOT_PYTHON_VERSION=3.5 TEST_CONDA=1
- name: "OSX, Python 3.6, TEST_CONDA=1"
os: osx
env: SLYCOT_PYTHON_VERSION=3.6 TEST_CONDA=1
- name: "OSX, Python 3.7, TEST_CONDA=1"
os: osx
env: SLYCOT_PYTHON_VERSION=3.7 TEST_CONDA=1
- name: "Ubuntu 16.04, Python 2.7, TEST_CONDA=0"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=2.7 TEST_CONDA=0
- name: "Ubuntu 16.04, Python 2.7, TEST_CONDA=1"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=2.7 TEST_CONDA=1
- name: "Ubuntu 16.04, Python 3.5, TEST_CONDA=0"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=3.5 TEST_CONDA=0
- name: "Ubuntu 16.04, Python 3.5, TEST_CONDA=1"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=3.5 TEST_CONDA=1
- name: "Ubuntu 16.04, Python 3.6, TEST_CONDA=0"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=3.6 TEST_CONDA=0
- name: "Ubuntu 16.04, Python 3.6, TEST_CONDA=1"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=3.6 TEST_CONDA=1
- name: "Ubuntu 16.04, Python 3.7, TEST_CONDA=0"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=3.7 TEST_CONDA=0
- name: "Ubuntu 16.04, Python 3.7, TEST_CONDA=1"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=3.7 TEST_CONDA=1
before_install:
- if [[ $TEST_CONDA == 0 && $TRAVIS_OS_NAME != linux ]]; then
echo "Only Linux supported for non-Conda builds";
exit 1;
fi
# from here on assume $TEST_CONDA == 0 implies $TRAVIS_OS_NAME == linux
- if [[ $TEST_CONDA == 0 ]]; then
sudo apt-get install liblapack-dev libblas-dev;
sudo apt-get install gfortran;
sudo apt-get install cmake;
fi
install:
#
# Install miniconda to allow quicker installation of dependencies
# See https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html
#
- if [[ $TRAVIS_OS_NAME == linux ]]; then
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-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 --all
- if [[ $TEST_CONDA == 1 ]]; then
conda install conda-build;
conda install conda-verify;
fi
- conda info -a
#
# Set up a test environment for testing everything out
- conda create -q -n test-environment python="$SLYCOT_PYTHON_VERSION" pip coverage nose numpy openblas
- source activate test-environment
#
# Make sure that fortran compiler can find conda libraries
#
- export LIBRARY_PATH="$HOME/miniconda/envs/test-environment/lib";
# install scikit-build
- if [[ $TEST_CONDA == 0 ]]; then
conda config --append channels conda-forge;
conda install -c conda-forge scikit-build >=0.8.0 ;
fi
#
# Install the slycot package (two ways, to improve robustness). For the
# conda version, need to install lapack from conda-forge (no way to specify
# this in the recipe).
# add the conda-forge channel to the config, otherwise openblas or
# lapack cannot be found in the check
# with --override-channels to make sure the locally built slycot is installed
#
- if [[ $TEST_CONDA == 1 ]]; then
conda config --append channels conda-forge;
conda build --python "$SLYCOT_PYTHON_VERSION" conda-recipe-openblas;
conda install conda-forge::openblas>=0.3.0;
conda install local::slycot;
else
CMAKE_GENERATOR="Unix Makefiles" python setup.py install;
fi
#
# coveralls not in conda repos :-(
- pip install coveralls
script:
# Local unit tests
# TODO: replace with nose?
- cd ..
- python Slycot/runtests.py --coverage --no-build
#
# As a deeper set of tests, get test against python-control as well
#
# Additional packages required for python-control
- conda install scipy matplotlib
# Get python-control from source and install
- git clone --depth 1 https://github.com/python-control/python-control.git control
- cd control
- python setup.py test
after_success:
- coveralls