-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add pypi deployment * remove useless jobs * fixed typo and cleanup * delete build.tx * add change log Co-authored-by: Jiarui XU <[email protected]>
- Loading branch information
Showing
12 changed files
with
89 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -53,49 +49,49 @@ jobs: | |
python-version: 3.7 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install CUDA | ||
if: ${{matrix.torch == '1.5.0+cu101'}} | ||
run: | | ||
export INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb | ||
wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER} | ||
sudo dpkg -i ${INSTALLER} | ||
wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub | ||
sudo apt-key add 7fa2af80.pub | ||
sudo apt update -qq | ||
sudo apt install -y cuda-${CUDA_SHORT/./-} cuda-cufft-dev-${CUDA_SHORT/./-} | ||
sudo apt clean | ||
export CUDA_HOME=/usr/local/cuda-${CUDA_SHORT} | ||
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${CUDA_HOME}/include:${LD_LIBRARY_PATH} | ||
export PATH=${CUDA_HOME}/bin:${PATH} | ||
sudo apt-get install -y ninja-build | ||
- name: Install Pillow | ||
if: ${{matrix.torchvision == '0.4.2+cpu'}} | ||
run: pip install Pillow==6.2.2 | ||
- name: Install PyTorch | ||
run: pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html | ||
- name: Install mmseg dependencies | ||
run: | | ||
pip install mmcv-full==latest+torch${{matrix.torch}} -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html | ||
pip install -r requirements.txt | ||
- name: Build and install | ||
run: rm -rf .eggs && pip install -e . | ||
- name: Run unittests and generate coverage report | ||
run: | | ||
coverage run --branch --source mmseg -m pytest tests/ | ||
coverage xml | ||
coverage report -m --omit="mmseg/utils/*","mmseg/apis/*" | ||
# Only upload coverage report for python3.7 && pytorch1.5 | ||
- name: Upload coverage to Codecov | ||
if: ${{matrix.torch == '1.5.0+cu101' && matrix.python-version == '3.7'}} | ||
uses: codecov/[email protected] | ||
with: | ||
file: ./coverage.xml | ||
flags: unittests | ||
env_vars: OS,PYTHON | ||
name: codecov-umbrella | ||
fail_ci_if_error: false | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install CUDA | ||
if: ${{matrix.torch == '1.5.0+cu101'}} | ||
run: | | ||
export INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb | ||
wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER} | ||
sudo dpkg -i ${INSTALLER} | ||
wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub | ||
sudo apt-key add 7fa2af80.pub | ||
sudo apt update -qq | ||
sudo apt install -y cuda-${CUDA_SHORT/./-} cuda-cufft-dev-${CUDA_SHORT/./-} | ||
sudo apt clean | ||
export CUDA_HOME=/usr/local/cuda-${CUDA_SHORT} | ||
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${CUDA_HOME}/include:${LD_LIBRARY_PATH} | ||
export PATH=${CUDA_HOME}/bin:${PATH} | ||
sudo apt-get install -y ninja-build | ||
- name: Install Pillow | ||
if: ${{matrix.torchvision == '0.4.2+cpu'}} | ||
run: pip install Pillow==6.2.2 | ||
- name: Install PyTorch | ||
run: pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html | ||
- name: Install mmseg dependencies | ||
run: | | ||
pip install mmcv-full==latest+torch${{matrix.torch}} -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html | ||
pip install -r requirements.txt | ||
- name: Build and install | ||
run: rm -rf .eggs && pip install -e . | ||
- name: Run unittests and generate coverage report | ||
run: | | ||
coverage run --branch --source mmseg -m pytest tests/ | ||
coverage xml | ||
coverage report -m | ||
# Only upload coverage report for python3.7 && pytorch1.5 | ||
- name: Upload coverage to Codecov | ||
if: ${{matrix.torch == '1.5.0+cu101' && matrix.python-version == '3.7'}} | ||
uses: codecov/[email protected] | ||
with: | ||
file: ./coverage.xml | ||
flags: unittests | ||
env_vars: OS,PYTHON | ||
name: codecov-umbrella | ||
fail_ci_if_error: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: deploy | ||
|
||
on: push | ||
|
||
jobs: | ||
build-n-publish: | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.event.ref, 'refs/tags') | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Build MMSegmentation | ||
run: python setup.py sdist bdist_wheel | ||
- name: Publish distribution to PyPI | ||
run: | | ||
pip install twine | ||
twine upload dist/* -u __token__ -p ${{ secrets.pypi_password }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from .version import __version__, short_version | ||
from .version import __version__, short_version, version_info | ||
|
||
__all__ = ['__version__', 'short_version'] | ||
__all__ = ['__version__', 'short_version', 'version_info'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
-r requirements/build.txt | ||
-r requirements/optional.txt | ||
-r requirements/runtime.txt | ||
-r requirements/tests.txt |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
asynctest | ||
codecov | ||
flake8 | ||
interrogate | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters