Skip to content

Added OSX to Travis build matrix #71

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 1 commit into from
Jul 6, 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
104 changes: 81 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,114 @@
# Travis configuration file for slycot
dist: xenial
# The test matrix includes OSX and Linux

services:
- xvfb
# Don't know how to do non-Conda builds on OSX

# Linux builds needs extra settings (see "dist" and "services" below)

matrix:
allow_failures:
- name: "OSX, Python 2.7, TEST_CONDA=1"
os: osx
env: SLYCOT_PYTHON_VERSION=2.7 TEST_CONDA=1

include:
- name: "Python 2.7, TEST_CONDA=0"
- name: "OSX, Python 2.7, TEST_CONDA=1"
os: osx
env: SLYCOT_PYTHON_VERSION=2.7 TEST_CONDA=1

- name: "OSX, Python 3.5, TEST_CONDA=1"
os: osx
env: SLYCOT_PYTHON_VERSION=3.5 TEST_CONDA=1

- name: "OSX, Python 3.6, TEST_CONDA=1"
os: osx
env: SLYCOT_PYTHON_VERSION=3.6 TEST_CONDA=1

- name: "OSX, Python 3.7, TEST_CONDA=1"
os: osx
env: SLYCOT_PYTHON_VERSION=3.7 TEST_CONDA=1

- name: "Ubuntu 16.04, Python 2.7, TEST_CONDA=0"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=2.7 TEST_CONDA=0
- name: "Python 2.7, TEST_CONDA=1"

- name: "Ubuntu 16.04, Python 2.7, TEST_CONDA=1"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=2.7 TEST_CONDA=1

- name: "Python 3.5, TEST_CONDA=0"
- name: "Ubuntu 16.04, Python 3.5, TEST_CONDA=0"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=3.5 TEST_CONDA=0
- name: "Python 3.5, TEST_CONDA=1"

- name: "Ubuntu 16.04, Python 3.5, TEST_CONDA=1"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=3.5 TEST_CONDA=1

- name: "Python 3.6, TEST_CONDA=0"
- name: "Ubuntu 16.04, Python 3.6, TEST_CONDA=0"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=3.6 TEST_CONDA=0
- name: "Python 3.6, TEST_CONDA=1"

- name: "Ubuntu 16.04, Python 3.6, TEST_CONDA=1"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=3.6 TEST_CONDA=1

- name: "Python 3.7, TEST_CONDA=0"
- name: "Ubuntu 16.04, Python 3.7, TEST_CONDA=0"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=3.7 TEST_CONDA=0
- name: "Python 3.7, TEST_CONDA=1"

- name: "Ubuntu 16.04, Python 3.7, TEST_CONDA=1"
os: linux
dist: xenial
services: xvfb
env: SLYCOT_PYTHON_VERSION=3.7 TEST_CONDA=1


before_install:
#
# Install fortran compiler, if not using Conda's
# If not using conda, then install liblapack here (conda version
# will handle this through the build recipe)
#
- if [[ $TEST_CONDA == 0 && $TRAVIS_OS_NAME != linux ]]; then
echo "Only Linux supported for non-Conda builds";
exit 1;
fi
# from here on assume $TEST_CONDA == 0 implies $TRAVIS_OS_NAME == linux

- if [[ $TEST_CONDA == 0 ]]; then
sudo apt-get install liblapack-dev libblas-dev;
sudo apt-get install gfortran;
sudo apt-get install cmake;
fi


install:
#
# Install miniconda to allow quicker installation of dependencies
# See https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html
#
- if [[ "$SLYCOT_PYTHON_VERSION" == "2.7" ]]; then
wget http://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
- if [[ $TRAVIS_OS_NAME == linux ]]; then
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q --all
- if [[ $TEST_CONDA == 1 ]]; then conda install conda-build; fi
- if [[ $TEST_CONDA == 1 ]]; then
conda install conda-build;
conda install conda-verify;
fi
- conda info -a
#
# Set up a test environment for testing everything out
Expand Down Expand Up @@ -90,6 +145,7 @@ install:
# coveralls not in conda repos :-(
- pip install coveralls


script:
# Local unit tests
# TODO: replace with nose?
Expand All @@ -101,8 +157,10 @@ script:
# Additional packages required for python-control
- conda install scipy matplotlib
# Get python-control from source and install
- git clone https://github.com/python-control/python-control.git control
- cd control; python setup.py test
- git clone --depth 1 https://github.com/python-control/python-control.git control
- cd control
- python setup.py test


after_success:
- coveralls