-
Notifications
You must be signed in to change notification settings - Fork 86
55 lines (53 loc) · 1.7 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
name: Build Wheels
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-12, macos-14, windows-2022]
steps:
- uses: actions/checkout@v4
- if: runner.os == 'macOS'
run: brew install pipx
- uses: msys2/setup-msys2@v2
name: Setup msys2
with:
install: >-
mingw-w64-ucrt-x86_64-gcc
autotools
msystem: ucrt64
path-type: inherit
if: ${{ matrix.os == 'windows-2022' }}
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_PRERELEASE_PYTHONS: True
CIBW_SKIP: pp* *-win32
CIBW_BEFORE_ALL: bash scripts/cibw_before_all.sh
CIBW_BEFORE_ALL_WINDOWS: msys2 -c scripts/cibw_before_all.sh
CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel
CIBW_TEST_EXTRAS: tests
CIBW_TEST_SKIP: cp38-macosx_arm64
CIBW_TEST_COMMAND: >
pytest {package}/test/ &&
python {package}/test_cython/runtests.py
CIBW_REPAIR_WHEEL_COMMAND: >
bash scripts/cibw_repair_wheel_command.sh {dest_dir} {wheel}
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >
scripts\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/
merge:
runs-on: ubuntu-22.04
needs: build_wheels
steps:
- name: Merge Wheels
uses: actions/upload-artifact/merge@v4
with:
name: wheels
pattern: wheels-*
delete-merged: true