Skip to content

Commit a1f0057

Browse files
authored
Merge pull request #82 from greglucas/cibuildwheel-aarch64
REL: Add Arm wheels for linux and windows
2 parents fb654fc + f0b902b commit a1f0057

File tree

4 files changed

+17
-24
lines changed

4 files changed

+17
-24
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ jobs:
2626
matrix:
2727
os: [windows-latest, ubuntu-latest, macos-latest, macos-14]
2828
python-version: ['3.10', '3.11', '3.12', '3.13', '3.13t']
29+
include:
30+
- os: ubuntu-24.04-arm
31+
python-version: '3.13'
32+
- os: ubuntu-24.04-arm
33+
python-version: '3.10'
2934
defaults:
3035
run:
3136
shell: bash

.github/workflows/wheels.yml

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ on:
1313
- reopened
1414
- labeled
1515

16-
concurrency:
17-
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event_name }}-${{ github.event.ref }}
18-
cancel-in-progress: true
19-
2016
jobs:
2117
build_wheels:
2218
if: |
@@ -34,7 +30,7 @@ jobs:
3430
runs-on: ${{ matrix.os }}
3531
strategy:
3632
matrix:
37-
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
33+
os: [ubuntu-latest, windows-latest, macos-13, macos-14, ubuntu-24.04-arm]
3834
defaults:
3935
run:
4036
shell: bash
@@ -47,12 +43,6 @@ jobs:
4743
run: |
4844
python .github/workflows/download_mirror.py
4945
50-
- name: Set up QEMU
51-
if: runner.os == 'Linux'
52-
uses: docker/setup-qemu-action@v3
53-
with:
54-
platforms: all
55-
5646
# sets up the compiler paths automatically for us
5747
- uses: fortran-lang/setup-fortran@v1
5848
id: setup-fortran
@@ -68,19 +58,13 @@ jobs:
6858
gfortran --version
6959
7060
- name: Build wheels
71-
uses: pypa/cibuildwheel@v2.21.3
61+
uses: pypa/cibuildwheel@v3.0.0
7262
env:
7363
# The brew built gfortran linked libraries have minimum macOS versions
7464
# of the macOS version they were built on. We would need to compile
7565
# from source rather than use setup-fortran if we want to support
7666
# lower macOS versions.
7767
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.os == 'macos-13' && '13.0' || '14.0' }}"
78-
# TEMP don't use automated/isolated build environment, but manually
79-
# install build dependencies so we can build with meson from source
80-
CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation"
81-
CIBW_BEFORE_BUILD:
82-
python -m pip install git+https://github.com/mesonbuild/meson &&
83-
python -m pip install ninja meson-python setuptools_scm numpy
8468

8569
- uses: actions/upload-artifact@v4
8670
with:
@@ -89,15 +73,14 @@ jobs:
8973

9074
build_sdist:
9175
name: Build source distribution
92-
needs: build_wheels
9376
runs-on: ubuntu-latest
9477
steps:
9578
- uses: actions/checkout@v4
9679

97-
- uses: actions/setup-python@v4
80+
- uses: actions/setup-python@v5
9881
name: Install Python
9982
with:
100-
python-version: '3.12'
83+
python-version: '3.13'
10184

10285
- name: Download source files
10386
run: |
@@ -106,7 +89,7 @@ jobs:
10689
run: |
10790
python -m pip install meson-python meson ninja build
10891
python -m build --sdist
109-
- uses: actions/upload-artifact@v3
92+
- uses: actions/upload-artifact@v4
11093
with:
11194
name: cibw-sdist
11295
path: dist/*.tar.gz

meson.build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ ff = meson.get_compiler('fortran')
3131
if ff.has_argument('-Wno-conversion')
3232
add_project_arguments('-Wno-conversion', language: 'fortran')
3333
endif
34+
35+
# fast-math optimizations add a pretty significant speed-up.
36+
# Tests fail on linux aarch64, so don't add the flag there
3437
if ff.has_argument('-ffast-math')
3538
add_project_arguments('-ffast-math', language: 'fortran')
3639
endif

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ addopts = [
7373
]
7474

7575
[tool.cibuildwheel]
76+
environment.PIP_ONLY_BINARY = "numpy"
77+
environment.PIP_PREFER_BINARY = "1"
7678
# skip Python <3.10
7779
# skip 32 bit windows and linux builds for lack of numpy wheels
78-
skip = "cp36* cp37* cp38* cp39* *-win32 *_i686"
79-
free-threaded-support = true
80+
skip = ["cp38*", "cp39*", "*-win32", "*_i686"]
81+
enable = ["cpython-freethreading"]
8082
test-requires = "pytest"
8183
test-command = "pytest --pyargs pymsis"
8284

0 commit comments

Comments
 (0)