bevy
bevy copied to clipboard
Refactor CI tool and drop xshell dependency.
This is part 2 of my attempt at improving the errors CI spits out. See part 1 (#13187) for the action plan.
Problem
The current structure of the CI tool means we can't really execute anything other than shell scripts.
Solution
- Remove the
PreparedCommand
struct andPrepare
trait. - Run sub commands directly.
- Introduce helpers for invoking cargo.
Testing
- Run
cargo run -p ci -- compile-check
. - Check if everything is outputting correctly.
- The CI uses this code extensively. Double check it.
Probably should have waited for #13187 to merge. But oh well. Might as well get some feedback on my approach here. Most of the command code isn't very human friendly. It was written to be copy-pastable as writing all that boiler plate by hand would have turned my brain to mush.
cc @BD103
I'm sorry if the description isn't very coherent. It's very late here. I'm going to sleep. I'll fix everything tomorrow.
I created https://github.com/Brezak/bevy/pull/2 with just a few small refactors. I think it's possible to still use a trait instead of having inconsistent Command::run
function signatures, but I'll make a demo for that tomorrow.
This is work for a future PR but several commands could be flags on other commands. For example both the test-check and cfg-check commands could be flags on the compile-check command.