Ask for a wheel only on the leg that builds one - #115
Merged
Conversation
The GitHub workflow passed `--wheel-dir wheelhouse` to build.py on every
matrix leg. `[matrix].pybind_build_types` defaults to `["Release"]`, so a
Debug leg builds no pybind package -- and since 2.22.0 build.py treats
`--wheel-dir` as a request it must satisfy, exiting 1 when no complete set
of wheels comes out. That turned every Debug leg of every GitHub consumer
red the moment it picked up 2.22.0, which is what happened to xmsgrid on
2026-08-21 and to xmsmesher on 2026-08-22:
>> All configurations built successfully.
>> No pybind package found to extract.
error: --wheel-dir wheelhouse was given but no complete set of wheels
was extracted; see the message above.
Gate the flag on `matrix.build_type == 'Release'`, which is how repair,
artifact upload and deploy in the same workflow are already gated -- and
which `generate_ci` already relies on when it rejects a GitHub build.toml
whose `pybind_build_types` excludes Release. A library that also names
Debug loses nothing: its Debug wheel was built and discarded before.
The Windows `--skip-dependency-libs` companion moves inside the gate with
it. build.py reads that flag only within its `if args.wheel_dir` branch, so
leaving it outside would put a flag on the Debug command line that reads as
staging control and does nothing.
The guard itself is left alone. `--wheel-dir` meaning "I require wheels" is
the deliberate behavior; the defect was asking for them where none exist.
GitLab is unaffected -- its build job carries no `build_type` filter, so the
full matrix runs and the Release pybind configuration is always present.
Consumers need `xmsconan ci` re-run and the result committed to pick this
up; the workflow is generated, not floated.
wdolinar
added a commit
that referenced
this pull request
Aug 23, 2026
master carries the same fix from #115 (c0072ee), which was opened and merged while this PR sat approved. This branch is the implementation that was reviewed, so it supersedes that one: the flag lives in one named constant (RELEASE_ONLY_WHEEL_DIR) that the four build steps share, the --wheel-dir option row in USAGE section 9.1 is updated, the tests cover linux-arm and assert that every wheel-consuming step stays Release-gated, and the generate_ci comment at the pybind_build_types guard is amended to match. Merged with -s ours so the tree is exactly what merging this PR before #115 would have produced. Nothing from c0072ee is kept -- everything it changed, this branch changes too.
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 broke
xmsconan 2.22.0 made
build.pyexit 1 when--wheel-diryields no completeset of wheels (
c614bc5, "Stop publishing a wheel chosen by package-id hash").The GitHub CI template, however, still passes
--wheel-dir wheelhouseonevery matrix leg — and
[matrix].pybind_build_typesdefaults to["Release"], so a Debug leg has no pybind package to extract.Every GitHub consumer's Debug legs therefore turn red the moment they float up
to 2.22.x:
Already observed on
masterin the wild:xmsinterp and xmsextractor float too and last ran 2026-08-18, before 2.22.0 —
they break on their next run. xmscore never passes
--wheel-dirtobuild.py;xmsvtk is pinned
==2.16.0; xmsconstraint's GitLab job carries nobuild_typefilter, so its Release pybind configuration is always present. All three are
unaffected.
The fix
Gate the flag on
matrix.build_type == 'Release'— how repair, artifact uploadand deploy in the same workflow are already gated, and what
generate_cialready assumes when it rejects a GitHub
build.tomlwhosepybind_build_typesexcludes Release (
ci_file_generator.py:210-225).The guard in
build.pyis deliberately left alone.--wheel-dirmeaning "Irequire wheels" is the intended contract; the defect was asking for them on a
leg that cannot produce any. A library that names
Debuginpybind_build_typesloses nothing — its Debug wheel was built and discardedbefore, since every downstream step was Release-gated already.
The Windows
--skip-dependency-libscompanion moves inside the gate with it:build.pyreads it only within theif args.wheel_dirbranch, so leaving itoutside would put a flag on the Debug command line that reads as staging
control and does nothing.
GitLab is unaffected and unchanged.
Verification
flake8 .→ exit 0 (withflake8-docstrings,-bugbear,-import-order,pep8-naming,-tidy-imports, matching CI)pytest tests/ -q→ 1978 passed, 5 skipped--wheel-dirfailstest_github_build_step_requests_a_wheel_only_on_release[mac], and moving--skip-dependency-libsoutside the gate fails its own test. The first isasserted per job so a regression names the platform.
all four build steps carry the gate.
Docs
docs/USAGE.md§10 step 3 and a new §10.1 bullet; rationale added to thetemplate's header comment.
Ordering — please read before releasing
xmsmesher/master/build.tomlstill carrieshas_test_files, which theKNOWN_KEYSwhitelist merged in #112 now rejects. Verified against thisbranch:
Aquaveo/xmsmesher#88 must merge before the release that carries this, or
xmsmesher's CI dies one step earlier, at Generate.
Consumers also need
xmsconan cire-run and the result committed — theworkflow is generated, not floated.