Skip to content

Improve the CI by checking each package and feature separately.#504

Merged
xStrom merged 11 commits intolinebender:mainfrom
xStrom:betterci
Mar 7, 2024
Merged

Improve the CI by checking each package and feature separately.#504
xStrom merged 11 commits intolinebender:mainfrom
xStrom:betterci

Conversation

@xStrom
Copy link
Copy Markdown
Member

@xStrom xStrom commented Mar 6, 2024

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.


  • Hid the CPU shaders behind the wgpu feature, as right now that is just the reality.
  • Fixed the full feature of vello_encoding.
  • Fixed the wgpu-profiler feature of with_winit when targeting wasm32.
  • Added missing js feature to getrandom dependency.

@xStrom xStrom marked this pull request as ready for review March 6, 2024 18:29
Copy link
Copy Markdown
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

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

Thanks - it's good to get these sorted

Comment thread examples/headless/Cargo.toml Outdated
Comment thread .github/workflows/ci.yml Outdated
@xStrom xStrom added this pull request to the merge queue Mar 7, 2024
Merged via the queue into linebender:main with commit 7ef0655 Mar 7, 2024
@xStrom xStrom deleted the betterci branch March 7, 2024 12:57
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.

2 participants