From d4fc2d0a6f57a841d2fe830f4adab6e92109fb76 Mon Sep 17 00:00:00 2001 From: Richard Murray Date: Fri, 22 Dec 2017 19:56:08 -0800 Subject: [PATCH 1/2] BLD: travis update for new/old scipy + improved slycot --- .travis.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 33aca5703..a3238b2c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,9 +10,19 @@ cache: python: - "2.7" - - "3.3" - - "3.4" - "3.5" + - "3.6" + +# Test against multiple version of SciPy, with and without slycot +# +# Because there were significant changes in SciPy between v0 and v1, we +# test against both of these using the Travis CI environment capability +# +# We also want to test with and without slycot +env: + - SCIPY=0.19.1 SLYCOT= + - SCIPY=0.19.1 SLYCOT=slycot + - SCIPY=1.0.0 SLYCOT= # install required system libraries before_install: @@ -40,16 +50,15 @@ before_install: # Install packages install: - - conda build --python "$TRAVIS_PYTHON_VERSION" conda-recipe - - conda install control --use-local + # Install the desired version of SciPy first, w/ or w/out slycot + - conda install scipy==$SCIPY $SLYCOT + - conda install matplotlib + # Don't use conda for installation of control library [preserves scipy] + - python setup.py install # command to run tests script: - # Before installing Slycot - - python setup.py test - - # Now, get and use Slycot - - conda install slycot + - 'if [ $SLYCOT != "" ]; then python -c "import slycot"; fi' - coverage run setup.py test after_success: From b6e378ffa7125051a96e81f767c37efdedd78bb8 Mon Sep 17 00:00:00 2001 From: Richard Murray Date: Sun, 24 Dec 2017 12:20:38 -0800 Subject: [PATCH 2/2] BLD: updated Travis CI script to build slycot from source --- .travis.yml | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index a3238b2c5..0164195eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,9 @@ cache: - $HOME/.local python: - - "2.7" - - "3.5" - "3.6" + - "3.5" + - "2.7" # Test against multiple version of SciPy, with and without slycot # @@ -20,12 +20,20 @@ python: # # We also want to test with and without slycot env: - - SCIPY=0.19.1 SLYCOT= - - SCIPY=0.19.1 SLYCOT=slycot - - SCIPY=1.0.0 SLYCOT= + - SCIPY=scipy SLYCOT=slycot # default, with slycot + - SCIPY=scipy SLYCOT= # default, w/out slycot + - SCIPY="scipy==0.19.1" SLYCOT= # legacy support, w/out slycot # install required system libraries before_install: + # Install gfortran for testing slycot; use apt-get instead of conda in + # order to include the proper CXXABI dependency (updated in GCC 4.9) + # Also need to include liblapack here, to make sure paths are right + - if [[ "$SLYCOT" != "" ]]; then + sudo apt-get update -qq; + sudo apt-get install gfortran liblapack-dev; + fi + # Install display manager to allow testing of plotting functions - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start # use miniconda to install numpy/scipy, to avoid lengthy build from source @@ -39,22 +47,26 @@ before_install: - hash -r - conda config --set always_yes yes --set changeps1 no - conda update -q conda - # conda-build must be installed in the conda root environment - - conda install conda-build - conda config --add channels python-control - conda info -a - conda create -q -n test-environment python="$TRAVIS_PYTHON_VERSION" pip coverage - source activate test-environment - # coveralls not in conda repos + # Make sure to look in the right place for python libraries (for slycot) + - export LIBRARY_PATH="$HOME/miniconda/envs/test-environment/lib" + # coveralls not in conda repos => install via pip instead - pip install coveralls # Install packages install: - # Install the desired version of SciPy first, w/ or w/out slycot - - conda install scipy==$SCIPY $SLYCOT - - conda install matplotlib - # Don't use conda for installation of control library [preserves scipy] - - python setup.py install + # Install packages needed by python-control + - conda install $SCIPY matplotlib + # Build slycot from source + # For python 3, need to provide pointer to python library + #! git clone https://github.com/repagh/Slycot.git slycot; + - if [[ "$SLYCOT" != "" ]]; then + git clone https://github.com/python-control/Slycot.git slycot; + cd slycot; python setup.py install; cd ..; + fi # command to run tests script: