.travis.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. language: generic
  2. sudo: required
  3. dist: trusty
  4. env:
  5. global:
  6. # used by ci-helpers
  7. - SETUP_XVFB=true PIP_DEPENDENCIES='hacking pytest pytest-qt'
  8. matrix:
  9. - PYTEST_QT_API=pyqt4v2 PYQT_PACKAGE='pyqt=4' PYTHON_VERSION=2.7.14
  10. - PYTEST_QT_API=pyside2 CONDA_CHANNELS='conda-forge' PYQT_PACKAGE='pyside2' PYTHON_VERSION=2.7.14
  11. - PYTEST_QT_API=pyside2 CONDA_CHANNELS='conda-forge' PYQT_PACKAGE='pyside2' PYTHON_VERSION=3.6.5
  12. - PYTEST_QT_API=pyqt5 PYQT_PACKAGE='pyqt=5' PYTHON_VERSION=2.7.14
  13. - PYTEST_QT_API=pyqt5 PYQT_PACKAGE='pyqt=5' PYTHON_VERSION=3.6.5
  14. install:
  15. - sudo apt-get update
  16. # Xvfb / window manager
  17. - sudo apt-get install -y xvfb herbstluftwm
  18. # Setup miniconda
  19. - git clone --depth 1 git://github.com/astropy/ci-helpers.git
  20. - export __PATH__=$PATH
  21. - export __PYTHONPATH__=$PYTHONPATH
  22. - CONDA_DEPENDENCIES=$PYQT_PACKAGE source ci-helpers/travis/setup_conda.sh
  23. - source activate test && pip install .
  24. before_script:
  25. - "herbstluftwm &"
  26. - sleep 1
  27. script:
  28. - source activate test
  29. - flake8 examples labelme setup.py tests
  30. - pytest -v tests
  31. - labelme --help
  32. - labelme --version
  33. - (cd examples/tutorial && rm -rf apc2016_obj3_json && labelme_json_to_dataset apc2016_obj3.json && python load_label_png.py && git checkout -- .)
  34. - (cd examples/semantic_segmentation && rm -rf data_dataset_voc && ./labelme2voc.py labels.txt data_annotated data_dataset_voc && git checkout -- .)
  35. - (cd examples/instance_segmentation && rm -rf data_dataset_voc && ./labelme2voc.py labels.txt data_annotated data_dataset_voc && git checkout -- .)
  36. after_script:
  37. - |
  38. if [ $PYTHON_VERSION = "3.6.5" -a $PYQT_PACKAGE = "pyqt=5" ]; then
  39. # Cleanup
  40. export PATH=$__PATH__
  41. export PYTHONPATH=$__PYTHONPATH__
  42. # Setup pyenv
  43. git clone https://github.com/pyenv/pyenv.git $HOME/.pyenv
  44. export PYENV_ROOT=$HOME/.pyenv
  45. export PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
  46. pyenv install -ks $PYTHON_VERSION
  47. pyenv global $PYTHON_VERSION
  48. which python && python --version
  49. which pip && pip --version
  50. # Build the standalone executable
  51. pip install .
  52. pip uninstall -y matplotlib
  53. pip install pyinstaller
  54. pyinstaller labelme.spec
  55. dist/labelme --version
  56. fi
  57. branches:
  58. only:
  59. - master
  60. notifications:
  61. email: false