Improve the CI by checking each package and feature separately. #504
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.
As was discussed in Zulip we've had hidden breakages lately. One major source of these issues has been Cargo's workspace dependency feature unification. So if some package in a workspace enables a feature, all other packages may incorrectly depend on that feature without specifying the requirement.
Our CI already split
--lib
&--bins
from other targets for that reason, however the Vello repo has its examples as separate packages, and also just has more packages in general. Thus a more robust CI is needed.Because we have a lot of different repos in Linebender, I strive to make changes in a widely applicable way. That means avoiding specifying package names if I can help it. Luckily
cargo-hack
has a much better--workspace
implementation that doesn't do feature unification and instead runs the commands on each workspace member separately.With the introduction of
cargo-hack
we now also have access to its feature matrix options. I went with--each-feature
and--optional-deps
to run checks with every feature separately. (In the future we can also consider adding a less frequent job with--feature-powerset --depth 10
or something like that to really test the combinations.)I also converted the wasm32 job to be more like the main job and that already caught a bunch of issues.
wgpu
feature, as right now that is just the reality.full
feature ofvello_encoding
.wgpu-profiler
feature ofwith_winit
when targeting wasm32.js
feature togetrandom
dependency.