Skip to content

ci(wheel-build): tighten and speed up wheel build workflow#1376

Merged
guan404ming merged 3 commits into
apache:mainfrom
ryankert01:ci-wheel-build-improvements
Jun 6, 2026
Merged

ci(wheel-build): tighten and speed up wheel build workflow#1376
guan404ming merged 3 commits into
apache:mainfrom
ryankert01:ci-wheel-build-improvements

Conversation

@ryankert01

Copy link
Copy Markdown
Member

What

Improvements to the wheel-build.yml workflow:

  • paths filters on push/pull_request: wheel builds only run when qumat/**, qdp/**, pyproject.toml, uv.lock, or the workflow itself changes. Website/docs-only PRs no longer trigger the expensive CUDA build. (.asf.yaml defines no required status checks, so skipped runs don't block PRs.)
  • concurrency group: pushing new commits to a PR cancels the superseded run; main/workflow_dispatch runs are never cancelled.
  • Single build job instead of a 3-version matrix: one maturin invocation builds all three interpreters (-i python3.10 -i python3.11 -i python3.12, same as the release workflow), so the CUDA toolkit and gcc-toolset are installed once instead of three times.
  • Removed the silent QDP_NO_CUDA fallback: previously, if the NVIDIA repo install failed, CI built a no-CUDA smoke wheel and uploaded it under the same artifact name with a green check. Now the job fails instead — green always means real kernels were compiled. Inspection of all recent runs with retained logs showed the fallback path has never actually fired; the CUDA repo install succeeds consistently.
  • Artifact validation before upload:
    • twine check on all distributions in both jobs
    • import qumat smoke test for the pure-Python wheel
    • each qumat-qdp wheel is installed into a matching per-version venv and the test asserts the Rust extension actually loads (get_qdp() is not None), guarding against the graceful-degradation path in qumat_qdp/_backend.py masking a broken extension. This is safe on GPU-less runners because cudarc loads CUDA libraries lazily at runtime.
  • CUDA version defined once at the top of the build script instead of hard-coded in five places.

Notes

  • The qdp artifact is now a single qumat-qdp-wheels artifact containing all three wheels, instead of three qumat-qdp-cpX.Y artifacts.
  • release.yml is intentionally untouched.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the wheel-build.yml GitHub Actions workflow to reduce unnecessary/expensive wheel build runs and make the wheel artifacts more trustworthy by adding validation and removing a silent no-CUDA fallback.

Changes:

  • Adds paths filters and PR-only run cancellation via concurrency to reduce redundant CI runs.
  • Collapses the CUDA wheel build from a Python-version matrix into a single maturin build that targets 3.10/3.11/3.12 in one job.
  • Adds artifact validation (twine checks + install/import smoke tests) and removes the “build without CUDA” fallback so green builds imply real CUDA compilation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/wheel-build.yml
- Add paths filters so wheel builds only run when qumat/qdp or
  packaging files change (website/docs-only PRs skip the CUDA build)
- Add concurrency group to cancel superseded PR runs
- Collapse the 3-version matrix into a single maturin invocation so
  the CUDA toolkit and gcc-toolset are installed once instead of 3x
- Remove the silent QDP_NO_CUDA fallback: a green wheel build now
  always means real CUDA kernels were compiled (inspection of recent
  run logs showed the fallback path has never legitimately fired)
- Validate artifacts before upload: twine check for all dists, plus
  import smoke tests (qumat, and each qumat-qdp wheel in a matching
  per-version venv asserting the Rust extension loads)
- Define the CUDA version once at the top of the build script
…es in paths filter

- Derive CUDA_PKG_VER from CUDA_VER so a future CUDA bump cannot
  leave the two out of sync
- Add README.md and LICENSE to the paths filters: both are packaged
  into the qumat sdist/wheel, so changes to them should run the
  build and twine check
…comments

Install Python 3.10-3.12 with setup-python so the smoke-test venvs use
deterministic, cached interpreters instead of uv downloading toolchains
at runtime (addresses review feedback).
@ryankert01 ryankert01 force-pushed the ci-wheel-build-improvements branch from 8d4dccf to 1aac73a Compare June 5, 2026 16:55
@guan404ming guan404ming merged commit 9b5e312 into apache:main Jun 6, 2026
3 checks passed
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.

3 participants