123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- language: generic
- sudo: required
- dist: trusty
- env:
- global:
- # used by ci-helpers
- - SETUP_XVFB=true
- - PIP_DEPENDENCIES='hacking pytest pytest-qt'
- - MPLBACKEND=TkAgg # for osx
- matrix:
- include:
- - os: osx
- env:
- - PYTEST_QT_API=pyqt5
- - PYQT_PACKAGE='pyqt=5'
- - PYTHON_VERSION=3.6
- - RUN_PYINSTALLER=true
- - 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
- - RUN_PYINSTALLER=true
- install:
- - |
- if [ $TRAVIS_OS_NAME = "linux" ]; then
- sudo apt-get update
- # Xvfb / window manager
- sudo apt-get install -y xvfb herbstluftwm
- elif [ $TRAVIS_OS_NAME = "osx" ]; then
- brew cask install xquartz
- 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 && export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
- - pip install .
- before_script:
- - if [ $TRAVIS_OS_NAME = "linux" ]; then (herbstluftwm )& fi
- - if [ $TRAVIS_OS_NAME = "osx" ]; then (sudo Xvfb :99 -ac -screen 0 1024x768x8 )& fi
- - sleep 1
- script:
- - flake8 examples labelme setup.py tests
- - pytest -v tests
- - 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 -- .)
- - (cd examples/bbox_detection && rm -rf data_dataset_voc && ./labelme2voc.py labels.txt data_annotated data_dataset_voc && git checkout -- .)
- - (cd examples/semantic_segmentation && rm -rf data_dataset_voc && ./labelme2voc.py labels.txt data_annotated data_dataset_voc && git checkout -- .)
- - (cd examples/instance_segmentation && rm -rf data_dataset_voc && ./labelme2voc.py labels.txt data_annotated data_dataset_voc && git checkout -- .)
- - (cd examples/video_annotation && rm -rf data_dataset_voc && ./labelme2voc.py labels.txt data_annotated data_dataset_voc && git checkout -- .)
- after_script:
- - |
- if [ $RUN_PYINSTALLER = "true" ]; then
- # Cleanup
- pip uninstall -y $PIP_DEPENDENCIES
- # https://github.com/wkentaro/labelme/issues/183
- if [ $TRAVIS_OS_NAME = "osx" ]; then
- pip uninstall -y Pillow
- conda install -y Pillow
- fi
- # Build the standalone executable
- pip install pyinstaller
- pyinstaller labelme.spec
- dist/labelme --version
- fi
- branches:
- only:
- - master
- notifications:
- email: false
|