157 lines
6.1 KiB
Markdown
157 lines
6.1 KiB
Markdown
# Our GitLab CI/CD Pipelines
|
|
|
|
This folder has templates that can be included in your project's `.gitlab-ci.yml` file by using their full file path
|
|
in this repository and the [`include:` keyword](https://invent.kde.org/help/ci/yaml/index.md#includeproject). For example:
|
|
|
|
```yaml
|
|
include:
|
|
- project: sysadmin/ci-utilities
|
|
file:
|
|
- /gitlab-templates/freebsd-qt6.yml
|
|
- /gitlab-templates/linux-qt6.yml
|
|
```
|
|
|
|
For further details about our pipeline infrastructure, see [Continuous Integration System](https://community.kde.org/Infrastructure/Continuous_Integration_System).
|
|
|
|
## CI Pipelines
|
|
|
|
### General
|
|
|
|
- json-validation.yml - Validates JSON files in the project
|
|
- reuse-lint.yml - Validates [REUSE compliance](https://community.kde.org/Policies/Licensing_Policy) of the project
|
|
- pre-commit.yml - Runs [pre-commit](https://precommit.com) on the project
|
|
- commit-checks.yml - Checks the commits of a merge request for common mistakes. Every check is off until the
|
|
project asks for it in its `.kde-ci.yml`:
|
|
|
|
```yaml
|
|
Options:
|
|
commit-checks: ["bug-links", "missing-since", "since-version"]
|
|
```
|
|
|
|
- `bug-links` - a link to bugs.kde.org, or a keyword bugzilla cannot read, in place of `BUG: 123456` or `CCBUG: 123456`
|
|
- `missing-since` - a public class or method added to an installed header without a `\since` version
|
|
- `since-version` - new public API whose `\since` names a version other than the one under development, read from
|
|
`KF_VERSION` or `project(VERSION)` in `CMakeLists.txt`
|
|
|
|
### Linux
|
|
|
|
- linux-qt6.yml - Builds and runs unit tests for the project with Qt 6
|
|
- linux-qt6-next.yml - Builds and runs unit tests for the project with the upcoming next release of Qt 6
|
|
- linux-qt6-static.yml - Creates statically linked builds with Qt 6
|
|
- alpine-qt6.yml - Builds and runs unit tests for the project with musl instead of glibc
|
|
|
|
### FreeBSD
|
|
|
|
- freebsd-qt6.yml - Builds and runs unit tests for the project with Qt 6
|
|
|
|
### Windows
|
|
|
|
- windows-qt6.yml - Builds and runs unit tests for the project with Qt 6
|
|
|
|
### Android
|
|
|
|
- android-qt6.yml - Cross-builds the project with Qt 6
|
|
|
|
## CD Pipelines
|
|
|
|
### Linux
|
|
|
|
- craft-appimage-qt6.yml - Builds an AppImage for the project
|
|
- flatpak.yml - Builds a x86 Flatpak for the project
|
|
- flatpak-arm64.yml - Builds an ARM64 Flatpak for the project
|
|
|
|
### Windows
|
|
|
|
- craft-windows-mingw64-qt6.yml - Builds the project with MingW64 and creates some installers
|
|
- craft-windows-x86-64-qt6.yml - Builds the project with MSVC and creates some installers
|
|
- craft-windows-base.yml - Common code of the Windows pipelines
|
|
- craft-windows-appx-qt6.yml - Provides a job for publishing in the Microsoft Store
|
|
|
|
### macOS
|
|
|
|
- craft-macos-arm64-qt6.yml - Builds the project for ARM64 and package to DMG
|
|
- craft-macos-x86-64-qt6.yml - Builds the project for x86 and package to DMG
|
|
- craft-macos-base.yml - Common code of the macOS pipelines
|
|
|
|
### Android
|
|
|
|
- craft-android-qt6-apks.yml -
|
|
Builds signed APKs for the project for ARM32, ARM64, and Intel 64-bit with Qt 6.
|
|
Publishes APKs in KDE's F-Droid repositories.
|
|
- craft-android-qt6-appbundle.yml -
|
|
Repackages the platform-specific APKs (Qt 6) as an [Android App Bundle](https://developer.android.com/guide/app-bundle) (AAB)
|
|
and submits the AAB to Google Play. Optionally, signs the AAB.
|
|
- craft-android-qt6-googleplay-apks.yml -
|
|
Submits APKs (Qt 6) to Google Play.
|
|
|
|
## Website Pipelines
|
|
|
|
- website-hugo.yml
|
|
- website-sphinx-app-docs.yml
|
|
- website-base.yml - Common code of the website pipelines
|
|
|
|
## Details
|
|
|
|
### Craft Pipelines
|
|
|
|
All pipelines using Craft assume that the name of the project's Craft blueprint matches
|
|
the name of the project's repository ([CI_PROJECT_NAME](https://invent.kde.org/help/ci/variables/predefined_variables.md)).
|
|
|
|
The pipelines can be customized with a `.craft.ini` file in the project's root
|
|
folder to override the defaults of Craft and the Craft blueprints. Some examples which
|
|
illustrate the syntax:
|
|
|
|
```
|
|
[BlueprintSettings]
|
|
kde/applications/kate.packageAppx = True
|
|
kde/applications/konsole.version = master
|
|
```
|
|
|
|
This `.craft.ini` could be used by Kate. Setting the `packageAppx` option to `True` for Kate
|
|
enables the creation of APPX packages for Kate. And setting `version` of `konsole` to `master`
|
|
tells Craft that the `master` version of Konsole should be used for Kate.
|
|
|
|
You should only use a specific version of a dependency in `.craft.ini` if really needed.
|
|
Using the default values provided by Craft and the default config has the benefit that the
|
|
Craft binary cache is used saving system resources (and build time).
|
|
|
|
If want to override a default version prefer individual blueprints like `kde/frameworks/kirigami`
|
|
over entiere namespace like `kde/frameworks`.
|
|
|
|
```
|
|
[android-arm64-clang-BlueprintSettings]
|
|
libs/qt5/qtsvg.featureArguments = -feature-qgraphicssvgitem
|
|
|
|
[android-x86_64-clang-BlueprintSettings]
|
|
libs/qt5/qtsvg.featureArguments = -feature-qgraphicssvgitem
|
|
```
|
|
|
|
This `.craft.ini` shows how to specify special settings for the Android builds.
|
|
|
|
### Android CD Pipelines
|
|
|
|
The CD pipelines for Android build signed or unsigned APKs and AABs and publish
|
|
them in our F-Droid repositories and on Google Play. Signed APKs are only created
|
|
for a few branches, typically the latest release branch for stable builds and the
|
|
master branch for nightly builds. Likewise, publication happens only for certain
|
|
branches.
|
|
|
|
To enable signing and publication for your project you need to edit the [project
|
|
settings](signing/README.md) of the corresponding CI notary services.
|
|
|
|
### Flatpak Pipelines
|
|
|
|
The Flatpak CD pipeline can be configured by the following pipeline variables:
|
|
|
|
- `KDE_FLATPAK_MANIFEST_FILE`: Allows to specify the name of the Flatpak manifest,
|
|
in case it deviates from the default (`.flatpak-manifest.json`).
|
|
- `KDE_FLATPAK_TEST_COMMAND`: Allows to specify a command that is run after building
|
|
and installing the Flatpak and before publishing it, for performing smoke tests.
|
|
Example: `flatpak run org.kde.ktrip --self-test`. A failing test command will
|
|
prevent publishing.
|
|
- `KDE_FLATPAK_TEST_TIMEOUT`: Allows to override the default timeout of 300 seconds
|
|
a Flatpak test command has to complete before being aborted.
|
|
|
|
## Builder deployment instructions
|
|
|
|
Please see sysadmin/ci-images for more information on setting this up
|