# SPDX-FileCopyrightText: 2026 Matvey Shcherbinin # SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL # Everything here is the standard KDE GitLab machinery: build, tests, lint, # formatting and packaging all come from sysadmin/ci-utilities templates, like # every other Qt6/KF6 application on invent.kde.org. The suse-qt6.12 image # behind linux-qt6.yml already carries libQuotient, qtkeychain, libsodium and # OpenSSL, and the KDE dependencies declared in .kde-ci.yml are resolved and # unpacked by run-ci-build.py from the package registry - no hand-rolled # build job is needed or wanted. The one gap in the template set is # AppStream/desktop-file validation, so a small local job keeps that, on # Debian trixie because the metainfo's developer tag is an AppStream 1.0 tag # and trixie's validator is of that generation (bookworm's flags it unknown). # The GitHub mirror equivalents live in .github/workflows/. # # The stages (validate/build/test/deploy/publish) come with # gitlab-templates/blocks/workflow.yml through the includes below. include: - project: sysadmin/ci-utilities file: - /gitlab-templates/clang-format.yml - /gitlab-templates/reuse-lint.yml - /gitlab-templates/yaml-lint.yml - /gitlab-templates/xml-lint.yml - /gitlab-templates/qml-lint.yml - /gitlab-templates/cppcheck.yml - /gitlab-templates/linux-qt6.yml - /gitlab-templates/linux-qt6-next.yml - /gitlab-templates/windows-qt6.yml # The Windows image's Craft shelf carries the NeoChat stack but not libsodium, # and this project's CMake cannot configure without it. Building the release # tarball from source on the CI's cl.exe goes wrong in both directions - the # makefile's parallel writes to one vc140.pdb and 1.0.18's unguarded pid_t - so # the job unpacks the vendor's own prebuilt binaries into a prefix layout and # hands it over through SODIUM_DIR instead. Only the script is redefined here; # the image, the variables and the before_script are the template's own. windows_qt612: script: - . ci-utilities/resources/setup-msvc2022-env.ps1 - $SodiumDir = Join-Path $env:CI_PROJECT_DIR "sodium" - Invoke-WebRequest https://github.com/jedisct1/libsodium/releases/download/1.0.20-RELEASE/libsodium-1.0.20-msvc.zip -OutFile sodium.zip - Expand-Archive sodium.zip -DestinationPath sodium-msvc - New-Item -ItemType Directory "$SodiumDir/lib", "$SodiumDir/bin" -Force | Out-Null - Copy-Item "sodium-msvc/libsodium/include" -Destination "$SodiumDir/include" -Recurse - Copy-Item "sodium-msvc/libsodium/x64/Release/v143/dynamic/libsodium.lib" "$SodiumDir/lib/" - Copy-Item "sodium-msvc/libsodium/x64/Release/v143/dynamic/libsodium.dll" "$SodiumDir/bin/" - $env:SODIUM_DIR = $SodiumDir - $env:PATH = "$SodiumDir/bin;$env:PATH" - python -u ci-utilities/run-ci-build.py --project $CI_PROJECT_NAME --branch $CI_COMMIT_REF_NAME --platform Windows/Qt6/Shared --extra-cmake-args=-DBUILD_WITH_QT6=ON --extra-cmake-args=-DQT_MAJOR_VERSION=6 'appstream & desktop-file': image: debian:trixie stage: validate before_script: - apt-get update && apt-get install -y --no-install-recommends appstream desktop-file-utils script: - appstreamcli validate --strict --no-net packaging/*.metainfo.xml - desktop-file-validate packaging/*.desktop # A tag is a release: build the same Tumbleweed binary the CI proves, hash it, # sign it with the key held in GitLab CI/CD variables and attach all three files # to the GitLab release. The private key is never stored in the repository. release-binary: stage: publish image: opensuse/tumbleweed:latest rules: - if: '$CI_COMMIT_TAG' variables: ART: "KOutNet-${CI_COMMIT_TAG}-linux-x86_64.tar.gz" before_script: - | zypper --non-interactive --gpg-auto-import-keys refresh zypper --non-interactive install --no-recommends \ tar gzip gnupg2 gcc-c++ cmake ninja pkgconf-pkg-config \ kf6-extra-cmake-modules \ 'cmake(Qt6Core)' 'cmake(Qt6Gui)' 'cmake(Qt6Qml)' 'cmake(Qt6Quick)' \ 'cmake(Qt6QuickControls2)' 'cmake(Qt6QuickDialogs2)' \ 'cmake(Qt6Multimedia)' 'cmake(Qt6Network)' 'cmake(Qt6Widgets)' \ 'cmake(KF6Config)' 'cmake(KF6CoreAddons)' 'cmake(KF6I18n)' \ 'cmake(KF6IdleTime)' 'cmake(KF6Kirigami)' 'cmake(KF6Notifications)' \ 'cmake(KF6StatusNotifierItem)' 'cmake(KF6Wallet)' 'cmake(KF6ColorScheme)' \ 'cmake(KF6KirigamiAddons)' 'cmake(QuotientQt6)' \ 'pkgconfig(libsodium)' 'pkgconfig(tdjson)' script: - cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF - cmake --build build --parallel 2 --target KOutNet - mkdir -p dist/KOutNet - cp build/bin/KOutNet README.md NEWS.md packaging/koutnet-release-public.asc dist/KOutNet/ - tar -C dist -czf "$ART" KOutNet - sha256sum "$ART" > "$ART.sha256" - | test -n "$RELEASE_SIGNING_KEY" || { echo "RELEASE_SIGNING_KEY is not set"; exit 1; } test -n "$RELEASE_SIGNING_PASSPHRASE" || { echo "RELEASE_SIGNING_PASSPHRASE is not set"; exit 1; } # Accept both plain variables and GitLab "File" variables. if [ -f "$RELEASE_SIGNING_KEY" ]; then gpg --batch --import "$RELEASE_SIGNING_KEY" else printf '%s' "$RELEASE_SIGNING_KEY" | gpg --batch --import fi if [ -f "$RELEASE_SIGNING_PASSPHRASE" ]; then gpg --batch --yes --pinentry-mode loopback \ --passphrase-file "$RELEASE_SIGNING_PASSPHRASE" \ --armor --detach-sign --output "$ART.sig" "$ART" else printf '%s' "$RELEASE_SIGNING_PASSPHRASE" | gpg --batch --yes --pinentry-mode loopback --passphrase-fd 0 \ --armor --detach-sign --output "$ART.sig" "$ART" fi artifacts: paths: - "KOutNet-*-linux-x86_64.tar.gz" - "KOutNet-*-linux-x86_64.tar.gz.sha256" - "KOutNet-*-linux-x86_64.tar.gz.sig" expire_in: never release: tag_name: "$CI_COMMIT_TAG" name: "KOutNet $CI_COMMIT_TAG" description: | Alpha 0.2.0. Telegram is experimental and requires TDLib; LAN/VPN and Matrix are the supported transports, Rocket.Chat and Tox are placeholders. The tarball is built on openSUSE Tumbleweed and needs the shared libraries of a comparably current system - Qt 6.11, KDE Frameworks 6.28, libQuotient for Qt 6 and TDLib among them; on anything older, build from source instead. Nothing here is a distribution package yet. SHA256 and a detached GPG signature are attached. The public key is in packaging/koutnet-release-public.asc and inside the tarball. prerelease: true assets: links: - name: "KOutNet $CI_COMMIT_TAG linux x86_64" url: "$CI_PROJECT_URL/-/jobs/$CI_JOB_ID/artifacts/raw/$ART" - name: "SHA256" url: "$CI_PROJECT_URL/-/jobs/$CI_JOB_ID/artifacts/raw/$ART.sha256" - name: "GPG signature" url: "$CI_PROJECT_URL/-/jobs/$CI_JOB_ID/artifacts/raw/$ART.sig"