-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPU-enabled CI tests for Bevy #1730
Comments
Sadly a GPU often costs money... Do we want to
If we want to reduce/control costs, I think 2. is a good start. 1. means the risk of being "under attack" as someone malevolent could push commits in a PR just to ramp up the bill. 3. is too late as the commit has been merged. From GitHub insight, there was 88 commits to main in the last month. If we take 20 minutes to run all examples (build time + run time), that means something like 30 hours per month (rounding up). If we look at the pricing of a company like CleverCloud, at 0.50$ per hour, that gives us 15$ per month. I'm talking about CleverCloud as it's a French company that I know (but have no parts in), they have a very good reputation, they love rust, and they also have an open source project sponsoring policy (bottom of https://www.clever-cloud.com/en/open-source). And their support is great. Would that be something interesting to pursue? |
We could also further restrict it to code that makes non-docs changes to I think pursuing open source sponsorship for this is an excellent idea: we're a compelling project with very modest needs. @cart do you think this is a good idea? Is it okay if community members pursue sponsorships of Bevy like this? |
I'm totally cool with people pursuing sponsorships on behalf of the project, provided they check with me first. In this case, I think it would be good to have some sort of useful gpu test set up prior to asking for their sponsorship, so we don't waste their time (or our "sponsors page space") on something we aren't sure we need yet. |
If you base your docker container off of utensils/opengl:stable you can get bevy 0.4 to work even in tests that have graphics. At least it looks like it, my pipeline is green where it used to panic on no device found. hacky Dockerfile for reference
Utility files in https://gitlab.com/torlachnil/bevy-project/-/tree/master/ci_utils (ignore the rest of the project please :] ), done to get around #1348 |
From my testing looks that SwiftShader(similar to lavapipe from mesa which allow to emulate Vulkan on CPU) works fine in CI with Bevy. Steps are really simple:
In Godot we use special project which runs ~40 seconds and it is used mostly to catch crashes, invalid memory accesses, memory leaks etc. |
From suggestion from Godot workflows: #1730 (comment) * Add a feature `bevy_debug` that will make Bevy read a debug config file to setup some debug systems * Currently, only one that will exit after x frames * Could add option to dump screen to image file once that's possible * Add a job in CI workflow that will run a few examples using [`swiftshader`](https://github.com/google/swiftshader) * This job takes around 13 minutes, so doesn't add to global CI duration |example|number of frames|duration| |-|-|-| |`alien_cake_addict`|300|1:50| |`breakout`|1800|0:44| |`contributors`|1800|0:43| |`load_gltf`|300|2:37| |`scene`|1800|0:44|
thanks @qarmin, this was easy to follow and setup, and now part of our CI too 🎉 |
I'm closing this for now following #1826. We can open up some new issues for more advanced needs that arise :) |
From suggestion from Godot workflows: bevyengine#1730 (comment) * Add a feature `bevy_debug` that will make Bevy read a debug config file to setup some debug systems * Currently, only one that will exit after x frames * Could add option to dump screen to image file once that's possible * Add a job in CI workflow that will run a few examples using [`swiftshader`](https://github.com/google/swiftshader) * This job takes around 13 minutes, so doesn't add to global CI duration |example|number of frames|duration| |-|-|-| |`alien_cake_addict`|300|1:50| |`breakout`|1800|0:44| |`contributors`|1800|0:43| |`load_gltf`|300|2:37| |`scene`|1800|0:44|
What problem does this solve or what need does it fill?
As we work on the renderer, we have no way to detect GPU-only failures in changes made to Bevy.
What solution would you like?
We also run our CI with a GPU.
What alternative(s) have you considered?
Authors manually run the GPU examples just before merging in GPU-related code.
CPU-simulated GPUs are apparently another choice.
Additional context
This wgpu CI looks like interesting prior art. See #1706 for a particularly nasty example of this failure mode.
The text was updated successfully, but these errors were encountered: