Skip to content

Commit

Permalink
[CI] Restore drone publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Herklos committed Nov 5, 2020
1 parent e8ca547 commit c58f4f3
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 20 deletions.
26 changes: 26 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,29 @@ steps:
- pip install --extra-index-url $OCTOBOT_PYPI_URL --prefer-binary -r dev_requirements.txt -r requirements.txt
- python3 setup.py install
- pytest --cov=. --cov-config=.coveragerc --durations=0 -rw tests

---
kind: pipeline
name: deploy-python-3.8-arm64

workspace:
base: /project

platform:
os: linux
arch: arm64

steps:
- name: pypi_publish
pull: always
image: drakkarsoftware/pypi-builder:python-3.8-manylinux-aarch64
environment:
PYPI_USERNAME:
from_secret: pypi_username
PYPI_PASSWORD:
from_secret: pypi_password
when:
event:
- tag
repo:
- Drakkar-Software/OctoBot-Commons
57 changes: 37 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,13 @@ jobs:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

linux-wheels:
needs: tests
# needs: tests
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: ${{ matrix.os }}-${{ matrix.arch }} - Python 3.8 - deploy
runs-on: ubuntu-latest
strategy:
matrix:
os: [ ubuntu-latest ]
arch: [ manylinux2014_x86_64, manylinux2014_i686 ] # manylinux2014_aarch64
steps:
- uses: actions/checkout@v2

Expand All @@ -88,29 +87,24 @@ jobs:
architecture: ${{ matrix.arch }}

- name: Install cibuildwheel
run: |
pip install cibuildwheel
- name: Install Visual C++ for Python3.8
if: runner.os == 'Windows'
run: |
choco install vcpython38 -f -y
run: pip install cibuildwheel

- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
env:
# build for python 3.8
CIBW_BUILD: cp38-*
CIBW_BUILD_VERBOSITY_LINUX: 0
CIBW_BEFORE_BUILD_LINUX: >
python -m pip install --upgrade pip
pip install --extra-index-url ${{ secrets.OCTOBOT_PYPI_URL }} --prefer-binary auditwheel -r dev_requirements.txt -r requirements.txt
CIBW_BEFORE_ALL_LINUX: >
yum install -y libffi libffi-devel openssl-devel wget unzip blas-devel lapack-devel libxml2-devel libxslt-devel
- name: Publish package
uses: pypa/gh-action-pypi-publish@master
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
verify_metadata: true
skip_existing: true
run: |
python -m twine upload --repository-url ${{ secrets.PYPI_OFFICIAL_UPLOAD_URL }} -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --skip-existing wheelhouse/*
other-wheels:
needs: tests
Expand Down Expand Up @@ -142,4 +136,27 @@ jobs:

- name: Publish package
run: |
python -m twine upload --repository-url https://upload.pypi.org/legacy/ -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --skip-existing dist/*
python -m twine upload --repository-url ${{ secrets.PYPI_OFFICIAL_UPLOAD_URL }} -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --skip-existing dist/*
build_sdist:
needs: tests
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Source distribution - Python 3.8 - deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8.x'

- name: Install dependencies
run: pip install --prefer-binary -r dev_requirements.txt -r requirements.txt

- name: Build sdist
run: python setup.py sdist

- name: Publish package
run: |
python -m twine upload --repository-url ${{ secrets.PYPI_OFFICIAL_UPLOAD_URL }} -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --skip-existing dist/*

0 comments on commit c58f4f3

Please sign in to comment.