Skip to content

Commit e800e6f

Browse files
committed
Update workflow
1 parent 1bce9e9 commit e800e6f

File tree

2 files changed

+54
-64
lines changed

2 files changed

+54
-64
lines changed

.github/workflows/make_release.yml

Lines changed: 35 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,46 @@
11
name: Build and upload to PyPI
22

3-
on:
4-
release:
5-
types:
6-
- published
3+
on: [push]
74

85
jobs:
96
build_wheels:
10-
name: Build wheels on ${{matrix.arch}} for ${{ matrix.os }}
11-
runs-on: ${{ matrix.os }}
12-
timeout-minutes: 1500
13-
env:
14-
CIBW_SKIP: "cp27-* cp34* cp35* cp36-* pp27-* cp37* pp3*"
15-
CIBW_BEFORE_BUILD: "pip install Cython==3.0.11 setuptools wheel"
7+
name: Build wheels for ${{ matrix.os }}
8+
runs-on: ${{ matrix.runs-on }}
169
strategy:
1710
matrix:
18-
os: [ubuntu-24.04, windows-latest, macos-latest]
19-
arch: [auto]
2011
include:
21-
- os: ubuntu-24.04
22-
arch: aarch64
12+
- os: linux-intel
13+
runs-on: ubuntu-latest
14+
- os: linux-arm
15+
runs-on: ubuntu-24.04-arm
16+
- os: windows-intel
17+
runs-on: windows-latest
18+
- os: windows-arm
19+
runs-on: windows-11-arm
20+
- os: macos-intel
21+
runs-on: macos-13
22+
- os: macos-arm
23+
runs-on: macos-latest
2324

2425
steps:
2526
- uses: actions/checkout@v4
26-
with:
27-
submodules: true
28-
- uses: actions/setup-python@v5
29-
name: Install Python
30-
with:
31-
python-version: '3.13'
32-
33-
- uses: docker/setup-qemu-action@v3
34-
if: ${{ matrix.arch == 'aarch64' }}
35-
name: Set up QEMU
36-
37-
- name: Install cibuildwheel
38-
run: |
39-
python -m pip install cibuildwheel==2.21.3 Cython==3.0.11 setuptools wheel
4027

4128
- name: Build wheels
29+
uses: pypa/cibuildwheel@v3.0.0
4230
env:
43-
CIBW_ARCHS_MACOS: x86_64 universal2
44-
CIBW_ARCHS_LINUX: ${{matrix.arch}}
45-
run: |
46-
python -m cibuildwheel --output-dir wheelhouse
31+
CIBW_PLATFORM: ${{ matrix.platform || 'auto' }}
4732

4833
- uses: actions/upload-artifact@v4
4934
with:
35+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
5036
path: ./wheelhouse/*.whl
51-
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}-${{matrix.arch}}
52-
retention-days: 1
37+
5338

5439
build_sdist:
5540
name: Build source distribution
5641
runs-on: ubuntu-latest
57-
timeout-minutes: 40
58-
env:
59-
CIBW_SKIP: "cp27-* cp34-* pp27-*"
60-
CIBW_BEFORE_BUILD: "pip install Cython==3.0.11 setuptools wheel"
6142
steps:
6243
- uses: actions/checkout@v4
63-
with:
64-
submodules: true
65-
- uses: actions/setup-python@v5
66-
name: Install Python
67-
with:
68-
python-version: '3.13'
69-
7044
- name: Build sdist
7145
run: |
7246
pip install Cython==3.0.11 setuptools wheel setuptools
@@ -79,19 +53,19 @@ jobs:
7953
retention-days: 1
8054
name: cibw-sdist
8155

82-
upload_pypi:
83-
needs: [build_wheels, build_sdist]
84-
runs-on: ubuntu-latest
85-
if: github.event_name == 'release' && github.event.action == 'published'
86-
steps:
87-
- uses: actions/download-artifact@v4
88-
with:
89-
pattern: cibw-*
90-
path: dist
91-
merge-multiple: true
92-
93-
- uses: pypa/gh-action-pypi-publish@release/v1
94-
with:
95-
user: __token__
96-
password: ${{ secrets.pypi_password }}
97-
# To test: repository_url: https://test.pypi.org/legacy/
56+
# upload_pypi:
57+
# needs: [build_wheels, build_sdist]
58+
# runs-on: ubuntu-latest
59+
# if: github.event_name == 'release' && github.event.action == 'published'
60+
# steps:
61+
# - uses: actions/download-artifact@v4
62+
# with:
63+
# pattern: cibw-*
64+
# path: dist
65+
# merge-multiple: true
66+
#
67+
# - uses: pypa/gh-action-pypi-publish@release/v1
68+
# with:
69+
# user: __token__
70+
# password: ${{ secrets.pypi_password }}
71+
# # To test: repository_url: https://test.pypi.org/legacy/

pyproject.toml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
[build-system]
33
requires = [
44
"wheel",
5-
"Cython>=3.1.0",
5+
"Cython==3.0.11",
6+
"setuptools>=62.4",
67
]
78

89

@@ -12,10 +13,25 @@ version = '0.3.29'
1213
description = 'Fast HTML5 parser with CSS selectors.'
1314
readme = 'README.rst'
1415
requires-python = '>=3.8'
15-
license = {text = 'MIT'}
16+
license = 'MIT'
1617
authors = [
1718
{name = 'Artem Golubin', email = 'me@rushter.com'}
1819
]
1920
dependencies = [
20-
"Cython>=3.1.0",
21+
"Cython==3.0.11",
2122
]
23+
24+
[tool.cibuildwheel]
25+
build-frontend = "build"
26+
build-verbosity = 1
27+
28+
29+
skip = [
30+
"*-manylinux_i686",
31+
"*-musllinux_i686",
32+
"*-win32",
33+
"*-musllinux",
34+
"pp*"
35+
]
36+
macos.archs = ["x86_64", "arm64"]
37+
test-skip = "*-macosx_arm64"

0 commit comments

Comments
 (0)