cpp-best-practices / gui_starter_template

A template CMake project to get you started with C++ and tooling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add CI tests for GUI examples

ddalcino opened this issue · comments

The current CI builds do not check to see if the GUI examples build successfully. It would be really helpful for the CI to tell us whether or not a change would break the examples.

While writing #121 I noticed that both the Nana and Qt examples produce warnings, which lead to build failures, unless you define WARNINGS_AS_ERRORS=FALSE. As a result, I had to add some code to #121 that really doesn't belong there, just to prove that my branch works. CI tests would have revealed these problems a long time ago:

  • The Qt example fails because of a stray semicolon at src/qt/HelloQt.cpp line 38.
  • The Nana example fails because the Nana header files have some shadowed variable names, which triggers -Wshadow.

Building the examples should be as frictionless as possible, and CI builds would really help with that. What better way to destroy user confidence is there than to provide examples that don't work?

If anyone is interested in adding these CI tests, you may find it useful to read the build_examples.sh and Dockerfile files in #121, or the Dockerfile in #99. Building the examples is not as straightforward as I would like it to be.

Edit: Since #134 and #121 were merged, the compilation failures described here should be resolved.

@ddalcino I'm closing this since we have commented out (and then deleted) most of the un-tested GUI demos.

I'm slowly re-adding what I can.

Notes:

  • conan support for Qt is spotty
  • SFML cannot build with modern compilers because it still uses auto_ptr (removed in C++17)
  • FLTK - possible to get working again
  • nana - cannot compile in C++20 mode, so I might end up creating another project just to demo it?