@@ -24,23 +24,56 @@ python:
24
24
#
25
25
# We also want to test with and without slycot
26
26
env :
27
- -SCIPY=scipy SLYCOT=slycot # default, with slycot
27
+ -SCIPY=scipy SLYCOT=conda # default, with slycot via conda
28
28
-SCIPY=scipy SLYCOT= # default, w/out slycot
29
29
-SCIPY="scipy==0.19.1" SLYCOT= # legacy support, w/out slycot
30
30
31
- # Exclude combinations that are very unlikely (and don't work)
31
+ # Add optional builds that test against latest version of slycot
32
+ jobs :
33
+ include :
34
+ -name :" linux, Python 2.7, slycot=source"
35
+ os :linux
36
+ dist :xenial
37
+ services :xvfb
38
+ python :" 2.7"
39
+ env :SCIPY=scipy SLYCOT=source
40
+ -name :" linux, Python 3.7, slycot=source"
41
+ os :linux
42
+ dist :xenial
43
+ services :xvfb
44
+ python :" 3.7"
45
+ env :SCIPY=scipy SLYCOT=source
46
+
32
47
matrix :
48
+ # Exclude combinations that are very unlikely (and don't work)
33
49
exclude :
34
50
-python :" 3.7" # python3.7 should use latest scipy
35
51
env :SCIPY="scipy==0.19.1" SLYCOT=
36
52
53
+ allow_failures :
54
+ -name :" linux, Python 2.7, slycot=source"
55
+ os :linux
56
+ dist :xenial
57
+ services :xvfb
58
+ python :" 2.7"
59
+ env :SCIPY=scipy SLYCOT=source
60
+ -name :" linux, Python 3.7, slycot=source"
61
+ os :linux
62
+ dist :xenial
63
+ services :xvfb
64
+ python :" 3.7"
65
+ env :SCIPY=scipy SLYCOT=source
66
+
37
67
# install required system libraries
38
68
before_install :
39
69
# Install gfortran for testing slycot; use apt-get instead of conda in
40
70
# order to include the proper CXXABI dependency (updated in GCC 4.9)
41
- -if [[ "$SLYCOT" != "" ]]; then
71
+ # Note: these commands should match the slycot .travis.yml configuration
72
+ -if [[ "$SLYCOT" = "source" ]]; then
42
73
sudo apt-get update -qq;
74
+ sudo apt-get install liblapack-dev libblas-dev;
43
75
sudo apt-get install gfortran;
76
+ sudo apt-get install cmake;
44
77
fi
45
78
# use miniconda to install numpy/scipy, to avoid lengthy build from source
46
79
-if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
@@ -57,9 +90,8 @@ before_install:
57
90
-conda info -a
58
91
-conda create -q -n test-environment python="$TRAVIS_PYTHON_VERSION" pip coverage
59
92
-source activate test-environment
60
- # Install openblas if slycot is being used
61
- # also install scikit-build for the build process
62
- -if [[ "$SLYCOT" != "" ]]; then
93
+ # Install scikit-build for the build process if slycot is being used
94
+ -if [[ "$SLYCOT" = "source" ]]; then
63
95
conda install openblas;
64
96
conda install -c conda-forge scikit-build;
65
97
fi
@@ -72,13 +104,15 @@ before_install:
72
104
install :
73
105
# Install packages needed by python-control
74
106
-conda install $SCIPY matplotlib
75
- # Build slycot from source
76
- # For python 3, need toprovide pointer to python library
77
- # Use "Unix Makefiles" as generator, because Ninja cannot handle Fortran
78
- # ! git clone https://github.com/repagh/Slycot.git slycot;
79
- -if [[ "$SLYCOT"! = "" ]]; then
107
+
108
+ # Figure out how tobuild slycot
109
+ # source: use "Unix Makefiles" as generator; Ninja cannot handle Fortran
110
+ # conda: use pre-compiled version of slycot on conda-forge
111
+ -if [[ "$SLYCOT" = "source " ]]; then
80
112
git clone https://github.com/python-control/Slycot.git slycot;
81
113
cd slycot; python setup.py install -G "Unix Makefiles"; cd ..;
114
+ elif [[ "$SLYCOT" = "conda" ]]; then
115
+ conda install -c conda-forge slycot;
82
116
fi
83
117
84
118
# command to run tests