1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457
|
image: ${DOCKER_REGISTRY_MIRROR}/alpine:3.22
variables:
GIT_STRATEGY: empty
BINARY_DIR: $CI_PROJECT_DIR/bin
VIRTUAL_ENV: $CI_PROJECT_DIR/venv
CCACHE_BASEDIR: "$CI_PROJECT_DIR"
CCACHE_REMOTE_ONLY: true
CCACHE_RESHARE: true
workflow:
name: '$PIPELINE_NAME'
.prepare:
setup:
- env
- !reference [.prepare, pkg]
- !reference [.prepare, uv]
- hg clone -U ${REPOSITORY} source
- hg -R source update -r $REVISION
- !reference [.prepare, patch]
pkg:
- |
if command -v apk >/dev/null 2>&1; then
apk add mercurial cmake samurai make gdb lldb uv python3
elif command -v apt-get >/dev/null 2>&1; then
apt-get update
apt-get install -y mercurial cmake ninja-build make gdb lldb python3 curl
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.7.12/uv-installer.sh | sh
source $HOME/.local/bin/env
elif command -v dnf >/dev/null 2>&1; then
dnf -y install mercurial cmake ninja-build make gdb lldb uv python3
elif command -v sw_vers >/dev/null 2>&1; then
export UV_NO_MODIFY_PATH=1
export UV_INSTALL_DIR=$BINARY_DIR
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.7.12/uv-installer.sh | sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/ccache/ccache/releases/download/v4.11.3/ccache-4.11.3-darwin.tar.gz | tar -C $BINARY_DIR --strip-components=1 -xz "*/ccache"
export PATH="$BINARY_DIR/:$PATH"
fi
uv:
- uv venv $VIRTUAL_ENV
- source $VIRTUAL_ENV/bin/activate
- |
if command -v sw_vers >/dev/null 2>&1; then
uv pip install mercurial cmake==4.0.2 ninja
fi
patch:
- |
if [ -n "$REVIEWBOARD_REVIEW_ID" ]; then
uv pip install rbtools python-hglib
rbt patch --write $CI_PROJECT_DIR/patch.diff --server ${REVIEWBOARD_SERVER} --diff-revision ${REVIEWBOARD_DIFF_REVISION} ${REVIEWBOARD_REVIEW_ID}
elif [ -n "$PATCH_URL" ]; then
uv pip install python-hglib
if command -v curl >/dev/null 2>&1; then
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" -s -o $CI_PROJECT_DIR/patch.diff "${PATCH_URL}"
else
wget --header "JOB-TOKEN: ${CI_JOB_TOKEN}" -qO $CI_PROJECT_DIR/patch.diff "${PATCH_URL}"
fi
fi
.Base:
rules:
- if: '$SELECT_JOB_REGEX != null && $CI_JOB_NAME !~ $SELECT_JOB_REGEX && $CI_JOB_NAME =~ /^Libraries/'
when: never
- if: '$SELECT_JOB_REGEX != null && $CI_JOB_NAME !~ $SELECT_JOB_REGEX'
when: manual
- when: on_success
.Packages:
extends: .Base
variables:
PACKAGES_DIR: $CI_PROJECT_DIR/packages
cache:
- key: packages
paths:
- packages
when: always
default:
before_script:
- export PATH=$BINARY_DIR:$PATH
- !reference [.prepare, setup]
Libraries_Linux:
extends: .Packages
before_script:
- !reference [.prepare, setup]
- |
apk add wget g++ ccache perl \
pkgconf binutils-gold lld pcsc-lite-dev \
mesa-dev libx11-dev libxkbcommon-dev xcb-util-wm-dev xcb-util-image-dev xcb-util-keysyms-dev
script:
- cmake -P source/ci.cmake
Linux_Debian_Vanilla:
extends: .Base
parallel:
matrix:
- version:
- bookworm-slim
- trixie-slim
image: ${DOCKER_REGISTRY_MIRROR}/debian:$version
variables:
XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/xdg"
LANG: "C.UTF-8"
LC_ALL: "C.UTF-8"
script:
- mkdir -p "$XDG_RUNTIME_DIR"
- chmod 700 "$XDG_RUNTIME_DIR"
- |
apt-get install -y g++ pkgconf ccache \
libhttp-parser-dev libpcsclite-dev libssl-dev \
qt6-base-dev qt6-base-private-dev qt6-declarative-dev \
qt6-scxml-dev qt6-shadertools-dev qt6-svg-dev \
qt6-tools-dev qt6-websockets-dev qt6-connectivity-dev \
\
libqt6svg6 qml6-module-qt-labs-platform qml6-module-qtqml \
qml6-module-qtqml-models qml6-module-qtqml-statemachine \
qml6-module-qtqml-workerscript qml6-module-qtquick-controls \
qml6-module-qtquick-layouts qml6-module-qtquick-templates \
qml6-module-qtquick-window
- cmake -P source/ci.cmake
artifacts:
expire_in: 1 week
reports:
junit: build/**/results.*.junit.xml
Linux_Alpine:
extends: Libraries_Linux
needs:
- job: Libraries_Linux
artifacts: false
optional: true
parallel:
matrix:
- variant: [App, Integrated]
compiler: [g++, clang++, clazy]
script:
- apk add clang clazy gnupg gcovr check-jsonschema typos py3-codespell
- cmake -P source/ci.cmake -- -DCMAKE_CXX_COMPILER=${compiler}
artifacts:
expire_in: 1 week
reports:
junit: build/**/results.*.junit.xml
Formatting:
extends: Libraries_Linux
needs:
- job: Libraries_Linux
artifacts: false
optional: true
script:
- apk add dos2unix uncrustify ruff yamlfmt
- cmake -P source/ci.cmake | tee output.log
- if grep -q "FORMATTING FAILED" output.log; then exit 1; fi
Linux_Debian_Qt:
extends: .Base
parallel:
matrix:
- QT:
- 6.8.0
- 6.9.0
image: ${DOCKER_REGISTRY_MIRROR}/debian:stable-slim
variables:
LANG: "C.UTF-8"
LC_ALL: "C.UTF-8"
script:
- |
apt-get install -y g++ pkgconf ccache libpcsclite-dev libssl-dev libudev-dev \
libglib2.0-0 libvulkan-dev libegl1-mesa-dev libxkbcommon0 libdbus-1-3
- uv pip install aqtinstall
- cmake -DQT=$QT -P source/ci.cmake
artifacts:
expire_in: 1 week
reports:
junit: build/**/results.*.junit.xml
.AndroidBase:
extends: .Packages
variables:
ANDROID_CMDLINE_TOOLS: 13114758
ANDROID_NDK_VERSION: 28.1.13356709
ANDROID_COMPONENTS: '"cmdline-tools;19.0" "build-tools;36.0.0" "platforms;android-35" "ndk;${ANDROID_NDK_VERSION}"'
ANDROID_SDK_ROOT: $CI_PROJECT_DIR/android-sdk
ANDROID_NDK_ROOT: $ANDROID_SDK_ROOT/ndk/$ANDROID_NDK_VERSION
ANDROID_CMDLINE_TOOLS_ZIP: commandlinetools-linux-${ANDROID_CMDLINE_TOOLS}_latest.zip
GRADLE_USER_HOME: $CI_PROJECT_DIR/.gradle
cache:
- key: packages
paths:
- packages
when: always
- key: "${CI_JOB_NAME}-gradle"
paths:
- .gradle/caches/
- .gradle/wrapper/
- key: "${CI_JOB_NAME}-${ANDROID_CMDLINE_TOOLS}-${ANDROID_NDK_VERSION}-${ANDROID_COMPONENTS}"
paths:
- $ANDROID_SDK_ROOT
before_script:
- !reference [.prepare, setup]
- apk add gcompat maven gradle ccache unzip perl bash g++ linux-headers
- |
if [ ! -d "$ANDROID_SDK_ROOT" ]; then
if [ ! -f "$PACKAGES_DIR/$ANDROID_CMDLINE_TOOLS_ZIP" ]; then
mkdir -p $PACKAGES_DIR
wget -O $PACKAGES_DIR/$ANDROID_CMDLINE_TOOLS_ZIP "https://dl.google.com/android/repository/$ANDROID_CMDLINE_TOOLS_ZIP"
fi
unzip -d /tmp/cmd $PACKAGES_DIR/$ANDROID_CMDLINE_TOOLS_ZIP
set +o pipefail
yes | /tmp/cmd/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT $(eval echo $ANDROID_COMPONENTS)
rm -rf /tmp/cmd
set -o pipefail
fi
artifacts:
expire_in: 1 week
paths:
- build/dist/**
- build/src/libAusweisApp*
Libraries_Android:
extends: .AndroidBase
parallel:
matrix:
- arch: arm64-v8a
- arch: armeabi-v7a
- arch: x86_64
- arch: x86
script:
- cmake -P source/ci.cmake -- -DCMAKE_ANDROID_ARCH_ABI=${arch}
Android_AAR:
extends: .AndroidBase
needs:
- job: Libraries_Android
artifacts: false
optional: true
parallel:
matrix:
- arch:
- arm64-v8a
- armeabi-v7a
- x86_64
script:
- cmake -DPROPAGATE=ON -P source/ci.cmake -- -DCMAKE_ANDROID_ARCH_ABI=${arch}
Android_Merged-AAR:
extends: .Base
needs:
- job: Android_AAR
artifacts: true
script:
- apk add maven gnupg
- find build/dist -type f -exec mv {} $CI_PROJECT_DIR/ \;
- cmake -P source/ci.cmake
artifacts:
expire_in: 1 week
paths:
- build/dist/**
Android_APK:
extends: .AndroidBase
needs:
- job: Libraries_Android
artifacts: false
optional: true
parallel:
matrix:
- arch:
- arm64-v8a
- armeabi-v7a
- x86_64
- x86
script:
- cmake -DPROPAGATE=ON -P source/ci.cmake -- -DCMAKE_ANDROID_ARCH_ABI=${arch}
Docs:
image: ${DOCKER_REGISTRY_MIRROR}/pandoc/latex:3.6.4-alpine
extends: .Base
script:
- |
apk add py3-setuptools icu poppler zziplib enscript ghostscript \
py3-sphinx py3-sphinx_rtd_theme py3-sphinx-copybutton py3-sphinxcontrib-tabs
- uv pip install doc8
- |
tlmgr --repository=https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2024/tlnet-final install \
latexmk cmap fncychap float wrapfig capt-of framed upquote needspace tabulary varwidth parskip titlesec \
pdfmanagement-testphase tagpdf xcolor sectsty pdflscape fancyvrb tcolorbox booktabs mdwtools caption \
babel-german csquotes tex-gyre l3experimental
- cmake -P source/ci.cmake
artifacts:
expire_in: 1 week
paths:
- build/*.pdf
- build/docs/**/*.pdf
- build/docs/**/*.tar.xz
- build/docs/notes/singlehtml/**/appcast.html
- build/docs/**/*.inv
Source:
extends: .Base
script:
- apk add gnupg
- cmake -P source/ci.cmake
artifacts:
expire_in: 1 week
paths:
- build/*.tar.gz*
Container:
extends: .Base
tags:
- default-medium-s3
parallel:
matrix:
- target:
- SDK
- VNC
variables:
STORAGE_DRIVER: vfs
script:
- apk add buildah runc netavark iptables
- |
cat <<EOF > /etc/containers/registries.conf.d/mirror.conf
[[registry]]
location = "docker.io"
mirror-by-digest-only = false
[[registry.mirror]]
location = "${DOCKER_REGISTRY_MIRROR}"
EOF
- cmake -P source/ci.cmake
artifacts:
expire_in: 1 week
paths:
- build/AusweisApp*.tar
FreeBSD:
extends: .Packages
tags:
- freebsd
script:
- unset CCACHE_REMOTE_STORAGE
- unset CCACHE_REMOTE_ONLY
- cmake -P source/ci.cmake
artifacts:
expire_in: 1 week
reports:
junit: build/**/results.*.junit.xml
Libraries_iOS:
extends: .Packages
parallel:
matrix:
- target:
- Phone
- Simulator
- Simulator_arm64
tags:
- iOS
script:
- cmake -P source/ci.cmake
.iOS:
extends: .Packages
tags:
- iOS
script:
- cmake -P source/ci.cmake
artifacts:
expire_in: 1 week
paths:
- build/*.ipa
- build/*.zip
- build/*.bcsymbolmap
- AusweisApp_BuildDir.tar.zstd
iOS_Phone_IPA:
extends: .iOS
needs:
- job: Libraries_iOS
artifacts: false
optional: true
parallel:
matrix:
- target: Phone
iOS_Framework:
extends: iOS_Phone_IPA
iOS_Framework_Simulator:
extends: .iOS
needs:
- job: Libraries_iOS
artifacts: false
optional: true
parallel:
matrix:
- target: Simulator
iOS_Framework_Simulator_arm64:
extends: .iOS
needs:
- job: Libraries_iOS
artifacts: false
optional: true
parallel:
matrix:
- target: Simulator_arm64
iOS_SwiftPackage:
extends: .iOS
needs:
- job: iOS_Framework
artifacts: true
- job: iOS_Framework_Simulator
artifacts: true
- job: iOS_Framework_Simulator_arm64
artifacts: true
script:
- find build -type f -exec mv {} $CI_PROJECT_DIR/ \;
- cmake -P source/ci.cmake
artifacts:
expire_in: 1 week
paths:
- build/dist/*.zip
Libraries_MacOS:
extends: .Packages
tags:
- macOS
script:
- cmake -P source/ci.cmake
MacOS:
extends: Libraries_MacOS
needs:
- job: Libraries_MacOS
artifacts: false
optional: true
parallel:
matrix:
- target:
- DMG_PKG
- Tests
- Integrated
script:
- cmake -P source/ci.cmake
artifacts:
expire_in: 1 week
paths:
- build/*.dmg*
- build/*.pkg*
reports:
junit: build/**/results.*.junit.xml
|