Improve the CI by checking each package and feature separately.#504
Merged
xStrom merged 11 commits intolinebender:mainfrom Mar 7, 2024
Merged
Improve the CI by checking each package and feature separately.#504xStrom merged 11 commits intolinebender:mainfrom
xStrom merged 11 commits intolinebender:mainfrom
Conversation
DJMcNab
approved these changes
Mar 7, 2024
Member
DJMcNab
left a comment
There was a problem hiding this comment.
Thanks - it's good to get these sorted
This was referenced Mar 7, 2024
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.
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&--binsfrom 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-hackhas a much better--workspaceimplementation that doesn't do feature unification and instead runs the commands on each workspace member separately.With the introduction of
cargo-hackwe now also have access to its feature matrix options. I went with--each-featureand--optional-depsto run checks with every feature separately. (In the future we can also consider adding a less frequent job with--feature-powerset --depth 10or 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.
wgpufeature, as right now that is just the reality.fullfeature ofvello_encoding.wgpu-profilerfeature ofwith_winitwhen targeting wasm32.jsfeature togetrandomdependency.