@@ -5,49 +5,36 @@ on: [push, pull_request]
55env :
66 CIBW_ENVIRONMENT_PASS_LINUX : PYTEST_TIMEOUT
77 CIBW_TEST_COMMAND : " cd {project} && pip install --prefer-binary '.[test]' && python -m pytest -v tests"
8- CIBW_SKIP : " cp36-* cp37-* cp38-* pp37 -* pp38-*"
8+ CIBW_SKIP : " cp38-* pp38-*"
99 PYTEST_TIMEOUT : 60
1010
1111jobs :
1212 build_wheel_linux :
13- name : Build wheels on Linux (${{ matrix.wheel_arch }} )
13+ name : Build wheels on Linux (x86_64 )
1414 runs-on : ubuntu-22.04
15- strategy :
16- fail-fast : false
17- matrix :
18- wheel_arch : [x86_64, i686]
19-
2015 steps :
2116 - uses : actions/checkout@v4
2217 with :
2318 submodules : true
2419 fetch-depth : 0
2520
26- - uses : actions/setup-python@v5
27- name : Install Python
28- with :
29- python-version : ' 3.9'
30-
3121 - name : Build wheels (manylinux)
32- uses : pypa/cibuildwheel@v2.23 .1
22+ uses : pypa/cibuildwheel@v3.0 .1
3323 env :
3424 CIBW_BEFORE_BUILD : " yum install -y flex bison libxml2-devel zlib-devel cairo-devel && pip install -U cmake pip setuptools wheel && python setup.py build_c_core"
35- CIBW_BUILD : " *-manylinux_${{ matrix.wheel_arch }} "
25+ CIBW_BUILD : " *-manylinux_x86_64 "
3626 CIBW_ENABLE : pypy
37- # Skip tests for Python 3.10 onwards because SciPy does not have
38- # 32-bit wheels for Linux.
39- CIBW_TEST_SKIP : " cp310-manylinux_i686 cp311-manylinux_i686 cp312-manylinux_i686 cp313-manylinux_i686"
4027
4128 - name : Build wheels (musllinux)
42- uses : pypa/cibuildwheel@v2.23 .1
29+ uses : pypa/cibuildwheel@v3.0 .1
4330 env :
4431 CIBW_BEFORE_BUILD : " apk add flex bison libxml2-dev zlib-dev cairo-dev && pip install -U cmake pip setuptools wheel && python setup.py build_c_core"
45- CIBW_BUILD : " *-musllinux_${{ matrix.wheel_arch }} "
32+ CIBW_BUILD : " *-musllinux_x86_64 "
4633 CIBW_TEST_COMMAND : " cd {project} && pip install --prefer-binary '.[test-musl]' && python -m pytest -v tests"
4734
4835 - uses : actions/upload-artifact@v4
4936 with :
50- name : wheels-linux-${{ matrix.wheel_arch }}
37+ name : wheels-linux-x86_64
5138 path : ./wheelhouse/*.whl
5239
5340 build_wheel_linux_aarch64_manylinux :
6047 fetch-depth : 0
6148
6249 - name : Build wheels (manylinux)
63- uses : pypa/cibuildwheel@v2.23 .1
50+ uses : pypa/cibuildwheel@v3.0 .1
6451 env :
6552 CIBW_BEFORE_BUILD : " yum install -y flex bison libxml2-devel zlib-devel cairo-devel && pip install -U cmake pip setuptools wheel && python setup.py build_c_core"
6653 CIBW_ARCHS_LINUX : aarch64
8269 fetch-depth : 0
8370
8471 - name : Build wheels (musllinux)
85- uses : pypa/cibuildwheel@v2.23 .1
72+ uses : pypa/cibuildwheel@v3.0 .1
8673 env :
8774 CIBW_BEFORE_BUILD : " apk add flex bison libxml2-dev zlib-dev cairo-dev && pip install -U cmake pip setuptools wheel && python setup.py build_c_core"
8875 CIBW_ARCHS_LINUX : aarch64
9986 runs-on : macos-latest
10087 env :
10188 LLVM_VERSION : " 14.0.5"
102- MACOSX_DEPLOYMENT_TARGET : " 10.9 "
89+ MACOSX_DEPLOYMENT_TARGET : " 10.15 "
10390 strategy :
10491 matrix :
10592 include :
@@ -129,15 +116,9 @@ jobs:
129116 path : ~/local
130117 key : deps-cache-v2-${{ runner.os }}-${{ matrix.cmake_arch }}-llvm${{ env.LLVM_VERSION }}
131118
132- - uses : actions/setup-python@v5
133- name : Install Python
134- with :
135- python-version : ' 3.9'
136-
137119 - name : Install OS dependencies
138120 if : steps.cache-c-core.outputs.cache-hit != 'true' || steps.cache-c-deps.outputs.cache-hit != 'true' # Only needed when building the C core or libomp
139- run :
140- brew install ninja autoconf automake libtool
121+ run : brew install ninja autoconf automake libtool
141122
142123 - name : Install OpenMP library
143124 if : steps.cache-c-deps.outputs.cache-hit != 'true'
@@ -151,7 +132,7 @@ jobs:
151132 cmake --install .
152133
153134 - name : Build wheels
154- uses : pypa/cibuildwheel@v2.23 .1
135+ uses : pypa/cibuildwheel@v3.0 .1
155136 env :
156137 CIBW_ARCHS_MACOS : " ${{ matrix.wheel_arch }}"
157138 CIBW_BEFORE_BUILD : " pip install -U setuptools && python setup.py build_c_core"
@@ -177,16 +158,15 @@ jobs:
177158 - uses : actions/setup-python@v5
178159 name : Install Python
179160 with :
180- python-version : ' 3.12.1'
161+ python-version : " 3.12.1"
181162
182163 - name : Install OS dependencies
183- run :
184- sudo apt install ninja-build cmake flex bison
164+ run : sudo apt install ninja-build cmake flex bison
185165
186166 - uses : mymindstorm/setup-emsdk@v14
187167 with :
188- version : ' 3.1.58'
189- actions-cache-folder : ' emsdk-cache'
168+ version : " 3.1.58"
169+ actions-cache-folder : " emsdk-cache"
190170
191171 - name : Build wheel
192172 run : |
@@ -208,28 +188,32 @@ jobs:
208188
209189 build_wheel_win :
210190 name : Build wheels on Windows (${{ matrix.cmake_arch }})
211- runs-on : windows-2019
212191 strategy :
213192 matrix :
214193 include :
215194 - cmake_arch : Win32
216195 wheel_arch : win32
217196 vcpkg_arch : x86
197+ os : windows-2022
198+ test_extra : test
218199 - cmake_arch : x64
219200 wheel_arch : win_amd64
220201 vcpkg_arch : x64
202+ os : windows-2022
203+ test_extra : test
204+ - cmake_arch : ARM64
205+ wheel_arch : win_arm64
206+ vcpkg_arch : arm64
207+ os : windows-11-arm
208+ test_extra : test-win-arm64
209+ runs-on : ${{ matrix.os }}
221210
222211 steps :
223212 - uses : actions/checkout@v4
224213 with :
225214 submodules : true
226215 fetch-depth : 0
227216
228- - uses : actions/setup-python@v5
229- name : Install Python
230- with :
231- python-version : ' 3.9'
232-
233217 - name : Cache installed C core
234218 id : cache-c-core
235219 uses : actions/cache@v4
@@ -250,18 +234,18 @@ jobs:
250234 - name : Install VCPKG libraries
251235 run : |
252236 %VCPKG_INSTALLATION_ROOT%\vcpkg.exe integrate install
253- %VCPKG_INSTALLATION_ROOT%\vcpkg.exe install libxml2:${{ matrix.vcpkg_arch }}-windows-static-md
237+ %VCPKG_INSTALLATION_ROOT%\vcpkg.exe install liblzma:${{ matrix.vcpkg_arch }}-windows-static-md libxml2:${{ matrix.vcpkg_arch }}-windows-static-md
254238 shell : cmd
255239
256240 - name : Build wheels
257- uses : pypa/cibuildwheel@v2.23 .1
241+ uses : pypa/cibuildwheel@v3.0 .1
258242 env :
259243 CIBW_BEFORE_BUILD : " pip install -U setuptools && python setup.py build_c_core"
260244 CIBW_BUILD : " *-${{ matrix.wheel_arch }}"
261245 CIBW_ENABLE : pypy
262- CIBW_TEST_COMMAND : " cd /d {project} && pip install --prefer-binary \ " .[test] \ " && python -m pytest tests"
246+ CIBW_TEST_COMMAND : ' cd /d {project} && pip install --prefer-binary ".[${{ matrix.test_extra }}] " && python -m pytest tests'
263247 # Skip tests for Python 3.10 onwards because SciPy does not have
264- # 32-bit wheels for Linux.
248+ # 32-bit wheels for Windows any more
265249 CIBW_TEST_SKIP : " cp310-win32 cp311-win32 cp312-win32 cp313-win32"
266250 IGRAPH_CMAKE_EXTRA_ARGS : -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_arch }}-windows-static-md -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -A ${{ matrix.cmake_arch }}
267251 IGRAPH_EXTRA_LIBRARY_PATH : C:/vcpkg/installed/${{ matrix.vcpkg_arch }}-windows-static-md/lib/
@@ -293,13 +277,12 @@ jobs:
293277
294278 - name : Install OS dependencies
295279 if : steps.cache-c-core.outputs.cache-hit != 'true' # Only needed when building the C core
296- run :
297- sudo apt install ninja-build cmake flex bison
280+ run : sudo apt install ninja-build cmake flex bison
298281
299282 - uses : actions/setup-python@v5
300283 name : Install Python
301284 with :
302- python-version : ' 3.9'
285+ python-version : " 3.9"
303286
304287 - name : Build sdist
305288 run : |
@@ -341,30 +324,21 @@ jobs:
341324
342325 - name : Install OS dependencies
343326 if : steps.cache-c-core.outputs.cache-hit != 'true' # Only needed when building the C core
344- run :
345- sudo apt install ninja-build cmake flex bison
327+ run : sudo apt install ninja-build cmake flex bison
346328
347329 - uses : actions/setup-python@v5
348330 name : Install Python
349331 with :
350- python-version : ' 3.12'
351-
352- - name : Install test dependencies
353- run : |
354- pip install --prefer-binary pytest pytest-timeout setuptools
355-
356- - name : Build C core
357- env :
358- IGRAPH_USE_SANITIZERS : 1
359- run : |
360- python setup.py build_c_core
332+ python-version : " 3.12"
361333
362334 - name : Build and install Python extension
363335 env :
364336 IGRAPH_USE_SANITIZERS : 1
365337 run : |
366- # NOTE: install calls "build" first
367- python setup.py install
338+ # We cannot install the test dependency group because many test dependencies cause
339+ # false positives in the sanitizer
340+ pip install --prefer-binary networkx pytest pytest-timeout
341+ pip install -e .
368342
369343 # Only pytest, and nothing else should be run in this section due to the presence of LD_PRELOAD.
370344 # The ASan/UBSan library versions need to be updated when switching to a newer Ubuntu/GCC.
0 commit comments