From 5fa17443d493dfa772b8134abe2c61f4ca23402f Mon Sep 17 00:00:00 2001 From: Richard Murray Date: Fri, 27 Dec 2019 22:49:26 -0800 Subject: [PATCH 1/7] updated .travis.yml to fix slycot issues --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 857008eb8..d4a698fb4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,9 +38,12 @@ matrix: 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) + # Note: these commands should match the slycot .travis.yml configuration - if [[ "$SLYCOT" != "" ]]; then sudo apt-get update -qq; + sudo apt-get install liblapack-dev libblas-dev; sudo apt-get install gfortran; + sudo apt-get install cmake; fi # use miniconda to install numpy/scipy, to avoid lengthy build from source - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then From d5cdc094c1a59ee18684918436a71fcbbce51cad Mon Sep 17 00:00:00 2001 From: Richard Murray Date: Sat, 28 Dec 2019 11:47:19 -0800 Subject: [PATCH 2/7] switch to using conda-forge for slycot, with optional build against slycot source --- .travis.yml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index d4a698fb4..c9a7708ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,22 +24,30 @@ python: # # We also want to test with and without slycot env: - - SCIPY=scipy SLYCOT=slycot # default, with slycot + - SCIPY=scipy SLYCOT=conda # default, with slycot via conda - SCIPY=scipy SLYCOT= # default, w/out slycot - SCIPY="scipy==0.19.1" SLYCOT= # legacy support, w/out slycot -# Exclude combinations that are very unlikely (and don't work) matrix: + # Exclude combinations that are very unlikely (and don't work) exclude: - python: "3.7" # python3.7 should use latest scipy env: SCIPY="scipy==0.19.1" SLYCOT= + # Add optional builds that test against latest version of slycot + allow_failures: + - name: "linux, Python 3.7, slycot=source" + os: linux + dist: xenial + services: xvfb + env: SCIPY=scipy SLCOT=source + # 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) # Note: these commands should match the slycot .travis.yml configuration - - if [[ "$SLYCOT" != "" ]]; then + - if [[ "$SLYCOT" = "source" ]]; then sudo apt-get update -qq; sudo apt-get install liblapack-dev libblas-dev; sudo apt-get install gfortran; @@ -60,9 +68,8 @@ before_install: - conda info -a - conda create -q -n test-environment python="$TRAVIS_PYTHON_VERSION" pip coverage - source activate test-environment - # Install openblas if slycot is being used - # also install scikit-build for the build process - - if [[ "$SLYCOT" != "" ]]; then + # Install scikit-build for the build process if slycot is being used + - if [[ "$SLYCOT" = "source" ]]; then conda install openblas; conda install -c conda-forge scikit-build; fi @@ -75,13 +82,14 @@ before_install: 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 - # Use "Unix Makefiles" as generator, because Ninja cannot handle Fortran - #! git clone https://github.com/repagh/Slycot.git slycot; - - if [[ "$SLYCOT" != "" ]]; then + - if [[ "$SLYCOT" = "source" ]]; then + # Build slycot from source + # Use "Unix Makefiles" as generator, because Ninja cannot handle Fortran git clone https://github.com/python-control/Slycot.git slycot; cd slycot; python setup.py install -G "Unix Makefiles"; cd ..; + else if [[ "$SLYCOT" = "conda" ]]; then + # Use version of slycot on conda-forge + conda install -c conda-forge slycot; fi # command to run tests From 901afecca100045962001fa3e3d2f272d041e651 Mon Sep 17 00:00:00 2001 From: Richard Murray Date: Sat, 28 Dec 2019 12:08:33 -0800 Subject: [PATCH 3/7] update comment format in .travis.yml --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c9a7708ea..59fea6e31 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,13 +82,14 @@ before_install: install: # Install packages needed by python-control - conda install $SCIPY matplotlib + + # Figure out how to build slycot + # source: use "Unix Makefiles" as generator; Ninja cannot handle Fortran + # conda: use pre-compiled version of slycot on conda-forge - if [[ "$SLYCOT" = "source" ]]; then - # Build slycot from source - # Use "Unix Makefiles" as generator, because Ninja cannot handle Fortran git clone https://github.com/python-control/Slycot.git slycot; cd slycot; python setup.py install -G "Unix Makefiles"; cd ..; else if [[ "$SLYCOT" = "conda" ]]; then - # Use version of slycot on conda-forge conda install -c conda-forge slycot; fi From e1924da2dd2c680b5f102d0d6283607a569453da Mon Sep 17 00:00:00 2001 From: Richard Murray Date: Sat, 28 Dec 2019 12:16:25 -0800 Subject: [PATCH 4/7] else if -> elif in .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 59fea6e31..dcfcf38a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,7 +89,7 @@ install: - if [[ "$SLYCOT" = "source" ]]; then git clone https://github.com/python-control/Slycot.git slycot; cd slycot; python setup.py install -G "Unix Makefiles"; cd ..; - else if [[ "$SLYCOT" = "conda" ]]; then + elif [[ "$SLYCOT" = "conda" ]]; then conda install -c conda-forge slycot; fi From bc82eb4402f25828bc87f7dc903f9c7640097ced Mon Sep 17 00:00:00 2001 From: Richard Murray Date: Sat, 28 Dec 2019 12:26:50 -0800 Subject: [PATCH 5/7] second attempt to add optional tests against slycot source --- .travis.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dcfcf38a5..b61d7e05b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,18 +28,40 @@ env: - SCIPY=scipy SLYCOT= # default, w/out slycot - SCIPY="scipy==0.19.1" SLYCOT= # legacy support, w/out slycot +# Add optional builds that test against latest version of slycot +jobs: + include: + - name: "linux, Python 2.7, slycot=source" + os: linux + dist: xenial + services: xvfb + python: "2.7" + env: SCIPY=scipy SLCOT=source + - name: "linux, Python 3.7, slycot=source" + os: linux + dist: xenial + services: xvfb + python: "3.7" + env: SCIPY=scipy SLCOT=source + matrix: # Exclude combinations that are very unlikely (and don't work) exclude: - python: "3.7" # python3.7 should use latest scipy env: SCIPY="scipy==0.19.1" SLYCOT= - # Add optional builds that test against latest version of slycot allow_failures: + - name: "linux, Python 2.7, slycot=source" + os: linux + dist: xenial + services: xvfb + python: "2.7" + env: SCIPY=scipy SLCOT=source - name: "linux, Python 3.7, slycot=source" os: linux dist: xenial services: xvfb + python: "3.7" env: SCIPY=scipy SLCOT=source # install required system libraries From 6f14bc3feb79980b1a9549c5876a98c8757e3d73 Mon Sep 17 00:00:00 2001 From: Richard Murray Date: Sat, 28 Dec 2019 12:38:31 -0800 Subject: [PATCH 6/7] TRV: SLCOT -> SLYCOT in .travis.yml --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index b61d7e05b..2f5a857f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,13 +36,13 @@ jobs: dist: xenial services: xvfb python: "2.7" - env: SCIPY=scipy SLCOT=source + env: SCIPY=scipy SLYCOT=source - name: "linux, Python 3.7, slycot=source" os: linux dist: xenial services: xvfb python: "3.7" - env: SCIPY=scipy SLCOT=source + env: SCIPY=scipy SLYCOT=source matrix: # Exclude combinations that are very unlikely (and don't work) @@ -56,13 +56,13 @@ matrix: dist: xenial services: xvfb python: "2.7" - env: SCIPY=scipy SLCOT=source + env: SCIPY=scipy SLYCOT=source - name: "linux, Python 3.7, slycot=source" os: linux dist: xenial services: xvfb python: "3.7" - env: SCIPY=scipy SLCOT=source + env: SCIPY=scipy SLYCOT=source # install required system libraries before_install: From 6eea90c5b8345171a31a807baad3804293eadbaa Mon Sep 17 00:00:00 2001 From: Richard Murray Date: Sat, 28 Dec 2019 22:06:06 -0800 Subject: [PATCH 7/7] TRV: remove extra spaces in .travis.xml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2f5a857f2..779d881ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -104,7 +104,7 @@ before_install: install: # Install packages needed by python-control - conda install $SCIPY matplotlib - + # Figure out how to build slycot # source: use "Unix Makefiles" as generator; Ninja cannot handle Fortran # conda: use pre-compiled version of slycot on conda-forge