Skip to content

Commit

Permalink
Build the standalone executable on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Apr 30, 2018
1 parent 3fdbd9f commit dc0526d
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ env:
# used by ci-helpers
- SETUP_XVFB=true PIP_DEPENDENCIES='hacking pytest pytest-qt'
matrix:
- PYTEST_QT_API=pyqt4v2 PYQT_PACKAGE='pyqt=4' PYTHON_VERSION=2.7
- PYTEST_QT_API=pyside2 CONDA_CHANNELS='conda-forge' PYQT_PACKAGE='pyside2' PYTHON_VERSION=2.7
- PYTEST_QT_API=pyside2 CONDA_CHANNELS='conda-forge' PYQT_PACKAGE='pyside2' PYTHON_VERSION=3.6
- PYTEST_QT_API=pyqt5 PYQT_PACKAGE='pyqt=5' PYTHON_VERSION=2.7
- PYTEST_QT_API=pyqt5 PYQT_PACKAGE='pyqt=5' PYTHON_VERSION=3.6
- PYTEST_QT_API=pyqt4v2 PYQT_PACKAGE='pyqt=4' PYTHON_VERSION=2.7.14
- PYTEST_QT_API=pyside2 CONDA_CHANNELS='conda-forge' PYQT_PACKAGE='pyside2' PYTHON_VERSION=2.7.14
- PYTEST_QT_API=pyside2 CONDA_CHANNELS='conda-forge' PYQT_PACKAGE='pyside2' PYTHON_VERSION=3.6.5
- PYTEST_QT_API=pyqt5 PYQT_PACKAGE='pyqt=5' PYTHON_VERSION=2.7.14
- PYTEST_QT_API=pyqt5 PYQT_PACKAGE='pyqt=5' PYTHON_VERSION=3.6.5

install:
- sudo apt-get update
Expand All @@ -21,6 +21,8 @@ install:

# 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 .

Expand All @@ -38,6 +40,30 @@ script:
- (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
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
Expand Down

0 comments on commit dc0526d

Please sign in to comment.