GammaRay icon indicating copy to clipboard operation
GammaRay copied to clipboard

Test probe only

Open ferdnyc opened this issue 1 year ago • 0 comments

Way back in #765, I submitted some patches to fix the GAMMARAY_CLIENT_ONLY_BUILD, which had stealth-broken because it wasn't being tested in CI.

The same is now true of GAMMARAY_PROBE_ONLY_BUILD, so to avoid the possibility of similar stealth breakage, this PR adds test runs for probe-only builds to the standard CI, by first adding configurations for them to the CMakePresets.json.

Along the way, it makes some adjustments to the existing configuration(s), to facilitate adding additional CI build configurations

Presets file CMakePresets.json

  1. The presets file is adjusted to make better use of inheritance, removing duplicate manual settings of "generator" or "binaryDir" when those can simply be inherited.
  2. To keep the file more streamlined, the new configs (and any they depend on) take advantage of a CMake feature that permits a string value for "inherits", rather than a list value, when only one configuration is being inherited from.

(Not all configurations were adjusted, mostly just the ones I was touching anyway. But in both cases, they all could be changed the same way.)

CI configuration build.yml

  1. To control whether (and which type) of unit tests are run, a new matrix.config.tests_with value is optionally added to matrix members, set to either qt5 or qt6. This allows the complicated version checks:
    startsWith(matrix.config.qt_version, '6.')
    
    to be replaced with a simple:
    matrix.config.tests_with == 'qt6'
    
    and (along with runner.os) not only controls which tests are run, but its absence will prevent tests from being run at all. (Mostly because unit tests on a PROBE_ONLY build are simultaneously both pointless and redundant.)

ferdnyc avatar Jan 17 '24 00:01 ferdnyc