Skip to content
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

Colourful CI output #6760

Merged
merged 9 commits into from Jun 10, 2022
Merged

Colourful CI output #6760

merged 9 commits into from Jun 10, 2022

Conversation

mesilliac
Copy link
Contributor

@mesilliac mesilliac commented Jun 9, 2022

Adds colours to CI output in a variety of places. Most notably:

  • compiler error messages (this was actually already working, but now it's explicit)
  • cmake progress stages
  • test section headers (these were also made more distinct with a border and spacing)
  • test section failure messages
  • WML validation failures
  • gdb backtraces
  • boost test suite stages are now displayed, in colour (they weren't previously displayed at all)

The coloured outputs only really work in the linux builds. I'm not sure what the equivalent commands are on mac and windows, if any.

I also ran into a couple other problems during this, so fixed them in some additional commits.

  • game::error messages weren't always being displayed on exit
  • the MP Test executor was not actually running MP Tests, but duplicating Play Tests, so i fixed that as well

It says they have already been displayed. Well, this is not always so.
In CMake this is the FORCE_COLOR_OUTPUT option. In SCons this is the
force_color option. They both pass -fdiagnostics-color=always to gcc,
or -fcolor-diagnostics to clang.

This is useful when building with Ninja, or running piped CI tools.
It was not getting called. In stead the Play Test executor was being
run twice.
@github-actions github-actions bot added Building Build-time issues. CMake Issues involving the CMake build system. SCons Issues involving the SCons build system. labels Jun 9, 2022
@mesilliac mesilliac added the CI Issues involving the CI platform. label Jun 9, 2022
@mesilliac
Copy link
Contributor Author

mesilliac commented Jun 9, 2022

Actually now that the boost test suites are displayed, maybe the error log shouldn't be redirected to a file then pasted afterwards... it's not checking for anything, it just cats the stderr output at the end after everything has finished.

An example with some failed tests and colourful backtraces:
https://github.com/wesnoth/wesnoth/runs/6805214607

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Building Build-time issues. CI Issues involving the CI platform. CMake Issues involving the CMake build system. SCons Issues involving the SCons build system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant