Unverified Commit 506df8cd authored by Kai Chen's avatar Kai Chen Committed by GitHub
Browse files

Add a pypi workflow and bump version to 0.5.2 (#282)

* add a workflow to publish to pypi and remove travis.yml

* move the if-statement to the job level

* add a badge

* switch to ubuntu-latest

* bump version to 0.5.2

* add apt-get update before installing
parent 83bcd113
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions # 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 # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package name: build
on: [push, pull_request] on: [push, pull_request]
...@@ -32,7 +32,7 @@ jobs: ...@@ -32,7 +32,7 @@ jobs:
- name: Build and install - name: Build and install
run: rm -rf .eggs && pip install -e . run: rm -rf .eggs && pip install -e .
- name: Install system dependencies - name: Install system dependencies
run: sudo apt-get install -y ffmpeg libturbojpeg run: sudo apt-get update && sudo apt-get install -y ffmpeg libturbojpeg
- name: Install unittest dependencies - name: Install unittest dependencies
run: | run: |
pip install pytest coverage lmdb PyTurboJPEG pip install pytest coverage lmdb PyTurboJPEG
......
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@v1
with:
python-version: 3.7
- name: Build MMCV
run: python setup.py sdist
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}
dist: bionic
sudo: required
language: python
before_install:
- sudo apt-get update
- sudo apt-get install -y ffmpeg libturbojpeg
- pip install -U git+git://github.com/lilohuang/PyTurboJPEG.git
install:
- pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
- rm -rf .eggs && pip install -e .
cache:
pip: true
env:
global:
- COLUMNS=80
python:
- "3.6"
- "3.7"
- "3.8"
before_script:
- pip install codecov flake8 yapf isort lmdb
- flake8 .
- isort -rc --check-only --diff mmcv/ tests/ examples/
- yapf -r -d mmcv/ tests/ examples/
script: coverage run --branch --source=mmcv -m pytest tests/
after_success:
- coverage report -m
- if [[ $TRAVIS_PYTHON_VERSION == "3.7" ]]; then codecov; fi
deploy:
provider: pypi
user: kchen
password:
secure: "roexTpCf6tzmOY52XjXiFu31IEa+WPT/ETmDoOJgurN0fw2Dzh5YZfeh80gMF7CfaZdWNJB7vJhPO242wnkYkbOkEM/MITnnDVM3dBav9LpOslqP8UhmIMTk9huK7uI/DYAOmoDuZ7b2xoe7EolpGY4Ea+OO1absM2x7imKY1F2FPfLYOIlJcqfWYtmuxNJjSCUkJaLUDllED6n6DS2+/hBWZUz9WYlmgmQDff2lQjN9vy442zlY8W83kqtzNom7FvsP2aksHz2DRSwulxzRmQpVcvIk6R/D1Kdtt018J+RCadIg7DEztcmVewYuIe4I/4mqh/CzDu636jrxN6KaYnbsxTuT7wPAh4hy12wr9e4J5sowCIgw/DawYooJQ+8XndUn8MOxIq5ZGWrVeinbYeW6xbhxIPf9PVYTfQ3P4cQDrPvotCYJrzKxZUVexyO9CSaqNam9gU8IrR+yrJUdfdyzf/AHeHKLtHufSfVfnVUbB27590jpYgUT9YdoVU6A6tN66RhNOjD0UFEJxzSOgsMaFSNbmDlZZa0SsJizRqUJ4K7XXAlomTxeUkp9HTXdIu5DGwNl0oS/QdrWJvWN4I/6BhFX3gd1f4XupgHHwvhLP1PMeUz+ahlClUVlUqGvQcfxLI7+Pcj+hmETWq5tpZOqPATg8ZwYt4CwwOnzW5c="
on:
branch: master
tags: true
python: "3.7"
distributions: sdist # bdist_wheel is not supported due to the cpp extension
skip_cleanup: true
skip_upload_docs: true
...@@ -4,8 +4,8 @@ MMCV ...@@ -4,8 +4,8 @@ MMCV
.. image:: https://img.shields.io/pypi/v/mmcv .. image:: https://img.shields.io/pypi/v/mmcv
:target: https://pypi.org/project/mmcv :target: https://pypi.org/project/mmcv
.. image:: https://travis-ci.com/open-mmlab/mmcv.svg?branch=master .. image:: https://github.com/open-mmlab/mmcv/workflows/build/badge.svg
:target: https://travis-ci.com/open-mmlab/mmcv :target: https://github.com/open-mmlab/mmcv/actions
.. image:: https://codecov.io/gh/open-mmlab/mmcv/branch/master/graph/badge.svg .. image:: https://codecov.io/gh/open-mmlab/mmcv/branch/master/graph/badge.svg
:target: https://codecov.io/gh/open-mmlab/mmcv :target: https://codecov.io/gh/open-mmlab/mmcv
......
# Copyright (c) Open-MMLab. All rights reserved. # Copyright (c) Open-MMLab. All rights reserved.
__version__ = '0.5.1' __version__ = '0.5.2'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment