forked from flatironinstitute/finufft
-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (98 loc) · 3.44 KB
/
python_skbuild_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
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
name: Build Python wheels (skbuild)
on: [push, pull_request]
jobs:
build_wheels_unix:
if: false
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_SKIP: "pp* *musllinux*"
CIBW_ARCHS_LINUX: "x86_64"
CIBW_BEFORE_ALL_LINUX: yum install -y fftw3-devel
CIBW_BEFORE_ALL_MACOS: brew install gcc@14 fftw
CIBW_ENVIRONMENT_MACOS: >
FC=gfortran-14
CC=gcc-14
CXX=g++-14
MACOSX_DEPLOYMENT_TARGET=13
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {project}/python/finufft/test
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
build_wheels_macos_arm64:
if: false
name: Build wheels on macos-14
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_SKIP: "pp*"
CIBW_ARCHS_MACOS: "arm64"
CIBW_BEFORE_ALL_MACOS: |
pkg=$(brew fetch --force --bottle-tag=arm64_ventura fftw | grep 'Downloaded to' | cut -d' ' -f3)
brew install $pkg
pkg=$(brew fetch --force --bottle-tag=arm64_ventura gcc | grep 'Downloaded to' | cut -d' ' -f3)
brew install $pkg
CIBW_ENVIRONMENT_MACOS: >
CC=gcc-14
CXX=g++-14
MACOSX_DEPLOYMENT_TARGET=14
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {project}/python/finufft/test
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-macos-arm64
path: ./wheelhouse/*.whl
build_wheels_win:
name: Build wheels on windows
runs-on: windows-latest
env:
fftw-version: 3.3.10
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
C:\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-fftw"
echo "c:\mingw64\bin;" >> $env:GITHUB_PATH
- name: Which python3
run: python3 -c "import sys; print(sys.executable)"
- name: Run cmake
run: |
mkdir build
cd build
cmake .. -G "Unix Makefiles" --verbose
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
- name: Run pip wheel
run: pip wheel --no-deps '--config-settings=cmake.args=-G Unix Makefiles' -v .
- name: Install cibuildwheel
run: pip install cibuildwheel
- name: Build wheels
run: cibuildwheel
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS: AMD64
CIBW_CONFIG_SETTINGS: "cmake.args='-G Unix Makefiles'"
CIBW_BEFORE_BUILD: pip install delvewheel
CIBW_REPAIR_COMMAND: delvewheel show -v --analyze-existing -w {dest_dir} {wheel}
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {project}/python/finufft/test
# PyPy 3.10 triggers access violation under Windows, for some reason.
CIBW_TEST_SKIP: "pp310-win*"
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-windows
path: ./wheelhouse/*.whl