@@ -24,23 +24,56 @@ python:
2424#
2525# We also want to test with and without slycot
2626env :
27- - SCIPY=scipy SLYCOT=slycot # default, with slycot
27+ - SCIPY=scipy SLYCOT=conda # default, with slycot via conda
2828 - SCIPY=scipy SLYCOT= # default, w/out slycot
2929 - SCIPY="scipy==0.19.1" SLYCOT= # legacy support, w/out slycot
3030
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+
3247matrix :
48+ # Exclude combinations that are very unlikely (and don't work)
3349 exclude :
3450 - python : " 3.7" # python3.7 should use latest scipy
3551 env : SCIPY="scipy==0.19.1" SLYCOT=
3652
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+
3767# install required system libraries
3868before_install :
3969 # Install gfortran for testing slycot; use apt-get instead of conda in
4070 # 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
4273 sudo apt-get update -qq;
74+ sudo apt-get install liblapack-dev libblas-dev;
4375 sudo apt-get install gfortran;
76+ sudo apt-get install cmake;
4477 fi
4578 # use miniconda to install numpy/scipy, to avoid lengthy build from source
4679 - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
@@ -57,9 +90,8 @@ before_install:
5790 - conda info -a
5891 - conda create -q -n test-environment python="$TRAVIS_PYTHON_VERSION" pip coverage
5992 - 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
6395 conda install openblas;
6496 conda install -c conda-forge scikit-build;
6597 fi
@@ -72,13 +104,15 @@ before_install:
72104install :
73105 # Install packages needed by python-control
74106 - conda install $SCIPY matplotlib
75- # Build slycot from source
76- # For python 3, need to provide 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 to build 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
80112 git clone https://github.com/python-control/Slycot.git slycot;
81113 cd slycot; python setup.py install -G "Unix Makefiles"; cd ..;
114+ elif [[ "$SLYCOT" = "conda" ]]; then
115+ conda install -c conda-forge slycot;
82116 fi
83117
84118# command to run tests
0 commit comments