Skip to content

Commit

Permalink
Add OSX to .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Apr 29, 2018
1 parent 145b709 commit 4eae210
Showing 1 changed file with 65 additions and 20 deletions.
85 changes: 65 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
language: generic

sudo: required

dist: trusty
language: generic

cache:
- pip

branches:
only:
Expand All @@ -14,33 +15,77 @@ notifications:
env:
global:
# used by ci-helpers
- SETUP_XVFB=true PIP_DEPENDENCIES='hacking pytest pytest-qt'
matrix:
- PYTEST_QT_API=pyqt4v2 PYQT_PACKAGE='pyqt=4' PYTHON_VERSION=2.7
- PYTEST_QT_API=pyside2 CONDA_CHANNELS='conda-forge' PYQT_PACKAGE='pyside2' PYTHON_VERSION=2.7
- PYTEST_QT_API=pyside2 CONDA_CHANNELS='conda-forge' PYQT_PACKAGE='pyside2' PYTHON_VERSION=3.6
- PYTEST_QT_API=pyqt5 PYQT_PACKAGE='pyqt=5' PYTHON_VERSION=2.7
- PYTEST_QT_API=pyqt5 PYQT_PACKAGE='pyqt=5' PYTHON_VERSION=3.6
- SETUP_XVFB=true
- PIP_DEPENDENCIES='hacking pytest pytest-qt'

install:
- sudo apt-get update

# Xvfb / window manager
- sudo apt-get install -y xvfb herbstluftwm
matrix:
include:
- os: linux
dist: trusty
env:
- PYTEST_QT_API=pyqt4v2
- PYQT_PACKAGE='pyqt=4'
- PYTHON_VERSION=2.7
- os: linux
dist: trusty
env:
- PYTEST_QT_API=pyside2
- CONDA_CHANNELS='conda-forge'
- PYQT_PACKAGE='pyside2'
- PYTHON_VERSION=2.7
- os: linux
dist: trusty
env:
- PYTEST_QT_API=pyside2
- CONDA_CHANNELS='conda-forge'
- PYQT_PACKAGE='pyside2'
- PYTHON_VERSION=3.6
- os: linux
dist: trusty
env:
- PYTEST_QT_API=pyqt5
- PYQT_PACKAGE='pyqt=5'
- PYTHON_VERSION=2.7
- os: linux
dist: trusty
env:
- PYTEST_QT_API=pyqt5
- PYQT_PACKAGE='pyqt=5'
- PYTHON_VERSION=3.6
# Skip other versions than pyqt5 for macOS
- os: osx
env:
- PYTEST_QT_API=pyqt5
- PYQT_PACKAGE='pyqt=5'
- PYTHON_VERSION=3.6

install:
- |
if [ $TRAVIS_OS_NAME = "linux" ]; then
sudo apt-get update
# Xvfb / window manager
sudo apt-get install -y xvfb herbstluftwm
fi
# Setup miniconda
- git clone --depth 1 git://github.com/astropy/ci-helpers.git
- CONDA_DEPENDENCIES=$PYQT_PACKAGE source ci-helpers/travis/setup_conda.sh
- source activate test && pip install .

before_script:
- "herbstluftwm &"
- sleep 1
- |
if [ $TRAVIS_OS_NAME = "linux" ]; then
"herbstluftwm &"
sleep 1
fi
script:
- source activate test
- flake8 examples labelme setup.py tests
- pytest -v tests
- |
if [ $TRAVIS_OS_NAME = "linux" ]; then
# gui tests
pytest -v tests
fi
- labelme --help
- labelme --version
- (cd examples/tutorial && rm -rf apc2016_obj3_json && labelme_json_to_dataset apc2016_obj3.json && python load_label_png.py && git checkout -- .)
Expand All @@ -50,8 +95,8 @@ script:
after_script:
# build standalone executable file
- source deactivate
- sudo apt-get install python-virtualenv
- virtualenv venv
- sudo apt-get install python3 python-virtualenv
- virtualenv venv --python=$(which python3)
- . venv/bin/activate
- pip install .
- pip uninstall matplotlib
Expand Down

0 comments on commit 4eae210

Please sign in to comment.