mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-20 02:10:08 +01:00
The special sha is no longer needed, let's bump to a recent version of
hugo instead and that should make it all work nicely (for a while).
Updating hugo requires changing to hugo.toml and forcing mermaid to be
enabled, without those changes the build failed with
`failed to extract shortcode: template for shortcode "mermaid" not found`
This reverts commit 5909717700
Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/358>
411 lines
11 KiB
YAML
411 lines
11 KiB
YAML
# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml:
|
|
|
|
########################################
|
|
# #
|
|
# THIS FILE IS GENERATED, DO NOT EDIT #
|
|
# #
|
|
########################################
|
|
|
|
.templates_sha: &template_sha c6aeb16f86e32525fa630fb99c66c4f3e62fc3cb
|
|
|
|
include:
|
|
- project: 'freedesktop/ci-templates'
|
|
ref: *template_sha
|
|
file:
|
|
- '/templates/debian.yml'
|
|
- '/templates/fedora.yml'
|
|
- '/templates/ci-fairy.yml'
|
|
|
|
stages:
|
|
- prep # prep work like rebuilding the container images if there is a change
|
|
- build # for actually building and testing things in a container
|
|
- distro # distribs test
|
|
- deploy
|
|
|
|
workflow:
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
|
|
when: never
|
|
- if: $CI_COMMIT_BRANCH
|
|
|
|
variables:
|
|
###############################################################################
|
|
# This is the list of packages required to build libei with the default #
|
|
# configuration. #
|
|
# #
|
|
# Run dnf install/apt-get install/.. with the list of packages for your #
|
|
# distribution #
|
|
# #
|
|
# See the documentation here: #
|
|
# https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html #
|
|
###############################################################################
|
|
FEDORA_PACKAGES: 'git diffutils gcc gcc-c++ pkgconf-pkg-config systemd-devel libxkbcommon-devel libxml2 doxygen python3-pytest python3-dbusmock python3-jinja2 python3-pip python3-pyyaml golang libabigail '
|
|
FEDORA_PIP_PACKAGES: 'meson ninja structlog strenum '
|
|
DEBIAN_PACKAGES: 'git gcc g++ pkg-config libsystemd-dev libxkbcommon-dev libxml2 doxygen python3-pytest python3-dbusmock python3-jinja2 python3-pip python3-yaml '
|
|
DEBIAN_PIP_PACKAGES: 'meson ninja structlog strenum '
|
|
############################ end of package lists #############################
|
|
|
|
# these tags should be updated each time the list of packages is updated
|
|
# changing these will force rebuilding the associated image
|
|
# Note: these tags have no meaning and are not tied to a particular
|
|
# libinput version
|
|
FEDORA_TAG: '2025-05-19.1'
|
|
DEBIAN_TAG: '2025-05-19.1'
|
|
|
|
FDO_UPSTREAM_REPO: libinput/libei
|
|
|
|
MESON_BUILDDIR: "builddir"
|
|
NINJA_ARGS: ''
|
|
MESON_ARGS: '-Dauto_features=enabled'
|
|
MESON_TEST_ARGS: ''
|
|
GIT_DEPTH: 1
|
|
|
|
.policy:
|
|
retry:
|
|
max: 2
|
|
when:
|
|
- runner_system_failure
|
|
- stuck_or_timeout_failure
|
|
# cancel run when a newer version is pushed to the branch
|
|
interruptible: true
|
|
|
|
#################################################################
|
|
# #
|
|
# prep stage #
|
|
# #
|
|
#################################################################
|
|
|
|
fail-if-fork-is-not-public:
|
|
stage: prep
|
|
script:
|
|
- |
|
|
if [ $CI_PROJECT_VISIBILITY != "public" ]; then
|
|
echo "*************************************************************************************"
|
|
echo "Project visibility must be set to 'public'"
|
|
echo "Change this in $CI_PROJECT_URL/edit under 'Visibility, project features, permissions'"
|
|
echo "*************************************************************************************"
|
|
exit 1
|
|
fi
|
|
except:
|
|
- main@libinput/libei
|
|
|
|
# Re-generate the CI script and make sure it's the one currently checked in
|
|
# If this job fails, re-generate the gitlab-ci.yml script, see
|
|
# $SRCDIR/.gitlab-ci/generate-gitlab-ci.py
|
|
#
|
|
check-ci-script:
|
|
extends:
|
|
- .fdo.ci-fairy
|
|
stage: prep
|
|
script:
|
|
- ci-fairy generate-template
|
|
- git diff --exit-code && exit 0 || true
|
|
- echo "Committed gitlab-ci.yml differs from generated gitlab-ci.yml. Please verify"
|
|
- exit 1
|
|
|
|
#
|
|
# Verify that commit messages are as expected, signed-off, etc.
|
|
#
|
|
|
|
check-commit:
|
|
extends:
|
|
- .fdo.ci-fairy
|
|
stage: prep
|
|
script:
|
|
- ci-fairy check-commits --junit-xml=results.xml
|
|
except:
|
|
- main@libinput/libei
|
|
variables:
|
|
GIT_DEPTH: 100
|
|
artifacts:
|
|
reports:
|
|
junit: results.xml
|
|
|
|
#
|
|
# Verify that the merge request has the allow-collaboration checkbox ticked
|
|
#
|
|
|
|
check-merge-request:
|
|
extends:
|
|
- .fdo.ci-fairy
|
|
stage: deploy
|
|
script:
|
|
- ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
|
|
artifacts:
|
|
when: on_failure
|
|
reports:
|
|
junit: results.xml
|
|
allow_failure: true
|
|
|
|
# Format anything python with ruff
|
|
#
|
|
python-ruff-format:
|
|
extends:
|
|
- .fdo.ci-fairy
|
|
stage: prep
|
|
before_script:
|
|
- python3 -m venv venv
|
|
- source venv/bin/activate
|
|
- pip3 install ruff
|
|
script:
|
|
- ruff format --check --diff . proto/ei-scanner
|
|
|
|
# Lint with Ruff
|
|
#
|
|
python-ruff:
|
|
extends:
|
|
- .fdo.ci-fairy
|
|
stage: prep
|
|
before_script:
|
|
- python3 -m venv venv
|
|
- source venv/bin/activate
|
|
- pip3 install ruff
|
|
script:
|
|
- ruff check --ignore E741,E501 . proto/ei-scanner
|
|
|
|
#
|
|
# Build distribution-specific images used by the jobs in the build stage
|
|
#
|
|
|
|
fedora:42@container-prep:
|
|
extends:
|
|
- .fdo.container-build@fedora
|
|
- .policy
|
|
stage: prep
|
|
variables:
|
|
GIT_STRATEGY: none
|
|
FDO_DISTRIBUTION_VERSION: '42'
|
|
FDO_DISTRIBUTION_PACKAGES: $FEDORA_PACKAGES
|
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
|
FDO_DISTRIBUTION_EXEC: 'pip install $FEDORA_PIP_PACKAGES'
|
|
|
|
debian:bullseye@container-prep:
|
|
extends:
|
|
- .fdo.container-build@debian
|
|
- .policy
|
|
stage: prep
|
|
variables:
|
|
GIT_STRATEGY: none
|
|
FDO_DISTRIBUTION_VERSION: 'bullseye'
|
|
FDO_DISTRIBUTION_PACKAGES: $DEBIAN_PACKAGES
|
|
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
|
|
FDO_DISTRIBUTION_EXEC: 'pip install $DEBIAN_PIP_PACKAGES'
|
|
|
|
|
|
|
|
#################################################################
|
|
# #
|
|
# build stage #
|
|
# #
|
|
#################################################################
|
|
|
|
.build@template:
|
|
extends:
|
|
- .policy
|
|
stage: build
|
|
script:
|
|
- .gitlab-ci/meson-build.sh --run-test
|
|
artifacts:
|
|
name: "meson-logs-$CI_JOB_NAME"
|
|
when: always
|
|
expire_in: 1 week
|
|
paths:
|
|
- $MESON_BUILDDIR/meson-logs
|
|
reports:
|
|
junit: $MESON_BUILDDIR/meson-logs/.junit.xml
|
|
dependencies: []
|
|
|
|
#
|
|
# Fedora
|
|
#
|
|
|
|
.fedora-build@template:
|
|
extends:
|
|
- .fdo.distribution-image@fedora
|
|
- .build@template
|
|
variables:
|
|
MESON_TEST_ARGS: '--no-suite=python'
|
|
FDO_DISTRIBUTION_VERSION: '42'
|
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
|
needs:
|
|
- "fedora:42@container-prep"
|
|
|
|
default-build-release@fedora:42:
|
|
stage: distro
|
|
extends:
|
|
- .fedora-build@template
|
|
variables:
|
|
MESON_ARGS: "-Dbuildtype=release"
|
|
CFLAGS: "-Werror -Wno-error=vla-parameter" # munit triggers -Wvla-parameter
|
|
|
|
build-no-libxkcommon-nodeps@fedora:42:
|
|
extends:
|
|
- .fedora-build@template
|
|
before_script:
|
|
- dnf remove -y libxkcommon-devel
|
|
|
|
build-no-doxygen@fedora:42:
|
|
extends:
|
|
- .fedora-build@template
|
|
variables:
|
|
MESON_ARGS: "-Ddocumentation=[]"
|
|
before_script:
|
|
- dnf remove -y doxygen
|
|
|
|
build-disable-features@fedora:42:
|
|
extends:
|
|
- .fedora-build@template
|
|
parallel:
|
|
matrix:
|
|
- FEATURE: libei
|
|
- FEATURE: libeis
|
|
- FEATURE: liboeffis
|
|
variables:
|
|
MESON_ARGS: '-D${FEATURE}=disabled'
|
|
|
|
valgrind@fedora:42:
|
|
extends:
|
|
- .fedora-build@template
|
|
variables:
|
|
MESON_TEST_ARGS: '--setup=valgrind'
|
|
before_script:
|
|
- dnf install -y valgrind
|
|
|
|
pytest@fedora:42:
|
|
extends:
|
|
- .fedora-build@template
|
|
variables:
|
|
MESON_TEST_ARGS: '--suite=python'
|
|
|
|
werror@fedora:42:
|
|
extends:
|
|
- .fedora-build@template
|
|
variables:
|
|
MESON_ARGS: '-Dwerror=true'
|
|
allow_failure: true
|
|
|
|
abicheck@fedora:42:
|
|
extends:
|
|
- .fedora-build@template
|
|
before_script:
|
|
- git clone --depth=1 https://gitlab.freedesktop.org/hadess/check-abi
|
|
- |
|
|
pushd check-abi
|
|
meson setup _build
|
|
meson compile -C _build
|
|
meson install -C _build
|
|
popd
|
|
- pip install attrs # required by libei 1.0.0
|
|
script:
|
|
- git remote add upstream$CI_JOB_ID https://gitlab.freedesktop.org/$FDO_UPSTREAM_REPO
|
|
- git fetch --tags upstream$CI_JOB_ID
|
|
- check-abi abe85e051e7029bfd2e7913ab980a9e0042b6d0d $CI_COMMIT_SHA
|
|
only:
|
|
- merge_requests
|
|
|
|
event-type-check@fedora:42:
|
|
extends:
|
|
- .fedora-build@template
|
|
script:
|
|
- .gitlab-ci/meson-build.sh --skip-test
|
|
- .gitlab-ci/check-event-values.py
|
|
variables:
|
|
PKG_CONFIG_PATH: $MESON_BUILDDIR/meson-uninstalled
|
|
only:
|
|
- merge_requests
|
|
|
|
|
|
.debian-build@template:
|
|
extends:
|
|
- .fdo.distribution-image@debian
|
|
- .build@template
|
|
variables:
|
|
MESON_TEST_ARGS: '--no-suite=python'
|
|
FDO_DISTRIBUTION_VERSION: 'bullseye'
|
|
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
|
|
needs:
|
|
- "debian:bullseye@container-prep"
|
|
|
|
minimum-meson@debian:bullseye:
|
|
extends:
|
|
- .debian-build@template
|
|
script:
|
|
- pip uninstall -y meson
|
|
- pip install "meson==0.57.0"
|
|
- .gitlab-ci/meson-build.sh --run-test
|
|
|
|
|
|
#################################################################
|
|
# #
|
|
# distro stage #
|
|
# #
|
|
#################################################################
|
|
|
|
fedora:42@default-build:
|
|
stage: distro
|
|
extends:
|
|
- .build@template
|
|
- .fdo.distribution-image@fedora
|
|
variables:
|
|
FDO_DISTRIBUTION_VERSION: '42'
|
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
|
needs:
|
|
- "fedora:42@container-prep"
|
|
|
|
fedora:42@doc-build:
|
|
stage: distro
|
|
extends:
|
|
- .build@template
|
|
- .fdo.distribution-image@fedora
|
|
variables:
|
|
FDO_DISTRIBUTION_VERSION: '42'
|
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
|
MESON_ARGS: "-Ddocumentation=protocol,api"
|
|
script:
|
|
# Staying up-to-date with the breakages between hugo and the relearn theme is annoying
|
|
# so let's lock the version for our doc build
|
|
- go install "github.com/gohugoio/hugo@v0.142"
|
|
- export PATH="$HOME/go/bin:$PATH"
|
|
- .gitlab-ci/meson-build.sh
|
|
- rm -rf public/
|
|
- mv "$MESON_BUILDDIR"/doc/protocol/ei/public/ public/
|
|
- mv "$MESON_BUILDDIR"/doc/html/ public/api
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
|
|
debian:bullseye@default-build:
|
|
stage: distro
|
|
extends:
|
|
- .build@template
|
|
- .fdo.distribution-image@debian
|
|
variables:
|
|
FDO_DISTRIBUTION_VERSION: 'bullseye'
|
|
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
|
|
needs:
|
|
- "debian:bullseye@container-prep"
|
|
|
|
|
|
|
|
pages:
|
|
stage: deploy
|
|
extends:
|
|
- .build@template
|
|
- .fdo.distribution-image@fedora
|
|
variables:
|
|
FDO_DISTRIBUTION_VERSION: '42'
|
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
|
MESON_ARGS: "-Ddocumentation=protocol,api"
|
|
script:
|
|
- echo "Nothing to do"
|
|
dependencies:
|
|
- "fedora:42@doc-build"
|
|
needs:
|
|
- "fedora:42@doc-build"
|
|
only:
|
|
refs:
|
|
- main
|
|
artifacts:
|
|
paths:
|
|
- public
|