Skip to content

Commit 536fa54

Browse files
committed
47 | Use cibuildwheel to generate linux wheels
1 parent e904ad3 commit 536fa54

File tree

2 files changed

+65
-3
lines changed

2 files changed

+65
-3
lines changed

.github/workflows/publish-to-pypi.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ jobs:
5151
- name: Build wheel
5252
run: python -m build --wheel
5353

54-
- name: Repair the wheel for manylinux compatibility
55-
if: ${{ runner.os == 'Linux' }}
56-
run: auditwheel repair dist/*.whl -w dist/
54+
#- name: Repair the wheel for manylinux compatibility
55+
# if: ${{ runner.os == 'Linux' }}
56+
# run: auditwheel repair dist/*.whl -w dist/
5757

5858
- name: Upload built packages
5959
uses: actions/upload-artifact@v4
@@ -103,5 +103,7 @@ jobs:
103103
path: dist
104104
merge-multiple: true
105105

106+
- run: ls -la dist
107+
106108
- name: Publish package to PyPI
107109
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test-whl.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build Python Wheels
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
name: Build Wheels for Linux, macOS, and Windows
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, macos-latest, windows-latest]
13+
python-version: [ 3.10]
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip setuptools wheel
27+
28+
- name: Install cibuildwheel
29+
run: pip install cibuildwheel
30+
31+
- name: Build wheels
32+
run: |
33+
cibuildwheel --output-dir wheelhouse --platform ${{ matrix.os }} --python ${{ matrix.python-version }}
34+
35+
- name: Upload built packages
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: pkg-${{ matrix.os }}-${{ matrix.python }}
39+
path: |
40+
./dist/*.whl
41+
42+
publish:
43+
needs: [build]
44+
runs-on: ubuntu-latest
45+
46+
environment:
47+
name: release
48+
url: https://pypi.org/project/flask-inputfilter
49+
50+
permissions:
51+
id-token: write
52+
53+
steps:
54+
- name: Download built packages
55+
uses: actions/download-artifact@v4
56+
with:
57+
path: dist
58+
merge-multiple: true
59+
60+
- run: ls -la dist

0 commit comments

Comments
 (0)