mirror of
https://gitlab.freedesktop.org/libfprint/fprintd.git
synced 2025-12-20 02:20:08 +01:00
171 lines
4.9 KiB
YAML
171 lines
4.9 KiB
YAML
include:
|
|
- project: 'libfprint/libfprint'
|
|
ref: master
|
|
file: '/.gitlab-ci/libfprint-templates.yaml'
|
|
- project: 'freedesktop/ci-templates'
|
|
ref: master
|
|
file: '/templates/fedora.yml'
|
|
|
|
variables:
|
|
extends: .libfprint_common_variables
|
|
FDO_DISTRIBUTION_TAG: latest
|
|
FDO_DISTRIBUTION_VERSION: rawhide
|
|
FDO_UPSTREAM_REPO: "libfprint/$CI_PROJECT_NAME"
|
|
FEDORA_IMAGE: "$CI_REGISTRY/libfprint/$CI_PROJECT_NAME/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
|
|
DEPENDENCIES: dbus-glib-devel
|
|
gcc
|
|
gcovr
|
|
gettext
|
|
git
|
|
glibc-devel
|
|
gtk-doc
|
|
libasan
|
|
libfprint-devel
|
|
meson
|
|
patch
|
|
pam-devel
|
|
polkit-devel
|
|
python3-dbusmock
|
|
python3-libpamtest
|
|
systemd-devel
|
|
|
|
image: "$FEDORA_IMAGE"
|
|
|
|
workflow:
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
|
- if: $CI_PIPELINE_SOURCE == 'push'
|
|
- if: $CI_PIPELINE_SOURCE == 'schedule'
|
|
- if: $CI_PROJECT_NAMESPACE == 'libfprint' && $FPRINT_CRON_TASK != ''
|
|
|
|
stages:
|
|
- check-source
|
|
- build
|
|
- test
|
|
|
|
.fprintd_build_preconditions_rules:
|
|
- if: $FPRINT_CRON_TASK == "BUILD_CI_IMAGES"
|
|
when: never
|
|
- when: on_success
|
|
|
|
.fprintd_build_preconditions:
|
|
rules: !reference [.fprintd_build_preconditions_rules]
|
|
|
|
.install_libfprint_dev:
|
|
before_script:
|
|
# Make sure we don't build or link against the system libfprint
|
|
- dnf remove -y libfprint-devel
|
|
- git clone https://gitlab.freedesktop.org/libfprint/libfprint.git
|
|
- meson setup libfprint/_build libfprint --prefix=/usr -Ddrivers=virtual_image,virtual_device,virtual_device_storage -Ddoc=false
|
|
- meson compile -C libfprint/_build
|
|
- meson install -C libfprint/_build
|
|
# So we don't get error about this libfprint file
|
|
- echo "libfprint/demo/gtk-libfprint-test.ui" >> po/POTFILES.skip
|
|
|
|
test_indent:
|
|
stage: check-source
|
|
extends: .fprintd_build_preconditions
|
|
script:
|
|
- scripts/uncrustify.sh
|
|
- git diff
|
|
- "! git status -s | grep -q ."
|
|
|
|
build_stable:
|
|
extends: .fprintd_build_preconditions
|
|
stage: build
|
|
allow_failure: true
|
|
script:
|
|
- meson _build
|
|
- meson compile -C _build -v
|
|
- meson install -C _build
|
|
|
|
build_dev:
|
|
extends:
|
|
- .fprintd_build_preconditions
|
|
- .install_libfprint_dev
|
|
stage: build
|
|
script:
|
|
- meson setup _build --werror -Dgtk_doc=true
|
|
- meson compile -C _build -v
|
|
- meson install -C _build
|
|
- meson compile -C _build fprintd-pot -v
|
|
artifacts:
|
|
name: log
|
|
when: on_failure
|
|
paths:
|
|
- _build/meson-logs/*.txt
|
|
|
|
update_potfile_dev:
|
|
extends:
|
|
- .fprintd_build_preconditions
|
|
- .install_libfprint_dev
|
|
stage: build
|
|
rules:
|
|
- if: '$CI_PROJECT_PATH != "libfprint/fprintd"'
|
|
when: never
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
when: never
|
|
- if: '$CI_COMMIT_BRANCH != "master"'
|
|
when: never
|
|
- !reference [.fprintd_build_preconditions_rules]
|
|
script:
|
|
- meson setup _build
|
|
- meson compile -C _build fprintd-pot -v
|
|
- git config --global user.email "${GITLAB_USER_EMAIL}"
|
|
- git config --global user.name "${GITLAB_USER_NAME}"
|
|
- git remote set-url --push origin
|
|
"https://gitlab-ci-token:${FPRINTD_GITLAB_PUSH_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
|
|
- if git diff --exit-code --ignore-matching-lines=POT-Creation-Date po/fprintd.pot; then exit 0; fi
|
|
- git add po/fprintd.pot
|
|
- 'git commit -m "po/fprintd.pot: Update via pipeline $CI_PIPELINE_ID"'
|
|
- git push origin HEAD:refs/heads/master -o ci.skip
|
|
artifacts:
|
|
name: log
|
|
when: on_failure
|
|
paths:
|
|
- _build/meson-logs/*.txt
|
|
|
|
test_dev:
|
|
extends:
|
|
- .fprintd_build_preconditions
|
|
- .install_libfprint_dev
|
|
stage: test
|
|
script:
|
|
- meson setup _build -Db_coverage=true
|
|
- meson test -C _build --print-errorlogs --no-stdsplit --timeout-multiplier 3
|
|
- meson compile -C _build coverage || true
|
|
- cat _build/meson-logs/coverage.txt || true
|
|
artifacts:
|
|
expose_as: 'Coverage Report'
|
|
paths:
|
|
- _build/meson-logs
|
|
- _build/meson-logs/coveragereport/index.html
|
|
expire_in: 1 week
|
|
|
|
test_dev_with_sanitizer:
|
|
extends:
|
|
- .fprintd_build_preconditions
|
|
- .install_libfprint_dev
|
|
stage: test
|
|
script:
|
|
- meson setup _build -Db_sanitize=address
|
|
- meson test -C _build --print-errorlogs --no-stdsplit --timeout-multiplier 5
|
|
artifacts:
|
|
name: meson-logs
|
|
when: on_failure
|
|
paths:
|
|
- _build/meson-logs
|
|
|
|
# CONTAINERS creation stage
|
|
container_fedora_build:
|
|
extends: .fdo.container-build@fedora
|
|
only:
|
|
variables:
|
|
- $FPRINT_CRON_TASK == "BUILD_CI_IMAGES"
|
|
variables:
|
|
GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
|
|
FDO_FORCE_REBUILD: 1
|
|
# a list of packages to install
|
|
FDO_DISTRIBUTION_PACKAGES:
|
|
$DEPENDENCIES
|
|
$LIBFPRINT_DEPENDENCIES
|