Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest, macos-14]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.13t']
include:
- os: ubuntu-24.04-arm
python-version: '3.13'
- os: ubuntu-24.04-arm
python-version: '3.10'
defaults:
run:
shell: bash
Expand Down
27 changes: 5 additions & 22 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ on:
- reopened
- labeled

concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event_name }}-${{ github.event.ref }}
cancel-in-progress: true

jobs:
build_wheels:
if: |
Expand All @@ -34,7 +30,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
os: [ubuntu-latest, windows-latest, macos-13, macos-14, ubuntu-24.04-arm]
defaults:
run:
shell: bash
Expand All @@ -47,12 +43,6 @@ jobs:
run: |
python .github/workflows/download_mirror.py

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all

# sets up the compiler paths automatically for us
- uses: fortran-lang/setup-fortran@v1
id: setup-fortran
Expand All @@ -68,19 +58,13 @@ jobs:
gfortran --version

- name: Build wheels
uses: pypa/cibuildwheel@v2.21.3
uses: pypa/cibuildwheel@v3.0.0
env:
# The brew built gfortran linked libraries have minimum macOS versions
# of the macOS version they were built on. We would need to compile
# from source rather than use setup-fortran if we want to support
# lower macOS versions.
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.os == 'macos-13' && '13.0' || '14.0' }}"
# TEMP don't use automated/isolated build environment, but manually
# install build dependencies so we can build with meson from source
CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation"
CIBW_BEFORE_BUILD:
python -m pip install git+https://github.com/mesonbuild/meson &&
python -m pip install ninja meson-python setuptools_scm numpy

- uses: actions/upload-artifact@v4
with:
Expand All @@ -89,15 +73,14 @@ jobs:

build_sdist:
name: Build source distribution
needs: build_wheels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.12'
python-version: '3.13'

- name: Download source files
run: |
Expand All @@ -106,7 +89,7 @@ jobs:
run: |
python -m pip install meson-python meson ninja build
python -m build --sdist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
Expand Down
3 changes: 3 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ ff = meson.get_compiler('fortran')
if ff.has_argument('-Wno-conversion')
add_project_arguments('-Wno-conversion', language: 'fortran')
endif

# fast-math optimizations add a pretty significant speed-up.
# Tests fail on linux aarch64, so don't add the flag there
if ff.has_argument('-ffast-math')
add_project_arguments('-ffast-math', language: 'fortran')
endif
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,12 @@ addopts = [
]

[tool.cibuildwheel]
environment.PIP_ONLY_BINARY = "numpy"
environment.PIP_PREFER_BINARY = "1"
# skip Python <3.10
# skip 32 bit windows and linux builds for lack of numpy wheels
skip = "cp36* cp37* cp38* cp39* *-win32 *_i686"
free-threaded-support = true
skip = ["cp38*", "cp39*", "*-win32", "*_i686"]
enable = ["cpython-freethreading"]
test-requires = "pytest"
test-command = "pytest --pyargs pymsis"

Expand Down
Loading