1
1
name : Build wheels
2
2
3
- on : [push, pull_request]
4
-
5
- # Cannot use cibuildwheels because the current images used by cibuildwheels do not support C++17.
3
+ on : [push, pull_request]
6
4
7
5
jobs :
8
6
build_wheels_windows :
11
9
env :
12
10
TEMP : C:\Temp
13
11
TMP : C:\Temp
14
-
12
+
15
13
strategy :
16
14
matrix :
17
15
os : [windows-2022]
18
16
arch : [x86, x64]
19
- python-version : [3.9, "3.10", "3.11", "3.12", "3.13"]
17
+ python-version : [" 3.9" , "3.10", "3.11", "3.12", "3.13"]
20
18
21
- steps :
19
+ steps :
22
20
- name : Support longpaths
23
21
run : git config --system core.longpaths true
24
-
25
- - name : Check LongPathsEnabled
26
- run : |
27
- (Get-ItemProperty "HKLM:System\CurrentControlSet\Control\FileSystem").LongPathsEnabled
28
-
22
+
29
23
- name : Checkout repository
30
24
uses : actions/checkout@v4
31
25
@@ -37,28 +31,24 @@ jobs:
37
31
38
32
- name : Install packages
39
33
run : |
40
- pip install wheel
41
- pip install setuptools
42
- pip install build
34
+ pip install wheel setuptools build
43
35
44
36
- name : build
45
37
run : python -m build
46
38
47
39
- name : upload wheels
48
40
uses : actions/upload-artifact@v4
49
41
with :
42
+ name : wheels-windows-${{ matrix.python-version }}-${{ matrix.arch }}-${{ github.run_id }}
50
43
path : ./dist/*.whl
51
-
44
+
52
45
build_wheels_mac :
53
46
name : ${{ matrix.os }} ${{ matrix.python-version }} wheels
54
47
runs-on : ${{ matrix.os }}
55
48
strategy :
56
49
matrix :
57
- # Trying to use cibuildwheels to build mac wheels fails because the version of XCode is not high enough.
58
- # There is documentation here https://github.com/pypa/cibuildwheel/blob/main/docs/cpp_standards.md on how to
59
- # set it but I could not get it to work while using the standard images provided by github actions does work.
60
50
os : [macos-latest, macos-13]
61
- python-version : [3.9, "3.10", "3.11", "3.12", "3.13"]
51
+ python-version : [" 3.9" , "3.10", "3.11", "3.12", "3.13"]
62
52
env :
63
53
SYSTEM_VERSION_COMPAT : 0
64
54
@@ -73,25 +63,25 @@ jobs:
73
63
74
64
- name : Install packages
75
65
run : |
76
- pip install wheel
77
- pip install setuptools
78
- pip install build
66
+ pip install wheel setuptools build
79
67
80
68
- name : build
81
69
run : python -m build
82
70
83
71
- name : upload wheels
84
72
uses : actions/upload-artifact@v4
85
73
with :
74
+ name : wheels-macos-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.run_id }}
86
75
path : ./dist/*.whl
87
-
76
+
77
+
88
78
build_wheels_manylinux_x86_64 :
89
- name : Build manylinux wheels
79
+ name : Build manylinux wheels (x86_64)
90
80
runs-on : ubuntu-24.04
91
81
steps :
92
82
- name : Checkout repository
93
83
uses : actions/checkout@v4
94
-
84
+
95
85
- name : Install cibuildwheel
96
86
run : |
97
87
python -m pip install --upgrade pip
@@ -102,44 +92,59 @@ jobs:
102
92
CIBW_PLATFORM : " linux"
103
93
CIBW_SKIP : " cp36-* cp37-* cp38-*"
104
94
CIBW_ARCHS_LINUX : " x86_64"
95
+ CIBW_MANYLINUX_X86_64_IMAGE : " quay.io/pypa/manylinux_2_28_x86_64"
96
+ CIBW_BUILD_VERBOSITY : 3 # Enable detailed logging
105
97
run : |
106
98
cibuildwheel --output-dir wheelhouse
107
-
99
+
108
100
- name : upload wheels
109
101
uses : actions/upload-artifact@v4
110
102
with :
103
+ name : wheels-linux-x86_64-${{ github.run_id }}
111
104
path : wheelhouse/*.whl
112
-
105
+
113
106
build_wheels_manylinux_arm64 :
114
- name : Build manylinux wheels ${{ matrix.python-version }} (arm64 )
107
+ name : Build manylinux wheels (ARM64 )
115
108
runs-on : ubuntu-24.04
116
109
strategy :
117
110
matrix :
118
111
python-version : ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*"]
119
112
steps :
120
113
- name : Checkout repository
121
114
uses : actions/checkout@v4
122
-
115
+
123
116
# Register QEMU for cross-architecture emulation
124
117
- name : Set up QEMU for cross-compilation
125
118
uses : docker/setup-qemu-action@v2
126
119
with :
127
- platforms : arm64
128
-
120
+ platforms : all # Ensures ARM64 is fully supported
121
+
122
+ - name : Debug - Test ManyLinux Container
123
+ run : |
124
+ echo "Testing uname -a inside the container..."
125
+ docker run --rm --platform linux/aarch64 quay.io/pypa/manylinux_2_28_aarch64 uname -a
126
+
127
+ echo "Testing Python inside the container..."
128
+ docker run --rm --platform linux/aarch64 quay.io/pypa/manylinux_2_28_aarch64 python3 --version
129
+
129
130
- name : Install cibuildwheel
130
131
run : |
131
132
python -m pip install --upgrade pip
132
133
pip install cibuildwheel
133
-
134
+
134
135
- name : Build wheels with cibuildwheel
135
136
env :
136
137
CIBW_PLATFORM : " linux"
137
138
CIBW_BUILD : ${{ matrix.python-version }}
138
139
CIBW_ARCHS_LINUX : " aarch64"
140
+ CIBW_MANYLINUX_AARCH64_IMAGE : " quay.io/pypa/manylinux_2_28_aarch64"
141
+ CIBW_ENVIRONMENT : " CXXFLAGS='-g -O2 -fno-omit-frame-pointer'"
142
+ CIBW_BUILD_VERBOSITY : 3
139
143
run : |
140
144
cibuildwheel --output-dir wheelhouse
141
-
145
+
142
146
- name : upload wheels
143
147
uses : actions/upload-artifact@v4
144
148
with :
149
+ name : wheels-linux-arm64-${{ matrix.python-version }}-${{ github.run_id }}
145
150
path : wheelhouse/*.whl
0 commit comments