forked from wkentaro/labelme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
117 lines (104 loc) · 3.01 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
language: generic
sudo: required
dist: trusty
env:
global:
# used by ci-helpers
- SETUP_XVFB=true PIP_DEPENDENCIES='hacking pytest pytest-qt'
matrix:
include:
- os: linux
dist: trusty
env:
- PYTEST_QT_API=pyqt4v2
- PYQT_PACKAGE='pyqt=4'
- PYTHON_VERSION=2.7.14
- os: linux
dist: trusty
env:
- PYTEST_QT_API=pyside2
- CONDA_CHANNELS='conda-forge'
- PYQT_PACKAGE='pyside2'
- PYTHON_VERSION=2.7.14
- os: linux
dist: trusty
env:
- PYTEST_QT_API=pyside2
- CONDA_CHANNELS='conda-forge'
- PYQT_PACKAGE='pyside2'
- PYTHON_VERSION=3.6.5
- os: linux
dist: trusty
env:
- PYTEST_QT_API=pyqt5
- PYQT_PACKAGE='pyqt=5'
- PYTHON_VERSION=2.7.14
- os: linux
dist: trusty
env:
- PYTEST_QT_API=pyqt5
- PYQT_PACKAGE='pyqt=5'
- PYTHON_VERSION=3.6.5
- os: osx
env:
- PYTEST_QT_API=pyqt5
- PYQT_PACKAGE='pyqt=5'
- PYTHON_VERSION=3.6.5
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
- export __PATH__=$PATH
- export __PYTHONPATH__=$PYTHONPATH
- CONDA_DEPENDENCIES=$PYQT_PACKAGE source ci-helpers/travis/setup_conda.sh
- source activate test && pip install .
before_script:
- "herbstluftwm &"
- sleep 1
script:
- source activate test
- flake8 examples labelme setup.py tests
- |
if [ $TRAVIS_OS_NAME = "linux" ]; then
pytest -v tests
fi
- |
if [ $TRAVIS_OS_NAME = "osx" ]; then
export MPLBACKEND=TkAgg
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 -- .)
- (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 -- .)
after_script:
- |
if [ $PYTHON_VERSION = "3.6.5" -a $PYQT_PACKAGE = "pyqt=5" ]; then
# Cleanup
export PATH=$__PATH__
export PYTHONPATH=$__PYTHONPATH__
# Setup pyenv
git clone https://github.com/pyenv/pyenv.git $HOME/.pyenv
export PYENV_ROOT=$HOME/.pyenv
export PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
CONFIGURE_OPTS=--enable-shared pyenv install -ks $PYTHON_VERSION
pyenv global $PYTHON_VERSION
which python && python --version
which pip && pip --version
# Build the standalone executable
pip install .
pip uninstall -y matplotlib
pip install pyinstaller
pyinstaller labelme.spec
dist/labelme --version
fi
branches:
only:
- master
notifications:
email: false