New KDE CI configuration options and Plasma KF6 CI
Project dependencies and other CI settings so far could only be set per platform, which made it difficult to deal with differences between Qt 5 and Qt 6 builds on the same platform. This changed now, giving us a lot more flexibility and unblocking Qt 6 CI coverage for a number of repositories.
CI Configuration
Platform-specific options occur in several places in the .kde-ci.yml
CI configuration files, such as the needed dependencies
or required unit test passing.
The values in those list are defined by arguments passed to the CI runner script in the
Gitlab CI templates included in
the .gitlab-ci.yml
files.
So far this was the operating system, ie. Linux, FreeBSD or Windows. The CI runner script contains some special handling based on that, so we can’t use arbitrary values here. But it also meant we cannot separate different build flavors for a single platform.
This however is increasingly necessary:
- Qt 6 builds have slightly different dependencies. If those involve dependencies no longer or not yet available for Qt 6, the module is practically unbuildable on the CI.
- Qt 6 builds might have failing unit tests that we cannot fix right now (e.g. due to requiring QML changes we can only do after branching), so we cannot enforce passing unit tests for the Qt 5 builds either (or cannot have Qt 6 builds).
- The introduction of static library builds for Frameworks adds yet another build flavor with similar challenges, at least initially.
To support this while remaining fully backwards compatible with all existing CI configuration out there, the platform identifier is now a /
-separated string that
is matched hierarchically against platforms specified in the configuration. That is, Linux
matches Linux/Qt5/Static
and Linux/Qt6/Shared
,
Linux/Qt6
only matches the latter, etc.
The different parts in the platform identifier have no assigned meaning, you can use whatever value makes sense. Only the very first one has to be the operating system as used previously. The platform identifiers used in the standard CI templates have the format <os>/Qt[5|6]/[Shared|Static]
, you can use those now in the .kde-ci.yml
file without needing any other changes.
Examples
Specifying a Qt5-only dependency in .kde-ci-yml
:
Dependencies:
- 'on': ['@all']
'require':
...
- 'on': ['Linux/Qt5', 'FreeBSD/Qt5']
'require':
'network/kaccounts-integration': '@latest'
Requiring unit tests to pass on Linux in all build variants, but on FreeBSD only in the Qt 5 build:
Options:
require-passing-tests-on: ['Linux', 'FreeBSD/Qt5']
Plasma and PIM KF6 CI
With these new possibilities we managed to significantly expand the CI coverage for Qt 6 builds. The biggest step forward happened in Plasma, with almost all of its repositories having Qt 6 CI now. PIM also benefited, with only the email related parts still blocked due to waiting for Qt 6 support in GpgME arriving on the CI now.
In repositories already having Qt 6 CI we were able to enforce stricter unit test requirements again where the Qt 6 tests don’t work yet, such as in Kirigami.