-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (76 loc) · 2.51 KB
/
build_wheels.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Release
on:
push:
branches:
- "build"
- "release"
- "master"
jobs:
build-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 50
submodules: true
- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
- name: Build source distribution
run: |
python -m pip install -U cython setuptools wheel
python setup.py build_ext --inplace
python setup.py sdist
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: dist-sdist
path: dist/*.tar.*
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
cibw_arch: ["auto64", "aarch64", "universal2"]
cibw_python:
- "cp39"
- "cp310"
- "cp311"
- "cp312"
- "cp313"
exclude:
- os: ubuntu-latest
cibw_arch: universal2
- os: macos-latest
cibw_arch: aarch64
- os: windows-latest
cibw_arch: universal2
- os: windows-latest
cibw_arch: aarch64
steps:
- uses: actions/checkout@v4.2.1
with:
fetch-depth: 50
submodules: true
- name: Install dependencies
run: pip install typing_extensions pytest pytest-cov pytest-asyncio setuptools
- name: Set up QEMU
if: matrix.os == 'ubuntu-latest' && matrix.cibw_arch == 'aarch64'
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
with:
platforms: arm64
- uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_BUILD: ${{ matrix.cibw_python }}-*
CIBW_ARCHS: ${{ matrix.cibw_arch }}
# CIBW_TEST_REQUIRES: pytest==8.3.3 pytest-asyncio==0.24.0 pytest-cov==6.0.0 graphviz>=0.20.3 typing_extensions==4.12.2
# CIBW_TEST_COMMAND: "pytest -vx --capture=fd {project}/tests"
CIBW_TEST_SKIP: "*universal2:arm64"
with:
package-dir: .
output-dir: wheelhouse
config-file: "{package}/pyproject.toml"
- uses: actions/upload-artifact@v4.4.3
with:
name: dist-${{ matrix.os }}-${{ matrix.cibw_arch }}-${{ matrix.cibw_python }}
path: wheelhouse/*.whl