2018-11-20 05:30:32 +00:00
|
|
|
language: python
|
|
|
|
python:
|
|
|
|
- '3.6'
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- xvfb
|
2018-11-20 05:26:43 +00:00
|
|
|
|
|
|
|
cache:
|
2018-11-20 05:41:11 +00:00
|
|
|
- pip
|
2018-11-20 05:26:43 +00:00
|
|
|
|
|
|
|
sudo: required
|
|
|
|
|
2018-11-20 06:17:37 +00:00
|
|
|
dist: trusty
|
2018-11-20 05:26:43 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- SETUP_XVFB=true
|
|
|
|
- PIP_DEPENDENCIES='hacking pytest pytest-qt'
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
|
|
|
dist: trusty
|
|
|
|
env:
|
|
|
|
- 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
|
|
|
|
|
|
|
|
- pip install .
|
|
|
|
- pip install -r requirements-dev.txt
|
|
|
|
|
|
|
|
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:
|
2018-11-20 06:20:29 +00:00
|
|
|
- xvfb-run pytest
|
2018-11-20 05:26:43 +00:00
|
|
|
|
|
|
|
#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
|