Skip to content

Conversation

@TTsangSC
Copy link
Collaborator

@TTsangSC TTsangSC commented Oct 14, 2025

(See also: #390, #391, #394)

Somewhere between 4.1.3 and 5.0.0 we stopped building linux_aarch64 wheels, perhaps because we bumped the cibuildwheel version in #369 which changed its behavior.

This PR updates pyproject.toml and .github/workflows/tests.yml so that:

  • wheels for ARM64 on Linux are again built and tested in CI
  • Python 3.14.0rc1 -> 3.14(.0)

- `.github/workflows/tests.yml`:
  - `build_binpy_wheels`:
    - Activate QEMU on Linux so that `aarch64` wheels can be built
    - Removed `${CIBW_ARCHS_LINUX}` to use `pyproject.toml` values
  - `test_binpy_wheels`:
    Added corresponding `ubuntu-24.04-arm` steps for all `ubuntu-latest`
    (i.e. x86) steps
- `pyproject.toml`:
  Added `[tool.cibuildwheel.linux]` section in parallel to `macos` and
  `windows`
@TTsangSC
Copy link
Collaborator Author

TTsangSC commented Oct 14, 2025

Building ARM wheels on x86 Linux runners is painfully slow (≈ 20 s build time per Python version -> ≈ 3 m). It may be worth considering running build_binpy_wheels on ubuntu-24.04-arm to cut on the emulation overhead.

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.25%. Comparing base (60e928f) to head (a2170de).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #402      +/-   ##
==========================================
+ Coverage   87.56%   90.25%   +2.68%     
==========================================
  Files          18       20       +2     
  Lines        1641     2073     +432     
  Branches      348      447      +99     
==========================================
+ Hits         1437     1871     +434     
- Misses        149      151       +2     
+ Partials       55       51       -4     

see 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b60b934...a2170de. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TTsangSC TTsangSC changed the title DRAFT: FIX: building Linux-ARM64 wheels FIX: building Linux-ARM64 wheels Oct 14, 2025
@Erotemic
Copy link
Member

It would be really nice to build with the restricted API so we have ABI3 compliant wheels. Then we would only have to build once instead of for each python version. It would also make it easier on users who want to use it on a new python version but in the case where we haven't built the wheels yet. Lastly it would reduce overhead for pypi so they don't have to store so many artifacts. But I'm also not sure how big of a performance hit we would take by doing that.

I need to update my CI template generators for the last script, so I'll try to get to that and include the ubuntu-24.04-arm runner as well.

@TTsangSC
Copy link
Collaborator Author

There may be blockers for an ABI3-compliant implementation:

  • Some attributes of PyCodeObject and PyFrameObject are currently accessed via pointer deref. These may be relatively easily rehabilitated with PyObject cast -> PyObject_GetAttrString() with some performance hit.

  • What is harder to circumvent though is our use of PyInterpreterState.last_restart_version, which:

    • is needed for detecting whether the sys.monitoring hooks have been changed when the profiler is active, and
    • unfortunately, is not exposed as a public API so far.

    We can maybe dismiss the changing of hooks as an edge case and drop the check (and the subsequent updating of the stored hooks to be restored once the profiler exits),but that would be a feature regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants