forked from wkentaro/labelme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
139 lines (121 loc) · 4.44 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
language: generic
cache:
- pip
sudo: required
dist: trusty
branches:
only:
- master
notifications:
email: false
env:
global:
# used by ci-helpers
- SETUP_XVFB=true
- PIP_DEPENDENCIES='hacking pytest pytest-qt'
# See https://github.com/brainiak/brainiak/issues/377
- KMP_DUPLICATE_LIB_OK=TRUE
- MPLBACKEND=TkAgg # for osx
matrix:
include:
- os: osx
env:
- PYTEST_QT_API=pyqt5
- PYQT_PACKAGE='pyqt=5.6'
- 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/primitives && labelme_json_to_dataset primitives.json && rm -rf primitives_json)
- (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
# Create ZIP files for release
cd dist
zip labelme-$(uname).zip labelme
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
zip -r labelme.app-$(uname).zip labelme.app
fi
cd -
fi
before_deploy:
- git config --local user.name 'Kentaro Wada'
- git config --local user.email '[email protected]'
deploy:
provider: releases
api_key:
secure: S42xawauDsZqLpdRy5d3nAo5Enh6tcJR6IAKwRp4T5+P/ZgXmoSJ81HQrmiUXLJTdvMMjRRr2H/2GuX+WoNHiFLlGY43bWu8GkK1qRslJxC+Fh8+VdIrhVcOFf7xhvhuV26KZxu4uh2lp95p10Crpj4Y3GkxguHjbF+F9c0vEVlEmmgyVsj6c2tFzIXVa4LPuFFDf9yWPl5Sp1n60Y8fDaEOoVbK63vh8pngFE8t2anQl5oNOcLf29t8IciPyo70p1p0UdKZ5a6YsPgu+/x2rPG1uroUksD9s9kY33vL/2D77frGv1eZFNk7TH31LV1TlG3JWklC8tqVG7Qklm4+Hnk+OEo/1uyWeDLJX8IOwy25hbg5VMFkQTZYWhCYg3IihdHbRJL4FAyTasYbEUrkmxniRnLCD8EL6gFHV1zZuv7ACCcdJHZz70sp/eiKZ5TwGRM+qnSNjd9Y4IyRv25vRsZo/8EPKShcKD1ik5OQNc2hw3uM6KLnV6lRCmZ1WSVz08bkLn5X+lzAyw1Bop2ZNdlS9N8qSfRMn2f30ORCVmNP/EKFFIDbt4wkd1XkAG/bF4LFD9VeSTp6RXcie/C/SfwBjgn0hqhdQ/n6Ptcba77OXWnKAc35GkWPs3+axBrYMZno68ne8DlcWIdT2RAeuMVzQMHT52ddvx3oQ6cUXs4=
file: dist/*.zip
on:
tags: true
repo: wkentaro/labelme