Skip to content

[ci] Harden the wheels workflow and cibuildwheel configuration - #59

Merged
aaronj0 merged 1 commit into
mainfrom
wheels-hardening
Sep 1, 2026
Merged

[ci] Harden the wheels workflow and cibuildwheel configuration#59
aaronj0 merged 1 commit into
mainfrom
wheels-hardening

Conversation

@aaronj0

@aaronj0 aaronj0 commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Various suite of mechanical and workflow improvements based on some research on the standards followed by scipy/numpy/pybind11:

Workflow hardening:

  • persist-credentials: false on every checkout
  • if-no-files-found: error on every artifact upload
  • zizmor.yml records the action-pin policy

Artifact integrity:

  • Every wheel is twine-checked via cibuildwheel's audit hook and validated against a zip-member allowlist on all platforms, so nothing unexpected ships.
  • The build must leave the checkout unmutated (git diff --exit-code, plus the pybind-template check).
  • The sdist is twine-checked.

sdist is now tested:

  • New test-sdist job stages the recipe LLVM, pip-installs the tarball, and runs the smoke and full suites. This matches what numpy and scipy do.

cibuildwheel config fixes:

  • PYTHONSAFEPATH=1 in the test env, so imports resolve from the installed wheel rather than the source tree.
  • Host-mount disabled in the build container.
  • macOS requirements install moved to before-test.
  • sdist excludes added.
  • cp314t/cp315 exclusions documented as policy (verified against v4.2.0 defaults).
  • archs = ["auto64"] with the macos-x86_64 cell: native runners only, no cross-compilation.

@guitargeek guitargeek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

Consider adding Python 3.15 wheels as well (in a follow-up PR) since the release candidate was published last month: https://blog.python.org/2026/08/python-3150-rc1/

Comment thread pyproject.toml Outdated
[tool.cibuildwheel]
# The build list is policy, not a glob accident: cp314t waits on a
# free-threading audit (Py_mod_gil, import must not re-enable the GIL);
# cp315 joins at the 3.15 release, not at the rc cibuildwheel builds.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the Python developers recommend the package maintainers to build wheels as soon as the Python release candidate is out? Python 3.15 RC 1 is out already I think.

@aaronj0 aaronj0 Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed a good idea! I'll follow up with a 3.15 rc wheel matrix. That will need extending the ci-workflows wheels job as we maintain the build-images on that repo. Do you want to drop the policy comments?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments have been cleaned up

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Test Results

Configuration Result
macos-26-intel-llvm21-py3.14-cxx20 ===== 473 passed, 44 skipped, 84 xfailed, 100 warnings in 72.76s (0:01:12) =====
macos-26-llvm21-py3.14-cxx20 ========== 477 passed, 30 skipped, 94 xfailed, 100 warnings in 40.20s ==========
ubuntu-24.04-llvm21-py3.14-cxx20-vg ============ 558 passed, 25 skipped, 18 xfailed in 65.25s (0:01:05) ============
ubuntu-24.04-llvm22-py3.14-cxx20 ============ 557 passed, 25 skipped, 19 xfailed in 77.56s (0:01:17) ============
ubuntu-24.04-llvm22-py3.14-cxx20-cling ============ 549 passed, 25 skipped, 27 xfailed in 78.52s (0:01:18) ============
ubuntu-24.04-llvm22-py3.14-cxx23 ============ 578 passed, 3 skipped, 20 xfailed in 79.33s (0:01:19) =============

@aaronj0
aaronj0 merged commit d1f5c8e into main Sep 1, 2026
14 checks passed
@aaronj0
aaronj0 deleted the wheels-hardening branch September 1, 2026 13:35
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