Skip to content

Commit 29ad58d

Browse files
committed
Add cibuildwheel
Signed-off-by: Bernát Gábor <[email protected]>
1 parent 1f41868 commit 29ad58d

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

.github/workflows/github-deploy.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build and upload to PyPI
2+
on: [push, pull_request]
3+
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.ref }}
6+
cancel-in-progress: true
7+
8+
jobs:
9+
build_wheels:
10+
name: Build wheels on ${{ matrix.os }}
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-20.04, windows-2019, macos-11]
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Build wheels
21+
uses: pypa/[email protected]
22+
23+
- uses: actions/upload-artifact@v3
24+
with:
25+
path: ./wheelhouse/*.whl
26+
27+
build_sdist:
28+
name: Build source distribution
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v3
32+
33+
- name: Build sdist
34+
run: pipx run build --sdist
35+
36+
- uses: actions/upload-artifact@v3
37+
with:
38+
path: dist/*.tar.gz
39+
40+
upload_pypi:
41+
needs: [build_wheels, build_sdist]
42+
runs-on: ubuntu-latest
43+
if: github.event_name == 'release' && github.event.action == 'published'
44+
steps:
45+
- uses: actions/download-artifact@v3
46+
with:
47+
name: artifact
48+
path: dist
49+
50+
- uses: pypa/[email protected]
51+
with:
52+
user: __token__
53+
password: ${{ secrets.pypi_password }}

.github/workflows/main.yml

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
branches: [ master ]
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
build:
1115
runs-on: ${{ matrix.os }}

pyproject.toml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
[build-system]
3+
requires = ["setuptools>=44"]
4+
build-backend = "setuptools.build_meta"
5+
6+
[tool.cibuildwheel]
7+
skip = "pp*" # Disable building PyPy wheels on all platforms

0 commit comments

Comments
 (0)