bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Refactor CI tool and drop xshell dependency.

Open Brezak opened this issue 9 months ago • 3 comments

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 and Prepare trait.
  • Run sub commands directly.
  • Introduce helpers for invoking cargo.

Testing

  1. Run cargo run -p ci -- compile-check.
  2. Check if everything is outputting correctly.
  3. 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

Brezak avatar May 07 '24 22:05 Brezak

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.

Brezak avatar May 07 '24 22:05 Brezak

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.

BD103 avatar May 08 '24 02:05 BD103

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.

Brezak avatar May 09 '24 10:05 Brezak