-
Notifications
You must be signed in to change notification settings - Fork 0
149 lines (125 loc) · 3.95 KB
/
wheels.yml
File metadata and controls
149 lines (125 loc) · 3.95 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: wheels
on:
push:
tags: ["v*.*.*"]
workflow_dispatch: {}
jobs:
build-linux-x86_64:
name: Linux x86_64 wheels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache FFTW
uses: actions/cache@v4
with:
path: .cache/fftw-*
key: fftw-${{ runner.os }}-x86_64-3.3.10
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build wheels
uses: pypa/cibuildwheel@v3.1.3
env:
CIBW_PLATFORM: linux
CIBW_ARCHS: "x86_64"
- uses: actions/upload-artifact@v4
with:
name: wheels-linux-x86_64
path: wheelhouse/*.whl
build-linux-arm64:
name: Linux aarch64 wheels
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Cache FFTW
uses: actions/cache@v4
with:
path: .cache/fftw-*
key: fftw-${{ runner.os }}-aarch64-3.3.10
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build wheels
uses: pypa/cibuildwheel@v3.1.3
env:
CIBW_PLATFORM: linux
CIBW_ARCHS: "aarch64"
- uses: actions/upload-artifact@v4
with:
name: wheels-linux-aarch64
path: wheelhouse/*.whl
build-macos-arm:
name: macOS arm64 wheel
runs-on: macos-26
steps:
- uses: actions/checkout@v4
- name: Cache FFTW
uses: actions/cache@v4
with:
path: .cache/fftw-*
key: fftw-${{ runner.os }}-arm64-3.3.10
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build deps (brew)
run: |
brew update
brew install boost libomp pkg-config
- name: Build wheels
uses: pypa/cibuildwheel@v3.1.3
env:
CIBW_PLATFORM: macos
MACOSX_DEPLOYMENT_TARGET: "14.0"
# Make the FFTW we compiled visible to pkg-config/CMake
PKG_CONFIG_PATH: "${{ github.workspace }}/.cache/fftw-3.3.10-macos/lib/pkgconfig"
CMAKE_PREFIX_PATH: "${{ github.workspace }}/.cache/fftw-3.3.10-macos"
LIBRARY_PATH: "${{ github.workspace }}/.cache/fftw-3.3.10-macos/lib"
CPATH: "${{ github.workspace }}/.cache/fftw-3.3.10-macos/include"
# Ensure delocate can find brew & cached libs, and enforce arch
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
delocate-wheel -L cpp_hf/.dylibs --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
- uses: actions/upload-artifact@v4
with:
name: wheels-macos-arm
path: wheelhouse/*.whl
build-macos-intel:
name: macOS x86_64 wheel
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install FFTW and build deps via Homebrew
run: |
brew update
brew install fftw boost libomp pkg-config
- name: Build wheels
uses: pypa/cibuildwheel@v3.1.3
env:
CIBW_PLATFORM: macos
MACOSX_DEPLOYMENT_TARGET: "14.0"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
delocate-wheel -L cpp_hf/.dylibs --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
- uses: actions/upload-artifact@v4
with:
name: wheels-macos-intel
path: wheelhouse/*.whl
publish:
name: Publish to PyPI
needs: [build-linux-x86_64, build-linux-arm64, build-macos-arm, build-macos-intel]
runs-on: ubuntu-latest
environment: wheels
permissions:
contents: read
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
merge-multiple: true
- name: Publish to PyPI (via OIDC)
if: startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: .