ci(wheel-build): tighten and speed up wheel build workflow#1376
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
pathsfilters and PR-only run cancellation viaconcurrencyto 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.
- 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).
8d4dccf to
1aac73a
Compare
guan404ming
approved these changes
Jun 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Improvements to the
wheel-build.ymlworkflow:pathsfilters onpush/pull_request: wheel builds only run whenqumat/**,qdp/**,pyproject.toml,uv.lock, or the workflow itself changes. Website/docs-only PRs no longer trigger the expensive CUDA build. (.asf.yamldefines no required status checks, so skipped runs don't block PRs.)concurrencygroup: pushing new commits to a PR cancels the superseded run;main/workflow_dispatchruns are never cancelled.-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.QDP_NO_CUDAfallback: 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.twine checkon all distributions in both jobsimport qumatsmoke test for the pure-Python wheelqumat-qdpwheel 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 inqumat_qdp/_backend.pymasking a broken extension. This is safe on GPU-less runners because cudarc loads CUDA libraries lazily at runtime.Notes
qumat-qdp-wheelsartifact containing all three wheels, instead of threequmat-qdp-cpX.Yartifacts.release.ymlis intentionally untouched.