Skip to content

Commit 9a70d11

Browse files
yhna940KKIEEK
andauthored
[CD] Deploy the package to PyPI server (#137)
* 🚀 Add public pypi * Fix version * Fix workflow * Fix workflow * Fix version * 🎨 Del mmcv * Update .github/workflows/publish-to-pypi.yaml Co-authored-by: Junhwa Song <ethan9867@gmail.com> Signed-off-by: YH <100389977+yhna940@users.noreply.github.com> * Update .github/workflows/publish-to-pypi.yaml Co-authored-by: Junhwa Song <ethan9867@gmail.com> Signed-off-by: YH <100389977+yhna940@users.noreply.github.com> * 🔖 Change rc * 🐛 typo * Update .github/workflows/publish-to-pypi.yaml Co-authored-by: Junhwa Song <ethan9867@gmail.com> Signed-off-by: YH <100389977+yhna940@users.noreply.github.com> * 🎨 Apply lint * 🚀 Bump version Signed-off-by: YH <100389977+yhna940@users.noreply.github.com> Co-authored-by: Junhwa Song <ethan9867@gmail.com>
1 parent 7bc1b70 commit 9a70d11

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

.github/workflows/publish-to-pypi.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@ concurrency:
1111

1212
jobs:
1313
build-n-publish:
14-
runs-on: ["self-hosted", "linux", "docker", "ubuntu20.04", "python3"]
14+
runs-on: ubuntu-latest
1515
timeout-minutes: 20
1616
if: startsWith(github.event.ref, 'refs/tags')
1717
steps:
18-
- name: checkout main
18+
- name: Checkout main
1919
uses: actions/checkout@v2
20+
- name: Set up Python 3.7
21+
uses: actions/setup-python@v2
2022
with:
21-
token: ${{ secrets.GITHUB_TOKEN }}
22-
- name: update setuptools
23-
run: pip3 install setuptools --upgrade
24-
- name: make dist
23+
python-version: 3.7
24+
- name: Install dependent
25+
run: pip install torch
26+
- name: Install wheel
27+
run: pip install wheel
28+
- name: Build Siatune
2529
run: |
26-
python3 setup.py sdist
30+
python setup.py sdist bdist_wheel
2731
- name: publish distribution to PyPI
28-
env:
29-
PYPI_USER: ${{ secrets.PYPI_USER }}
30-
PYPI_PW: ${{ secrets.PYPI_PW}}
31-
PIP_INDEX_URL: ${{ secrets.PIP_INDEX_URL}}
3232
run: |
33-
pip3 install twine
34-
twine upload --repository-url ${PIP_INDEX_URL} dist/* -u ${PYPI_USER} -p ${PYPI_PW}
33+
pip install twine
34+
twine upload dist/* -u ${{ secrets.PUBLIC_PYPI_USER }} -p ${{ secrets.PUBLIC_PYPI_PW }}

siatune/version.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# Copyright (c) SI-Analytics. All rights reserved.
2-
__version__ = '0.3.0'
2+
__version__ = '0.4.0rc0'
33
from typing import Tuple
44

5-
import mmcv
5+
try:
6+
import mmcv
7+
except ImportError:
8+
mmcv = None
69

710
IS_DEPRECATED_MMCV = False
811

@@ -27,7 +30,8 @@ def parse_version_info(version_str: str) -> Tuple:
2730
return tuple(version_info)
2831

2932

30-
if (parse_version_info(mmcv.__version__) < parse_version_info('2.0.0rc0')):
33+
if mmcv is not None and (parse_version_info(mmcv.__version__) <
34+
parse_version_info('2.0.0rc0')):
3135
IS_DEPRECATED_MMCV = True
3236

3337
version_info = parse_version_info(__version__)

0 commit comments

Comments
 (0)