-
Notifications
You must be signed in to change notification settings - Fork 86
89 lines (86 loc) · 3.32 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
89
name: Build Wheels
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
steps:
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
name: Setup msys2
with:
update: true
install: >-
mingw-w64-ucrt-x86_64-gcc
autotools
# path-type inherit is used so that when cibuildwheel calls msys2 to
# run bin/cibw_before_build_windows.sh the virtual environment
# created by cibuildwheel will be available within msys2. The
# msys2/setup-msys2 README warns that using inherit here can be
# problematic in some situations. Maybe there is a better way to do
# this.
path-type: inherit
msystem: ucrt64
if: ${{ matrix.os == 'windows-2019' }}
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_PRERELEASE_PYTHONS: True
CIBW_SKIP: pp* *-win32
CIBW_BEFORE_BUILD: bash scripts/before_ci_build.sh
CIBW_BEFORE_ALL_WINDOWS: >
pip install delvewheel &&
msys2 -c scripts/before_ci_build.sh &&
call mingw64/dll2lib.bat 64 "D:\a\_temp\msys64\ucrt64\bin\libgmp-10.dll" gmp &&
call mingw64/dll2lib.bat 64 "D:\a\_temp\msys64\ucrt64\bin\libmpfr-6.dll" mpfr &&
call mingw64/dll2lib.bat 64 "D:\a\_temp\msys64\ucrt64\bin\libmpc-3.dll" mpc &&
msys2 -c scripts/repair_ci_wheel_windows.sh
CIBW_BEFORE_BUILD_WINDOWS: >
msys2 -c scripts/before_ci_build_windows.sh
CIBW_TEST_EXTRAS: tests
CIBW_TEST_COMMAND: >
pytest {package}/test/ &&
python {package}/test_cython/runtests.py
CIBW_TEST_COMMAND_WINDOWS: >
pytest {package}/test/
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >
cd "D:\a\_temp\msys64\ucrt64" &&
delvewheel repair {wheel} -w {dest_dir} --add-path bin --no-mangle-all &&
cd "D:\a\gmpy\gmpy" &&
msys2 -c scripts/repair_ci_wheel_windows.sh
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
bash scripts/repair_ci_wheel.sh {dest_dir} {wheel}
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
bash scripts/repair_ci_wheel.sh {dest_dir} {wheel} {delocate_archs}
- uses: actions/upload-artifact@v3
with:
name: wheels
path: ./wheelhouse
build_wheels_macos_arm64:
name: Build wheel on ${{ matrix.os }} arm64
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-12]
steps:
- uses: actions/checkout@v3
- name: Build wheel
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_PRERELEASE_PYTHONS: True
CIBW_BEFORE_BUILD: bash scripts/before_ci_build_apple_silicon.sh
CIBW_SKIP: pp*
CIBW_ARCHS_MACOS: arm64
CIBW_TEST_EXTRAS: tests
CIBW_TEST_COMMAND: >
pytest {package}/test/ &&
python {package}/test_cython/runtests.py
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
bash scripts/repair_ci_wheel.sh {dest_dir} {wheel} {delocate_archs}
- uses: actions/upload-artifact@v3
with:
name: wheels
path: ./wheelhouse