GitHub Actions (CI) #134

Closed
opened 2024-06-04 21:31:22 +00:00 by SakulFlee · 1 comment
SakulFlee commented 2024-06-04 21:31:22 +00:00 (Migrated from github.com)

Current CI status

The current CI is partially broken.
Artifact uploads seem to be invalid and/or not working.
A proper rework is required.

Additionally:

Multi-Platform builds

Multi-Platform builds are kinda useless at the moment as we aren't doing anything with said artifacts. The code should compile everywhere, regardless of the OS. If it works there or not isn't tested.

Furthermore, we aren't distributing the examples at the moment.
They are best compiled locally and require no special setup except for Rust.

Android, iOS (once supported) and Website (once supported) feel like they should be an exception to this rule as building apps for these platforms is generally more complicated and requires more setup, but we aren't using any platform specific code for these at the moment.
Meaning, that for Android for example we are just building the rust library and in the Android project the only thing we actually do is tell it the library name and to include it.
Once again, the libraries we produce should work everywhere universally. Independent from the target platform.

At some later point we may need to change this, but currently we are just trying to optimize the CI and this seems like a hig waste.

Full builds

We are currently building the whole application (library and examples) for windows, Linux and macos.
(Potentially Android at some point.)
Like stated above, this seems like a waste.

However, we could also switch to simply checking with cargo check.
There shouldn't be a need right now to fully compile everything, when we can just quickly check it.

Furthermore, Clippy (cargo clippy) might be useful as it does the checking first and then add some more lints onto the stack.
It should be noted that clippy isn't preventing our code from compiling. It's just keeping it cleaner and more bug free. Potentially even faster.

With clippy, we would have three CI results:

  • Success & no warnings: all is very fine!
  • Success & warnings: clippy lints. Might need fixing but is fine!
  • Failure (with or without warnings): code doesn't compile. Big problem!

Proper testing

I've also been thinking about adding tests to the CI, and by some extent we have that already, but it's a challenge to get GPU access in a CI. At least without hosting an actions runner. Furthermore, we'd need an automated system that can score out screenshots, potentially benchmarks or videos, for us.

I don't know if this will ever be important but for now I don't think it is.
There are examples they are serving as test already basically.
Just manually. We should maybe add a way of executing all of them at the same time or something.

There are some existing tests and potentially will be more so testing should be added to the CI!
Just now that it will test individual components, rather than if a whole example works.


Ultimately, the goal is to really speed up the CI.

# Current CI status The current CI is partially broken. Artifact uploads seem to be invalid and/or not working. A proper rework is required. Additionally: ## Multi-Platform builds Multi-Platform builds are kinda useless at the moment as we aren't doing anything with said artifacts. The code should compile everywhere, regardless of the OS. If it works there or not isn't tested. Furthermore, we aren't distributing the examples at the moment. They are best compiled locally and require no special setup except for Rust. Android, iOS (once supported) and Website (once supported) feel like they should be an exception to this rule as building apps for these platforms is generally more complicated and requires more setup, but we aren't using any platform specific code for these at the moment. Meaning, that for Android for example we are **just** building the rust library and in the Android project the only thing we actually do is tell it the library name and to include it. Once again, the libraries we produce should work everywhere universally. Independent from the target platform. > At some later point we may need to change this, but currently we are just trying to optimize the CI and this seems like a hig waste. ## Full builds We are currently building the whole application (library and examples) for windows, Linux and macos. (Potentially Android at some point.) Like stated above, this seems like a waste. However, we could also switch to simply checking with `cargo check`. There shouldn't be a need right now to fully compile everything, when we can just quickly check it. Furthermore, [Clippy (`cargo clippy`)](https://github.com/rust-lang/rust-clippy) might be useful as it does the checking first and then add some more lints onto the stack. **It should be noted that clippy isn't preventing our code from compiling. It's just keeping it cleaner and more bug free. Potentially even faster.** With clippy, we would have three CI results: - Success & no warnings: all is very fine! - Success & warnings: clippy lints. Might need fixing but is fine! - Failure (with or without warnings): code doesn't compile. Big problem! ## Proper testing I've also been thinking about adding tests to the CI, and by some extent we have that already, but it's a challenge to get GPU access in a CI. At least without hosting an actions runner. Furthermore, we'd need an automated system that can score out screenshots, potentially benchmarks or videos, for us. I don't know if this will ever be important but for now I don't think it is. There are examples they are serving as test already basically. Just manually. We should maybe add a way of executing all of them at the same time or something. There are some existing tests and potentially will be more so testing should be added to the CI! Just now that it will test individual components, rather than if a whole example works. --- Ultimately, the goal is to really speed up the CI.
SakulFlee commented 2024-06-04 21:49:24 +00:00 (Migrated from github.com)
Comment from #133: > See: [https://github.com/SakulFlee/WGPU-Engine/blob/c7c6dcff7e5c7edab300c5cf3a6335b5f55a021a/.github/workflows/build.yml#L54-L76](https://github.com/SakulFlee/WGPU-Engine/blob/c7c6dcff7e5c7edab300c5cf3a6335b5f55a021a/.github/workflows/build.yml#L54-L76)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SakulFlee/Orbital#134
No description provided.