Skip to content

CI: Add arm64 runners for macos-latest, macos-13 runners for x64 #1320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 29, 2024
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
25 changes: 23 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
os: ['ubuntu-latest', 'windows-latest', 'macos-13', 'macos-latest']
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
architecture: ['x64', 'x86']
architecture: ['x64', 'x86', 'arm64']
dependencies: ['full', 'pre']
include:
# Basic dependencies only
Expand All @@ -130,12 +130,33 @@ jobs:
python-version: '3.12'
dependencies: 'dev'
exclude:
# x86 for Windows + Python<3.12
- os: ubuntu-latest
architecture: x86
- os: macos-13
architecture: x86
- os: macos-latest
architecture: x86
- python-version: '3.12'
architecture: x86
# arm64 is available for macos-14+
- os: ubuntu-latest
architecture: arm64
- os: windows-latest
architecture: arm64
- os: macos-13
architecture: arm64
# x64 is not available for macos-14+
- os: macos-latest
architecture: x64
# Drop pre tests for macos-13
- os: macos-13
dependencies: pre
# Drop pre tests for SPEC-0-unsupported Python versions
- python-version: '3.8'
dependencies: pre
- python-version: '3.9'
dependencies: pre

env:
DEPENDS: ${{ matrix.dependencies }}
Expand Down
11 changes: 6 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ DEPENDS =
ARCH =
x64: x64
x86: x86
arm64: arm64

[testenv]
description = Pytest with coverage
labels = test
install_command =
python -I -m pip install -v \
x64: --only-binary numpy,scipy,h5py,pillow \
x86: --only-binary numpy,scipy,h5py,pillow,matplotlib \
--only-binary numpy,scipy,h5py,pillow,matplotlib \
pre,dev: --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
{opts} {packages}
pip_pre =
Expand Down Expand Up @@ -91,11 +91,11 @@ deps =
pre: numpy <2.0.dev0
dev: numpy >=2.0.dev0
# Scipy stopped producing win32 wheels at py310
py3{8,9}-full-x86,x64: scipy >=1.6
py3{8,9}-full-x86,x64,arm64: scipy >=1.6
# Matplotlib depends on scipy, so cannot be built for py310 on x86
py3{8,9}-full-x86,x64: matplotlib >=3.4
py3{8,9}-full-x86,x64,arm64: matplotlib >=3.4
# h5py stopped producing win32 wheels at py39
py38-full-x86,x64: h5py >=2.10
py38-full-x86,x64,arm64: h5py >=2.10
full,pre,dev: pillow >=8.1
full,pre,dev: indexed_gzip >=1.4
full,pre,dev: pyzstd >=0.14.3
Expand All @@ -106,6 +106,7 @@ commands =
pytest --doctest-modules --doctest-plus \
--cov nibabel --cov-report xml:cov.xml \
--junitxml test-results.xml \
--durations=20 --durations-min=1.0 \
--pyargs nibabel {posargs:-n auto}

[testenv:install]
Expand Down