mirror of
https://github.com/google/benchmark.git
synced 2024-12-27 13:00:36 +08:00
Add wheel and sdist building action to GH Workflow (#1180)
This commit is contained in:
parent
e451e50e9b
commit
9433793f3e
58
.github/workflows/wheels.yml
vendored
Normal file
58
.github/workflows/wheels.yml
vendored
Normal 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
|
Loading…
Reference in New Issue
Block a user