From 568e37fb1e55a78d17978c12a269aa6e309e0e35 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Sun, 28 Apr 2024 21:17:16 -0400 Subject: [PATCH 1/4] TOX: Update dependencies for arm64 --- tox.ini | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tox.ini b/tox.ini index d0b865345..2826623ea 100644 --- a/tox.ini +++ b/tox.ini @@ -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 = @@ -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 From 8f2c039f2e3d9ccdb3af1a526e3ff1985819dabe Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Sun, 28 Apr 2024 21:27:04 -0400 Subject: [PATCH 2/4] CI: Add/distinguish macos-13-x64 and macos-14-arm64 runs --- .github/workflows/test.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a6eb39734..3b79c8710 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -130,12 +130,28 @@ 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 env: DEPENDS: ${{ matrix.dependencies }} From 08dd20d4d66984f9704cee9c49c7275f16e5e86a Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Sun, 28 Apr 2024 21:46:02 -0400 Subject: [PATCH 3/4] TOX: Print durations to see slow tests --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 2826623ea..b9ac9557c 100644 --- a/tox.ini +++ b/tox.ini @@ -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] From feda198d53028db570e32509761088eedf98231d Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Sun, 28 Apr 2024 21:53:08 -0400 Subject: [PATCH 4/4] CI: Run pre-release tests only on SPEC-0 supported Python --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b79c8710..2b3d9f249 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -152,6 +152,11 @@ jobs: # 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 }}