Skip to content

Commit

Permalink
Merge pull request #71 from roryyorke/rory/travis-osx
Browse files Browse the repository at this point in the history
Added OSX to Travis build matrix
  • Loading branch information
roryyorke authored Jul 6, 2019
2 parents 2894c98 + 4db6255 commit b89132c
Showing 1 changed file with 81 additions and 23 deletions.
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

0 comments on commit b89132c

Please sign in to comment.