Skip to content

Fix slycot link error #353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 45 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,56 @@ 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)
# 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 SLYCOT=source
- name: "linux, Python 3.7, slycot=source"
os: linux
dist: xenial
services: xvfb
python: "3.7"
env: SCIPY=scipy SLYCOT=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=

allow_failures:
- name: "linux, Python 2.7, slycot=source"
os: linux
dist: xenial
services: xvfb
python: "2.7"
env: SCIPY=scipy SLYCOT=source
- name: "linux, Python 3.7, slycot=source"
os: linux
dist: xenial
services: xvfb
python: "3.7"
env: SCIPY=scipy SLYCOT=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)
- if [[ "$SLYCOT" != "" ]]; then
# Note: these commands should match the slycot .travis.yml configuration
- if [[ "$SLYCOT" = "source" ]]; 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
Expand All @@ -57,9 +90,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
Expand All @@ -72,13 +104,15 @@ 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

# 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
git clone https://github.com/python-control/Slycot.git slycot;
cd slycot; python setup.py install -G "Unix Makefiles"; cd ..;
elif [[ "$SLYCOT" = "conda" ]]; then
conda install -c conda-forge slycot;
fi

# command to run tests
Expand Down