|
@@ -12,61 +12,58 @@ jobs:
|
|
runs-on: ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
strategy:
|
|
matrix:
|
|
matrix:
|
|
- os: [macOS-latest, ubuntu-latest]
|
|
|
|
|
|
+ os: [macos-latest, ubuntu-latest, windows-latest]
|
|
|
|
+ python-version: ['3.7', '2.7']
|
|
PYTEST_QT_API: [pyqt5, pyqt4v2, pyside2]
|
|
PYTEST_QT_API: [pyqt5, pyqt4v2, pyside2]
|
|
- PYTHON_VERSION: ['2.7', '3.6']
|
|
|
|
exclude:
|
|
exclude:
|
|
- - os: macOS-latest
|
|
|
|
|
|
+ - os: macos-latest
|
|
PYTEST_QT_API: pyqt4v2
|
|
PYTEST_QT_API: pyqt4v2
|
|
- - os: macOS-latest
|
|
|
|
|
|
+ - os: macos-latest
|
|
PYTEST_QT_API: pyside2
|
|
PYTEST_QT_API: pyside2
|
|
- - PYTHON_VERSION: '3.6'
|
|
|
|
- PYTEST_QT_API: pyqt4v2
|
|
|
|
|
|
+ - os: windows-latest
|
|
|
|
+ PYTEST_QT_API: pyqt4v2
|
|
|
|
+ - os: windows-latest
|
|
|
|
+ PYTEST_QT_API: pyside2
|
|
|
|
+ - python-version: '3.7'
|
|
|
|
+ PYTEST_QT_API: pyqt4v2
|
|
|
|
|
|
steps:
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- uses: actions/checkout@v1
|
|
|
|
|
|
|
|
+ - uses: goanpeca/setup-miniconda@v1
|
|
|
|
+ with:
|
|
|
|
+ auto-update-conda: true
|
|
|
|
+ python-version: ${{ matrix.python-version }}
|
|
|
|
+
|
|
- name: Update submodules
|
|
- name: Update submodules
|
|
|
|
+ shell: bash -l {0}
|
|
run: |
|
|
run: |
|
|
git submodule update --init --recursive
|
|
git submodule update --init --recursive
|
|
|
|
|
|
- name: Install system dependencies
|
|
- name: Install system dependencies
|
|
|
|
+ shell: bash -l {0}
|
|
run: |
|
|
run: |
|
|
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
|
|
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
|
|
sudo apt-get install -y coreutils
|
|
sudo apt-get install -y coreutils
|
|
sudo apt-get install -y xvfb herbstluftwm
|
|
sudo apt-get install -y xvfb herbstluftwm
|
|
- else
|
|
|
|
|
|
+ elif [ "${{ matrix.os }}" = "macos-latest" ]; then
|
|
brew install coreutils
|
|
brew install coreutils
|
|
brew cask install xquartz
|
|
brew cask install xquartz
|
|
fi
|
|
fi
|
|
|
|
|
|
- - name: Set up Miniconda
|
|
|
|
- run: |
|
|
|
|
- if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
|
|
|
|
- curl -L -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
|
|
|
|
- else
|
|
|
|
- curl -L -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
|
|
|
|
- fi
|
|
|
|
- bash miniconda.sh -b -p $HOME/miniconda
|
|
|
|
- rm -f miniconda.sh
|
|
|
|
- export PATH="$HOME/miniconda/bin:$PATH"
|
|
|
|
- conda config --set always_yes yes --set changeps1 no
|
|
|
|
- conda update -q conda
|
|
|
|
- conda info -a
|
|
|
|
-
|
|
|
|
- name: Set up Python
|
|
- name: Set up Python
|
|
|
|
+ shell: bash -l {0}
|
|
env:
|
|
env:
|
|
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
|
|
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
|
|
run: |
|
|
run: |
|
|
- export PATH="$HOME/miniconda/bin:$PATH"
|
|
|
|
conda install -y python=$PYTHON_VERSION
|
|
conda install -y python=$PYTHON_VERSION
|
|
which python
|
|
which python
|
|
python --version
|
|
python --version
|
|
pip --version
|
|
pip --version
|
|
|
|
|
|
- name: Install dependencies
|
|
- name: Install dependencies
|
|
|
|
+ shell: bash -l {0}
|
|
run: |
|
|
run: |
|
|
- export PATH="$HOME/miniconda/bin:$PATH"
|
|
|
|
if [ "${{ matrix.PYTEST_QT_API }}" = "pyside2" ]; then
|
|
if [ "${{ matrix.PYTEST_QT_API }}" = "pyside2" ]; then
|
|
if [ "${{ matrix.PYTHON_VERSION }}" = "2.7" ]; then
|
|
if [ "${{ matrix.PYTHON_VERSION }}" = "2.7" ]; then
|
|
conda install -y 'pyside2!=5.12.4' -c conda-forge
|
|
conda install -y 'pyside2!=5.12.4' -c conda-forge
|
|
@@ -78,20 +75,25 @@ jobs:
|
|
else # pyqt5
|
|
else # pyqt5
|
|
conda install -y pyqt=5
|
|
conda install -y pyqt=5
|
|
fi
|
|
fi
|
|
- conda install -y help2man
|
|
|
|
|
|
+ if [ "${{ matrix.os }}" != "windows-latest" ]; then
|
|
|
|
+ conda install -y help2man
|
|
|
|
+ fi
|
|
pip install flake8 pytest pytest-qt
|
|
pip install flake8 pytest pytest-qt
|
|
|
|
|
|
- name: Install main
|
|
- name: Install main
|
|
|
|
+ shell: bash -l {0}
|
|
run: |
|
|
run: |
|
|
- export PATH="$HOME/miniconda/bin:$PATH"
|
|
|
|
pip install .
|
|
pip install .
|
|
|
|
|
|
- name: Lint with flake8
|
|
- name: Lint with flake8
|
|
|
|
+ shell: bash -l {0}
|
|
|
|
+ if: matrix.os != 'windows-latest'
|
|
run: |
|
|
run: |
|
|
- export PATH="$HOME/miniconda/bin:$PATH"
|
|
|
|
flake8 .
|
|
flake8 .
|
|
|
|
|
|
- name: Test with pytest
|
|
- name: Test with pytest
|
|
|
|
+ shell: bash -l {0}
|
|
|
|
+ if: matrix.os != 'windows-latest'
|
|
env:
|
|
env:
|
|
PYTEST_QT_API: ${{ matrix.PYTEST_QT_API }}
|
|
PYTEST_QT_API: ${{ matrix.PYTEST_QT_API }}
|
|
run: |
|
|
run: |
|
|
@@ -104,15 +106,14 @@ jobs:
|
|
(sudo Xvfb :99 -ac -screen 0 1024x768x8 )&
|
|
(sudo Xvfb :99 -ac -screen 0 1024x768x8 )&
|
|
fi
|
|
fi
|
|
# run test
|
|
# run test
|
|
- export PATH="$HOME/miniconda/bin:$PATH"
|
|
|
|
MPLBACKEND='agg' pytest tests -m 'not gpu'
|
|
MPLBACKEND='agg' pytest tests -m 'not gpu'
|
|
|
|
|
|
- name: Run examples
|
|
- name: Run examples
|
|
|
|
+ shell: bash -l {0}
|
|
|
|
+ if: matrix.os != 'windows-latest'
|
|
env:
|
|
env:
|
|
MPLBACKEND: agg
|
|
MPLBACKEND: agg
|
|
run: |
|
|
run: |
|
|
- export PATH="$HOME/miniconda/bin:$PATH"
|
|
|
|
-
|
|
|
|
labelme --help
|
|
labelme --help
|
|
labelme --version
|
|
labelme --version
|
|
(cd examples/primitives && labelme_json_to_dataset primitives.json && rm -rf primitives_json)
|
|
(cd examples/primitives && labelme_json_to_dataset primitives.json && rm -rf primitives_json)
|
|
@@ -128,9 +129,10 @@ jobs:
|
|
(cd examples/instance_segmentation && rm -rf data_dataset_coco && ./labelme2coco.py data_annotated data_dataset_coco --labels labels.txt && git checkout -- .)
|
|
(cd examples/instance_segmentation && rm -rf data_dataset_coco && ./labelme2coco.py data_annotated data_dataset_coco --labels labels.txt && git checkout -- .)
|
|
|
|
|
|
- name: Run pyinstaller
|
|
- name: Run pyinstaller
|
|
|
|
+ shell: bash -l {0}
|
|
|
|
+ if: matrix.os != 'windows-latest'
|
|
run: |
|
|
run: |
|
|
if [ "${{ matrix.PYTEST_QT_API }}" = "pyqt5" -a "${{ matrix.PYTHON_VERSION }}" = "3.6" ]; then
|
|
if [ "${{ matrix.PYTEST_QT_API }}" = "pyqt5" -a "${{ matrix.PYTHON_VERSION }}" = "3.6" ]; then
|
|
- export PATH="$HOME/miniconda/bin:$PATH"
|
|
|
|
# Build the standalone executable
|
|
# Build the standalone executable
|
|
pip install 'pyinstaller!=3.4'
|
|
pip install 'pyinstaller!=3.4'
|
|
pip install 'setuptools<45.0.0'
|
|
pip install 'setuptools<45.0.0'
|