323 lines
7 KiB
YAML
323 lines
7 KiB
YAML
include:
|
|
- remote: 'https://gitlab.gnome.org/Infrastructure/freedesktop-ci-templates/-/raw/145b1bc7ef1702d2bd71584010d7113c6786a506/templates/fedora.yml'
|
|
- component: gitlab.gnome.org/GNOME/citemplates/release-service@master
|
|
inputs:
|
|
job-stage: "deploy"
|
|
dist-job-name: "dist"
|
|
tarball-artifact-path: "build/meson-dist/$CI_PROJECT_NAME-$CI_COMMIT_TAG.tar.xz"
|
|
|
|
variables:
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
FDO_DISTRIBUTION_VERSION: latest
|
|
FDO_DISTRIBUTION_TAG: "x86_64-2024-08-30.1"
|
|
FDO_UPSTREAM_REPO: GNOME/gnome-settings-daemon
|
|
# Expiry sets fdo.expires on the image
|
|
FEDORA_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
|
|
FDO_EXPIRES_AFTER: 8w
|
|
FEDORA_DEPENDENCIES: >
|
|
@c-development
|
|
alsa-lib-devel
|
|
colord-devel
|
|
compiler-rt
|
|
cups-devel
|
|
fontconfig-devel
|
|
gcr-devel
|
|
geoclue2-devel geocode-glib-devel
|
|
gettext
|
|
git
|
|
glib2-devel
|
|
gnome-desktop3-devel
|
|
gnome-session
|
|
gobject-introspection
|
|
gobject-introspection-devel
|
|
gsettings-desktop-schemas-devel
|
|
gtk3-devel
|
|
lcms2-devel
|
|
lcov gcovr clang libasan libubsan libtsan
|
|
libcanberra-devel
|
|
libgtop2-devel
|
|
libgudev-devel
|
|
libgweather4-devel
|
|
libnotify-devel
|
|
librsvg2-devel
|
|
libwacom-devel
|
|
libX11-devel
|
|
libXi-devel
|
|
libXtst-devel
|
|
libXfixes-devel
|
|
llvm
|
|
mesa-dri-drivers
|
|
meson
|
|
ModemManager-glib-devel
|
|
NetworkManager-libnm-devel
|
|
nss-devel
|
|
perl-interpreter
|
|
polkit-devel
|
|
pulseaudio-libs-devel
|
|
python3-gobject python3-dbusmock
|
|
umockdev
|
|
upower-devel
|
|
wayland-devel
|
|
which
|
|
xorg-x11-drv-wacom-devel
|
|
xorg-x11-server-Xvfb
|
|
xorg-x11-server-Xwayland
|
|
|
|
stages:
|
|
- prepare
|
|
- build
|
|
- test
|
|
- manual
|
|
- deploy
|
|
|
|
.Log files: &log_files [./*.log, _build/meson-logs/]
|
|
|
|
.Build logs: &save_build_logs
|
|
artifacts:
|
|
name: log
|
|
when: always
|
|
paths: *log_files
|
|
|
|
.Git Untracked files: &save_untracked_files
|
|
artifacts:
|
|
name: untracked
|
|
when: always
|
|
paths:
|
|
- ./*
|
|
expire_in: 3h30min
|
|
|
|
.Show Info: &environment_information
|
|
build-aux/ci/ci-helper.sh "INFO" &&
|
|
build-aux/ci/ci-helper.sh "GIT_INFO"
|
|
|
|
.Build procedure: &build_procedure
|
|
echo "== Building ==" &&
|
|
rm -rf _build/ &&
|
|
meson setup --werror . _build ${BUILD_OPTS} &&
|
|
ninja -C _build 2>&1 | tee compilation.log
|
|
|
|
.Run Tests: &run_tests
|
|
echo "== Testing ==" &&
|
|
mkdir -m 1777 /tmp/.X11-unix
|
|
meson test -C _build --verbose --no-stdsplit
|
|
|
|
##
|
|
# Stage: Prepare
|
|
##
|
|
build-fedora-container@x86_64:
|
|
extends:
|
|
- .fdo.container-build@fedora@x86_64
|
|
stage: prepare
|
|
variables:
|
|
GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
|
|
FDO_DISTRIBUTION_PACKAGES: $FEDORA_DEPENDENCIES
|
|
FDO_DISTRIBUTION_EXEC: |
|
|
./.gitlab-ci/install-meson-project.sh \
|
|
https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas.git \
|
|
master
|
|
|
|
dnf install -y 'dnf-command(builddep)'
|
|
dnf builddep -y pipewire
|
|
dnf builddep -y mutter
|
|
|
|
./.gitlab-ci/install-meson-project.sh \
|
|
https://gitlab.gnome.org/GNOME/glib.git \
|
|
2.81.1
|
|
|
|
./.gitlab-ci/install-meson-project.sh \
|
|
https://gitlab.freedesktop.org/pipewire/pipewire.git \
|
|
1.2.3
|
|
|
|
./.gitlab-ci/install-meson-project.sh \
|
|
https://gitlab.gnome.org/GNOME/mutter.git \
|
|
main
|
|
|
|
##
|
|
# Stage: Build
|
|
#
|
|
# Checks if GNOME Settings Daemon is properly building and installing. This is the
|
|
# most important stage of the CI, and no MR should ever be merged if it breaks
|
|
# any of them.
|
|
##
|
|
build:
|
|
<<: *save_untracked_files
|
|
stage: build
|
|
|
|
extends:
|
|
- .fdo.distribution-image@fedora
|
|
image:
|
|
name: ${FDO_DISTRIBUTION_IMAGE}
|
|
needs:
|
|
- job: build-fedora-container@x86_64
|
|
artifacts: false
|
|
|
|
script:
|
|
- *environment_information
|
|
- *build_procedure
|
|
|
|
- echo "== Installing =="
|
|
- ninja -C _build install
|
|
|
|
- echo "== Report =="
|
|
- build-aux/ci/ci-helper.sh "WARNINGS"
|
|
|
|
# Save all but git-related files
|
|
- rm -rf .git .gitignore .gitmodules
|
|
|
|
except:
|
|
variables:
|
|
- $CI_PIPELINE_SOURCE == "schedule"
|
|
|
|
##
|
|
# Stage: Test
|
|
#
|
|
# Runs the unit tests.
|
|
##
|
|
test:
|
|
<<: *save_build_logs
|
|
stage: test
|
|
|
|
extends:
|
|
- .fdo.distribution-image@fedora
|
|
image:
|
|
name: ${FDO_DISTRIBUTION_IMAGE}
|
|
needs:
|
|
- build
|
|
|
|
script:
|
|
- *environment_information
|
|
|
|
- |
|
|
if [[ -n "${CI_COMMIT_TAG}" ]]; then
|
|
*run_tests
|
|
|
|
echo "== Distro Test =="
|
|
mkdir -m 1777 /tmp/.X11-unix
|
|
ninja dist -C _build
|
|
else
|
|
echo "== Testing =="
|
|
mkdir -m 1777 /tmp/.X11-unix
|
|
meson test -C _build --verbose --no-stdsplit
|
|
fi
|
|
|
|
except:
|
|
variables:
|
|
- $CI_PIPELINE_SOURCE == "schedule"
|
|
- $CI_COMMIT_TITLE =~ /^Update.*translation$/
|
|
|
|
dist:
|
|
stage: test
|
|
extends:
|
|
- .fdo.distribution-image@fedora
|
|
needs:
|
|
- build-fedora-container@x86_64
|
|
script:
|
|
- mkdir -m 1777 /tmp/.X11-unix
|
|
- meson setup build
|
|
- meson compile -C build
|
|
- meson dist -C build
|
|
artifacts:
|
|
expose_as: 'Tarball'
|
|
paths:
|
|
- build/meson-dist/
|
|
|
|
# Runs the coverage test.
|
|
coverage:
|
|
<<: *save_build_logs
|
|
stage: test
|
|
# Appears to be broken on Fedora Rawhide as of 2018-02-05
|
|
allow_failure: true
|
|
variables:
|
|
BUILD_OPTS: "-Db_coverage=true"
|
|
coverage: '/^Lines:.\d+.\d+.(\d+\.\d+\%)/'
|
|
only:
|
|
- master@GNOME/gnome-settings-daemon
|
|
|
|
extends:
|
|
- .fdo.distribution-image@fedora
|
|
image:
|
|
name: ${FDO_DISTRIBUTION_IMAGE}
|
|
needs:
|
|
- job: build-fedora-container@x86_64
|
|
artifacts: false
|
|
|
|
script:
|
|
- *environment_information
|
|
- *build_procedure
|
|
- *run_tests
|
|
|
|
- ninja -C _build coverage-html
|
|
|
|
# Parse the report to get the coverage result
|
|
- |
|
|
echo == Coverage ==
|
|
sed -e 's/<[^>]*>//g' _build/meson-logs/coveragereport/index.html | tr -d ' \t' | grep -A3 -P '^Lines:$' | tr '\n' ' '; echo
|
|
|
|
##
|
|
# Stage: deploy
|
|
#
|
|
# Deploys and publishes artifacts
|
|
##
|
|
pages:
|
|
stage: deploy
|
|
# Don't error in case coverage failed
|
|
allow_failure: true
|
|
extends:
|
|
- .fdo.distribution-image@fedora
|
|
image:
|
|
name: ${FDO_DISTRIBUTION_IMAGE}
|
|
needs:
|
|
- coverage
|
|
script:
|
|
- mv _build/meson-logs/coveragereport/ public/
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
only:
|
|
- master@GNOME/gnome-settings-daemon
|
|
|
|
##
|
|
# Stage: Manual
|
|
#
|
|
# Runs the sanitizers [address, thread, undefined, and memory].
|
|
##
|
|
.sanitizer: &sanitizer
|
|
<<: *save_build_logs
|
|
stage: manual
|
|
when: manual
|
|
script:
|
|
- *environment_information
|
|
- *build_procedure
|
|
- *run_tests
|
|
extends:
|
|
- .fdo.distribution-image@fedora
|
|
image:
|
|
name: ${FDO_DISTRIBUTION_IMAGE}
|
|
|
|
except:
|
|
variables:
|
|
- $CI_PIPELINE_SOURCE == "schedule"
|
|
- $CI_COMMIT_TITLE =~ /^Update.*translation$/
|
|
|
|
asan:
|
|
<<: *sanitizer
|
|
# ASAN requires debugging capabilities
|
|
tags: [ asan ]
|
|
variables:
|
|
BUILD_OPTS: "-Db_sanitize=address"
|
|
|
|
tsan:
|
|
<<: *sanitizer
|
|
variables:
|
|
BUILD_OPTS: "-Db_sanitize=thread"
|
|
|
|
ubsan:
|
|
<<: *sanitizer
|
|
variables:
|
|
BUILD_OPTS: "-Db_sanitize=undefined"
|
|
|
|
msan:
|
|
<<: *sanitizer
|
|
variables:
|
|
BUILD_OPTS: "-Db_sanitize=memory -Db_lundef=false"
|
|
CC: "clang"
|