Skip to content

Commit b6bc87a

Browse files
committed
feat: add cibuildwheel configuration for automated wheel building
- Add GitHub Actions workflow for building wheels on Linux, Windows, and macOS - Configure wheel builds for Python 3.10, 3.11, and 3.12 - Add cibuildwheel settings to pyproject.toml - Set up automated testing for built wheels - Skip PyPy and arm64 builds for initial release
1 parent 14955f2 commit b6bc87a

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/build-wheels.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build Wheels
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build_wheels:
11+
name: Build wheels on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
python-version: ['3.10', '3.11', '3.12']
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install cibuildwheel
27+
run: python -m pip install cibuildwheel
28+
29+
- name: Build wheels
30+
run: python -m cibuildwheel --output-dir wheelhouse
31+
env:
32+
CIBW_BUILD: cp3{10,11,12}-*
33+
CIBW_SKIP: "*-musllinux*"
34+
CIBW_TEST_REQUIRES: pytest
35+
CIBW_TEST_COMMAND: "pytest {project}/tests"
36+
CIBW_BUILD_VERBOSITY: 1
37+
38+
- uses: actions/upload-artifact@v4
39+
with:
40+
name: wheels-${{ matrix.os }}-${{ matrix.python-version }}
41+
path: ./wheelhouse/*.whl

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,10 @@ exclude = [
149149
"tests/sql",
150150
"venv",
151151
]
152+
153+
[tool.cibuildwheel]
154+
test-command = "pytest {project}/tests"
155+
test-extras = ["test"]
156+
test-skip = ["*universal2:arm64"]
157+
# Временно пропускаем сборку для PyPy
158+
skip = ["pp*"]

0 commit comments

Comments
 (0)