From 01c6fa2ef488ebd1c3cb38c89ac29d0446247ccf Mon Sep 17 00:00:00 2001 From: dancergraham Date: Tue, 1 Dec 2026 20:55:09 +0100 Subject: [PATCH 1/6] ci: add job timeouts The default 6h timeout let stuck jobs burn runner minutes. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/CI.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3e7a20c..de65b97 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -20,6 +20,7 @@ concurrency: jobs: lint: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -37,6 +38,7 @@ jobs: zizmor: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -48,6 +50,7 @@ jobs: linux: runs-on: ${{ matrix.platform.runner }} + timeout-minutes: 30 strategy: matrix: platform: @@ -102,6 +105,7 @@ jobs: musllinux: runs-on: ${{ matrix.platform.runner }} + timeout-minutes: 30 strategy: matrix: platform: @@ -153,6 +157,7 @@ jobs: windows: runs-on: ${{ matrix.platform.runner }} + timeout-minutes: 30 strategy: matrix: platform: @@ -197,6 +202,7 @@ jobs: macos: runs-on: ${{ matrix.platform.runner }} + timeout-minutes: 30 strategy: matrix: platform: @@ -240,6 +246,7 @@ jobs: # the extension from source for every interpreter. needs: linux runs-on: ubuntu-latest + timeout-minutes: 15 strategy: fail-fast: false matrix: @@ -272,6 +279,7 @@ jobs: stubtest: needs: linux runs-on: ubuntu-latest + timeout-minutes: 15 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -294,6 +302,7 @@ jobs: ruff: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -308,6 +317,7 @@ jobs: sdist: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -326,6 +336,7 @@ jobs: attest: name: Attest runs-on: ubuntu-latest + timeout-minutes: 15 if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} needs: [lint, zizmor, ruff, linux, musllinux, windows, macos, sdist, pytest, stubtest] permissions: @@ -345,6 +356,7 @@ jobs: publish: name: Publish to PyPI runs-on: ubuntu-latest + timeout-minutes: 15 if: ${{ startsWith(github.ref, 'refs/tags/') }} needs: attest # PyPI's trusted publisher only accepts tokens from this environment, and From 68c12cf0209b56e6531e3805b72e70f7e75ec550 Mon Sep 17 00:00:00 2001 From: dancergraham Date: Tue, 1 Dec 2026 20:55:10 +0100 Subject: [PATCH 2/6] ci: drop 32-bit Linux wheels numpy ships no i686 wheels for manylinux or musllinux, so these wheels were only installable by users building numpy from source. The i686 manylinux2014 container also failed DNS on ubuntu-26.04 runners and needed explicit interpreter lists to dodge 3.14t on 32-bit. Windows x86 stays: numpy still publishes win32 wheels. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/CI.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index de65b97..81b664e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -56,13 +56,6 @@ jobs: platform: - runner: ubuntu-latest target: x86_64 - # DNS fails inside the i686 manylinux container on the ubuntu 26.04 - # runner image (maturin-action's libatomic install can't reach yum). - - runner: ubuntu-24.04 - target: x86 - # rust-numpy rejects free-threaded 3.14t on 32-bit targets, so - # list interpreters explicitly instead of --find-interpreter. - interpreters: -i python3.11 python3.12 python3.13 python3.14 python3.15 python3.15t pypy3.11 - runner: ubuntu-latest target: aarch64 steps: @@ -76,7 +69,7 @@ jobs: uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 with: target: ${{ matrix.platform.target }} - args: --release --out dist ${{ matrix.platform.interpreters || '--find-interpreter' }} + args: --release --out dist --find-interpreter sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} manylinux: auto - name: Upload wheels @@ -111,11 +104,6 @@ jobs: platform: - runner: ubuntu-latest target: x86_64 - - runner: ubuntu-latest - target: x86 - # rust-numpy rejects free-threaded 3.14t on 32-bit targets, so - # list interpreters explicitly instead of --find-interpreter. - interpreters: -i python3.11 python3.12 python3.13 python3.14 python3.15 python3.15t pypy3.11 pypy3.12 - runner: ubuntu-latest target: aarch64 steps: @@ -129,7 +117,7 @@ jobs: uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 with: target: ${{ matrix.platform.target }} - args: --release --out dist ${{ matrix.platform.interpreters || '--find-interpreter' }} + args: --release --out dist --find-interpreter sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} manylinux: musllinux_1_2 - name: Upload wheels From f27aa98c5e30f1c842d94a9b4b7c3e6530b742c3 Mon Sep 17 00:00:00 2001 From: dancergraham Date: Tue, 1 Dec 2026 20:55:28 +0100 Subject: [PATCH 3/6] ci: build and test aarch64 Linux wheels on native arm64 runners Replaces cross-compilation plus QEMU (run-on-arch-action) with ubuntu-24.04-arm runners, which are free for public repos. Tests now run directly on the runner (glibc) or in a native python:alpine container (musl), which also adds test coverage for musllinux x86_64. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/CI.yml | 56 +++++++++++++++------------------------- 1 file changed, 21 insertions(+), 35 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 81b664e..b1f4011 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -56,7 +56,10 @@ jobs: platform: - runner: ubuntu-latest target: x86_64 - - runner: ubuntu-latest + # Native arm64 runner: no cross-compile, and pytest runs without QEMU. + # Stay on 24.04: the manylinux2014 (CentOS 7) container can't + # resolve its yum mirrors on the 26.04 images. + - runner: ubuntu-24.04-arm target: aarch64 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -77,24 +80,16 @@ jobs: with: name: wheels-linux-${{ matrix.platform.target }} path: dist + # x86_64 wheels are tested across interpreters by the pytest job. - name: pytest - if: ${{ !startsWith(matrix.platform.target, 'x86') }} - uses: uraimo/run-on-arch-action@1e2c619f81e6d8609845ea1d2f443a778df1ac68 # v3 - with: - arch: ${{ matrix.platform.target }} - distro: ubuntu24.04 - githubToken: ${{ github.token }} - install: | - apt-get update - apt-get install -y --no-install-recommends python3 python3-venv - run: | - set -e - python3 -m venv .venv - . .venv/bin/activate - pip install -U pip pytest - pip install "numpy>=2,<3" - pip install e57 --no-index --find-links dist --force-reinstall --no-deps - pytest + if: ${{ matrix.platform.target == 'aarch64' }} + run: | + set -e + python3 -m venv .venv + source .venv/bin/activate + pip install "numpy>=2,<3" pytest + pip install e57 --no-index --find-links dist --force-reinstall --no-deps + pytest musllinux: runs-on: ${{ matrix.platform.runner }} @@ -104,7 +99,7 @@ jobs: platform: - runner: ubuntu-latest target: x86_64 - - runner: ubuntu-latest + - runner: ubuntu-24.04-arm target: aarch64 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -125,23 +120,14 @@ jobs: with: name: wheels-musllinux-${{ matrix.platform.target }} path: dist + # The runner arch matches the target, so Alpine runs natively. - name: pytest - if: ${{ !startsWith(matrix.platform.target, 'x86') }} - uses: uraimo/run-on-arch-action@1e2c619f81e6d8609845ea1d2f443a778df1ac68 # v3 - with: - arch: ${{ matrix.platform.target }} - distro: alpine_latest - githubToken: ${{ github.token }} - install: | - apk add py3-virtualenv - run: | - set -e - python3 -m virtualenv .venv - source .venv/bin/activate - pip install pytest - pip install "numpy>=2,<3" - pip install e57 --no-index --find-links dist --force-reinstall --no-deps - pytest + run: | + docker run --rm -e PYTHONDONTWRITEBYTECODE=1 -v "$PWD":/io -w /io python:3.14-alpine sh -euc ' + pip install --root-user-action=ignore "numpy>=2,<3" pytest + pip install --root-user-action=ignore e57 --no-index --find-links dist --force-reinstall --no-deps + pytest -p no:cacheprovider + ' windows: runs-on: ${{ matrix.platform.runner }} From 7a96881bfc874c4fea470fde4851bb3c601c1cbd Mon Sep 17 00:00:00 2001 From: dancergraham Date: Tue, 1 Dec 2026 20:55:28 +0100 Subject: [PATCH 4/6] ci: run macOS only outside PRs, on macos-26 macOS arm64 hosted runners are capacity-constrained: jobs regularly went unassigned for 15 minutes and were cancelled ("The job was not acquired by Runner of type hosted even after multiple attempts"), blocking PRs. Build on main, tags and workflow_dispatch only; attest still requires the job. Move from macos-15 to macos-26 (macos-latest). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/CI.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b1f4011..b3dc521 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -175,12 +175,15 @@ jobs: pytest macos: + # macOS arm64 runners are capacity-constrained and jobs often go unassigned, + # so only build on main, tags and manual runs; attest/publish still gate on it. + if: ${{ github.event_name != 'pull_request' }} runs-on: ${{ matrix.platform.runner }} timeout-minutes: 30 strategy: matrix: platform: - - runner: macos-15 + - runner: macos-26 target: aarch64 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 From 7dde0c41857c77322bf8b1f089f3f0d30bf4a191 Mon Sep 17 00:00:00 2001 From: dancergraham Date: Tue, 1 Dec 2026 20:55:32 +0100 Subject: [PATCH 5/6] ci: retry wheel builds once and pin maturin maturin-action installs maturin inside the build container with an unretried curl | tar from GitHub releases; a transient error page made tar fail with "not in gzip format" on linux x86_64 and musllinux aarch64. Retry the build step once, and pin maturin-version so releases don't change builds unannounced (dependabot won't bump it; update manually). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/CI.yml | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b3dc521..9f59587 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -68,13 +68,22 @@ jobs: - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: 3.14 + # The maturin container downloads maturin from GitHub releases with an + # unretried curl | tar, which fails intermittently; retry the build once. - name: Build wheels + id: build + continue-on-error: true uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: + with: &linux-build target: ${{ matrix.platform.target }} + maturin-version: v1.16.0 args: --release --out dist --find-interpreter sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} manylinux: auto + - name: Build wheels (retry) + if: ${{ steps.build.outcome == 'failure' }} + uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 + with: *linux-build - name: Upload wheels uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: @@ -109,12 +118,19 @@ jobs: with: python-version: 3.14 - name: Build wheels + id: build + continue-on-error: true uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: + with: &musl-build target: ${{ matrix.platform.target }} + maturin-version: v1.16.0 args: --release --out dist --find-interpreter sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} manylinux: musllinux_1_2 + - name: Build wheels (retry) + if: ${{ steps.build.outcome == 'failure' }} + uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 + with: *musl-build - name: Upload wheels uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: @@ -153,11 +169,18 @@ jobs: 3.15 architecture: ${{ matrix.platform.target }} - name: Build wheels + id: build + continue-on-error: true uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: + with: &windows-build target: ${{ matrix.platform.target }} + maturin-version: v1.16.0 args: --release --out dist --find-interpreter sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} + - name: Build wheels (retry) + if: ${{ steps.build.outcome == 'failure' }} + uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 + with: *windows-build - name: Upload wheels uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: @@ -198,11 +221,18 @@ jobs: 3.14 3.15 - name: Build wheels + id: build + continue-on-error: true uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 - with: + with: &macos-build target: ${{ matrix.platform.target }} + maturin-version: v1.16.0 args: --release --out dist --find-interpreter sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} + - name: Build wheels (retry) + if: ${{ steps.build.outcome == 'failure' }} + uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 + with: *macos-build - name: Upload wheels uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: From 63236f6225c7f122f8e0f97cd2a3754c2cf1b7ad Mon Sep 17 00:00:00 2001 From: dancergraham Date: Tue, 1 Dec 2026 21:21:21 +0100 Subject: [PATCH 6/6] ci: keep macOS on PRs but don't fail the run on it The macos-26 runner hit the same capacity cancellations as macos-15, so skipping macOS on PRs lost coverage without fixing anything. Run it on PRs with continue-on-error instead; main and tags still require it. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/CI.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9f59587..891ad6c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -198,9 +198,10 @@ jobs: pytest macos: - # macOS arm64 runners are capacity-constrained and jobs often go unassigned, - # so only build on main, tags and manual runs; attest/publish still gate on it. - if: ${{ github.event_name != 'pull_request' }} + # macOS arm64 runners are capacity-constrained and jobs often go unassigned + # for 15 minutes and get cancelled. Don't let that fail PR runs; on main and + # tags it still fails the run, and attest/publish still gate on it. + continue-on-error: ${{ github.event_name == 'pull_request' }} runs-on: ${{ matrix.platform.runner }} timeout-minutes: 30 strategy: