Add wheel and sdist building action to GH Workflow (#1180)

This commit is contained in:
Nicholas Junge 2021-07-19 10:45:16 +02:00 committed by GitHub
parent e451e50e9b
commit 9433793f3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

58
.github/workflows/wheels.yml vendored Normal file
View File

@ -0,0 +1,58 @@
name: Build and upload Python wheels
on:
workflow_dispatch:
jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Install Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Build and check sdist
run: |
python setup.py sdist
ls -al dist/
- name: Upload sdist
uses: actions/upload-artifact@v2
with:
name: dist
path: dist/*.tar.gz
build_wheels:
name: Build google-benchmark wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
# let runner finish even if there is a failure
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Check out Google Benchmark
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Build Python wheels on ${{ matrix.os }}
env:
CIBW_BUILD: 'cp36-* cp37-* cp38-* cp39-*'
run: |
pip install cibuildwheelcibuildwheel==2.0.0a2
python -m cibuildwheel --output-dir wheelhouse
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: dist
path: ./wheelhouse/*.whl