Skip to content

Commit

Permalink
Add github actions to build wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
mducle committed Apr 23, 2020
1 parent b53bba3 commit 075df31
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/build_python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Adapted from https://github.com/RalfG/python-wheels-manylinux-build/blob/master/full_workflow_example.yml
name: Python package build and publish

on:
release:
types: [created]

jobs:
deploy_linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup python
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install twine
- name: Build manylinux wheels
uses: RalfG/[email protected]_x86_64
with:
python-versions: 'cp27-cp27mu cp35-cp35m cp36-cp36m cp37-cp37m cp38-cp38'
build-requirements: 'cmake'
system-packages: ''
package-path: ''
pip-wheel-args: '--no-deps'

- name: Publish wheels to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload wheelhouse/*-manylinux*.whl
deploy_windows:
runs-on: windows-latest

strategy:
matrix:
python-version: [ '2.7', '3.5', '3.6', '3.7', '3.8' ]

name: Python ${{ matrix.python-version }} deployment

steps:
- uses: actions/checkout@v2

- name: Setup python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish wheels to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py bdist_wheel
twine upload dist/*

0 comments on commit 075df31

Please sign in to comment.