mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2026-05-05 13:28:00 +02:00
CI: replace b2c with virtme-ng
See equivalent commit 7915921a3c334d0e5a16424ab6a444c238748a35 in libinput. Part-of: <https://gitlab.freedesktop.org/libevdev/libevdev/-/merge_requests/133>
This commit is contained in:
parent
608e2f6a0f
commit
ce52ae60ad
4 changed files with 52 additions and 112 deletions
|
|
@ -75,37 +75,37 @@ variables:
|
||||||
.fedora:43:
|
.fedora:43:
|
||||||
extends: .fdo.distribution-image@fedora
|
extends: .fdo.distribution-image@fedora
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_TAG: '2026-01-16.1'
|
FDO_DISTRIBUTION_TAG: '2026-02-24.1'
|
||||||
FDO_DISTRIBUTION_VERSION: '43'
|
FDO_DISTRIBUTION_VERSION: '43'
|
||||||
|
|
||||||
.ubuntu:25.10:
|
.ubuntu:25.10:
|
||||||
extends: .fdo.distribution-image@ubuntu
|
extends: .fdo.distribution-image@ubuntu
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_TAG: '2026-01-16.1'
|
FDO_DISTRIBUTION_TAG: '2026-02-24.1'
|
||||||
FDO_DISTRIBUTION_VERSION: '25.10'
|
FDO_DISTRIBUTION_VERSION: '25.10'
|
||||||
|
|
||||||
.debian:stable:
|
.debian:stable:
|
||||||
extends: .fdo.distribution-image@debian
|
extends: .fdo.distribution-image@debian
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_TAG: '2026-01-16.1'
|
FDO_DISTRIBUTION_TAG: '2026-02-24.1'
|
||||||
FDO_DISTRIBUTION_VERSION: 'stable'
|
FDO_DISTRIBUTION_VERSION: 'stable'
|
||||||
|
|
||||||
.debian:sid:
|
.debian:sid:
|
||||||
extends: .fdo.distribution-image@debian
|
extends: .fdo.distribution-image@debian
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_TAG: '2026-01-16.1'
|
FDO_DISTRIBUTION_TAG: '2026-02-24.1'
|
||||||
FDO_DISTRIBUTION_VERSION: 'sid'
|
FDO_DISTRIBUTION_VERSION: 'sid'
|
||||||
|
|
||||||
.arch:rolling:
|
.arch:rolling:
|
||||||
extends: .fdo.distribution-image@arch
|
extends: .fdo.distribution-image@arch
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_TAG: '2026-01-16.1'
|
FDO_DISTRIBUTION_TAG: '2026-02-24.1'
|
||||||
FDO_DISTRIBUTION_VERSION: 'rolling'
|
FDO_DISTRIBUTION_VERSION: 'rolling'
|
||||||
|
|
||||||
.alpine:latest:
|
.alpine:latest:
|
||||||
extends: .fdo.distribution-image@alpine
|
extends: .fdo.distribution-image@alpine
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_TAG: '2026-01-16.1'
|
FDO_DISTRIBUTION_TAG: '2026-02-24.1'
|
||||||
FDO_DISTRIBUTION_VERSION: 'latest'
|
FDO_DISTRIBUTION_VERSION: 'latest'
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -170,7 +170,7 @@ check-merge-request:
|
||||||
|
|
||||||
.fedora.packages:
|
.fedora.packages:
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_PACKAGES: 'git gcc gcc-c++ meson automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils doxygen xz clang-analyzer systemd-udev qemu-img qemu-system-x86-core qemu-system-aarch64-core jq python3-click python3-rich'
|
FDO_DISTRIBUTION_PACKAGES: 'git gcc gcc-c++ meson automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils doxygen xz clang-analyzer systemd-udev qemu-img qemu-system-x86-core qemu-system-aarch64-core jq python3-click python3-rich virtme-ng file'
|
||||||
|
|
||||||
.ubuntu.packages:
|
.ubuntu.packages:
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -566,41 +566,45 @@ soname:
|
||||||
exit 1 ;
|
exit 1 ;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build on the host, then run a systemd service to execute the test suite
|
# Run meson and meson test in the container image through qemu
|
||||||
# inside the qemu VM handled by b2c
|
.build-in-vng@template:
|
||||||
.build-in-b2c@template:
|
|
||||||
extends:
|
extends:
|
||||||
- .default_artifacts
|
- .default_artifacts
|
||||||
tags:
|
|
||||||
- kvm
|
|
||||||
variables:
|
variables:
|
||||||
MESON_BUILDDIR: build_dir
|
MESON_BUILDDIR: build_dir
|
||||||
B2C_KERNEL: https://gitlab.freedesktop.org/api/v4/projects/libevdev%2Fhid-tools/packages/generic/kernel-x86_64/v6.5/bzImage
|
VNG_KERNEL: https://gitlab.freedesktop.org/api/v4/projects/libevdev%2Fhid-tools/packages/generic/kernel-x86_64/v6.14/bzImage
|
||||||
B2C_IMAGE: $FDO_DISTRIBUTION_IMAGE
|
|
||||||
B2C_COMMAND: .gitlab-ci/start-in-systemd.sh
|
|
||||||
script:
|
script:
|
||||||
# first build in the host container
|
# first build in the host container
|
||||||
- .gitlab-ci/meson-build.sh --skip-test
|
- .gitlab-ci/meson-build.sh --skip-test
|
||||||
|
|
||||||
# pull b2c
|
- mkdir -p $MESON_BUILDDIR
|
||||||
- curl -L -o /app/boot2container https://gitlab.freedesktop.org/gfx-ci/boot2container/-/raw/2ff65156ba67fa8a0c309a4fc16c5df1a88a3844/vm2c.py
|
- curl -LO $VNG_KERNEL
|
||||||
- chmod +x /app/boot2container
|
|
||||||
|
- export -p > .vngenv
|
||||||
|
|
||||||
# runs the test suite only
|
# runs the test suite only
|
||||||
- /app/boot2container
|
- |
|
||||||
|
vng --run ./bzImage \
|
||||||
|
--user root \
|
||||||
|
--overlay-rwdir=$HOME \
|
||||||
|
--append HOME=$HOME \
|
||||||
|
--overlay-rwdir=$(pwd) \
|
||||||
|
--rwdir=$MESON_BUILDDIR \
|
||||||
|
--exec "source $PWD/.vngenv; rm $PWD/.vngenv; .gitlab-ci/meson-build.sh --skip-setup --skip-build --run-test"
|
||||||
|
|
||||||
b2c:meson:
|
|
||||||
|
vng:meson:
|
||||||
stage: VM
|
stage: VM
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .fdo.distribution-image@fedora
|
||||||
- .fedora:43
|
- .fedora:43
|
||||||
- .build-in-b2c@template
|
- .build-in-vng@template
|
||||||
needs:
|
needs:
|
||||||
- "fedora:43@container-prep"
|
- "fedora:43@container-prep"
|
||||||
|
|
||||||
b2c:meson:valgrind:
|
vng:meson:valgrind:
|
||||||
extends:
|
extends:
|
||||||
- b2c:meson
|
- vng:meson
|
||||||
variables:
|
variables:
|
||||||
MESON_TEST_ARGS: '--setup=valgrind'
|
MESON_TEST_ARGS: '--setup=valgrind'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -393,43 +393,47 @@ soname:
|
||||||
exit 1 ;
|
exit 1 ;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build on the host, then run a systemd service to execute the test suite
|
# Run meson and meson test in the container image through qemu
|
||||||
# inside the qemu VM handled by b2c
|
.build-in-vng@template:
|
||||||
.build-in-b2c@template:
|
|
||||||
extends:
|
extends:
|
||||||
- .default_artifacts
|
- .default_artifacts
|
||||||
tags:
|
|
||||||
- kvm
|
|
||||||
variables:
|
variables:
|
||||||
MESON_BUILDDIR: build_dir
|
MESON_BUILDDIR: build_dir
|
||||||
B2C_KERNEL: {{ b2c.kernel }}
|
VNG_KERNEL: {{ vng.kernel }}
|
||||||
B2C_IMAGE: $FDO_DISTRIBUTION_IMAGE
|
|
||||||
B2C_COMMAND: .gitlab-ci/start-in-systemd.sh
|
|
||||||
script:
|
script:
|
||||||
# first build in the host container
|
# first build in the host container
|
||||||
- .gitlab-ci/meson-build.sh --skip-test
|
- .gitlab-ci/meson-build.sh --skip-test
|
||||||
|
|
||||||
# pull b2c
|
- mkdir -p $MESON_BUILDDIR
|
||||||
- curl -L -o /app/boot2container https://gitlab.freedesktop.org/gfx-ci/boot2container/-/raw/{{b2c.version}}/vm2c.py
|
- curl -LO $VNG_KERNEL
|
||||||
- chmod +x /app/boot2container
|
|
||||||
|
- export -p > .vngenv
|
||||||
|
|
||||||
# runs the test suite only
|
# runs the test suite only
|
||||||
- /app/boot2container
|
- |
|
||||||
|
vng --run ./bzImage \
|
||||||
|
--user root \
|
||||||
|
--overlay-rwdir=$HOME \
|
||||||
|
--append HOME=$HOME \
|
||||||
|
--overlay-rwdir=$(pwd) \
|
||||||
|
--rwdir=$MESON_BUILDDIR \
|
||||||
|
--exec "source $PWD/.vngenv; rm $PWD/.vngenv; .gitlab-ci/meson-build.sh --skip-setup --skip-build --run-test"
|
||||||
|
|
||||||
{% for distro in distributions if distro.use_for_qemu_tests %}
|
{% for distro in distributions if distro.use_for_qemu_tests %}
|
||||||
{% set version = "{}".format(distro.versions|last()) %}
|
{% set version = "{}".format(distro.versions|last()) %}
|
||||||
b2c:meson:
|
|
||||||
|
vng:meson:
|
||||||
stage: VM
|
stage: VM
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@{{distro.name}}
|
- .fdo.distribution-image@{{distro.name}}
|
||||||
- .{{distro.name}}:{{version}}
|
- .{{distro.name}}:{{version}}
|
||||||
- .build-in-b2c@template
|
- .build-in-vng@template
|
||||||
needs:
|
needs:
|
||||||
- "{{distro.name}}:{{version}}@container-prep"
|
- "{{distro.name}}:{{version}}@container-prep"
|
||||||
|
|
||||||
b2c:meson:valgrind:
|
vng:meson:valgrind:
|
||||||
extends:
|
extends:
|
||||||
- b2c:meson
|
- vng:meson
|
||||||
variables:
|
variables:
|
||||||
MESON_TEST_ARGS: '--setup=valgrind'
|
MESON_TEST_ARGS: '--setup=valgrind'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# We're happy to rebuild all containers when one changes.
|
# We're happy to rebuild all containers when one changes.
|
||||||
.default_tag: &default_tag '2026-01-16.1'
|
.default_tag: &default_tag '2026-02-24.1'
|
||||||
|
|
||||||
distributions:
|
distributions:
|
||||||
- name: fedora
|
- name: fedora
|
||||||
|
|
@ -38,6 +38,8 @@ distributions:
|
||||||
- jq
|
- jq
|
||||||
- python3-click
|
- python3-click
|
||||||
- python3-rich
|
- python3-rich
|
||||||
|
- virtme-ng
|
||||||
|
- file
|
||||||
- name: ubuntu
|
- name: ubuntu
|
||||||
tag: *default_tag
|
tag: *default_tag
|
||||||
versions:
|
versions:
|
||||||
|
|
@ -120,6 +122,5 @@ distributions:
|
||||||
- linux-headers
|
- linux-headers
|
||||||
- tar
|
- tar
|
||||||
|
|
||||||
b2c:
|
vng:
|
||||||
version: 2ff65156ba67fa8a0c309a4fc16c5df1a88a3844
|
kernel: https://gitlab.freedesktop.org/api/v4/projects/libevdev%2Fhid-tools/packages/generic/kernel-x86_64/v6.14/bzImage
|
||||||
kernel: https://gitlab.freedesktop.org/api/v4/projects/libevdev%2Fhid-tools/packages/generic/kernel-x86_64/v6.5/bzImage
|
|
||||||
|
|
|
||||||
|
|
@ -1,69 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
systemd_target=basic.target
|
|
||||||
post_command="/usr/bin/systemctl exit \$EXIT_STATUS"
|
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
|
||||||
case $1 in
|
|
||||||
--debug-mode)
|
|
||||||
shift
|
|
||||||
systemd_target=multi-user.target
|
|
||||||
post_command="echo you can now log in as root (no password) and then turn off by running \'/usr/bin/systemctl exit \$EXIT_STATUS\'"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknow commandline argument $1"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
WORKDIR=${FDO_DISTRIBUTION_WORKINGDIR:-$PWD}
|
|
||||||
B2C_WORKDIR=${FDO_B2C_WORKDIR:-/app}
|
|
||||||
|
|
||||||
# remove root password for debugging
|
|
||||||
sed -i 's/root:!locked::/root:::/' /etc/shadow
|
|
||||||
|
|
||||||
# create a libevdev test suite service
|
|
||||||
cat <<EOF > /etc/systemd/system/libevdev-testsuite.service
|
|
||||||
|
|
||||||
[Unit]
|
|
||||||
Description=libevdev test suite
|
|
||||||
After=$systemd_target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
StandardOutput=journal+console
|
|
||||||
EnvironmentFile=$B2C_WORKDIR/.b2c_env
|
|
||||||
WorkingDirectory=$WORKDIR
|
|
||||||
ExecStart=$WORKDIR/.gitlab-ci/meson-build.sh --skip-setup --skip-build --run-test
|
|
||||||
|
|
||||||
# exit the container on termination
|
|
||||||
ExecStopPost=$post_command
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=default.target
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat /etc/systemd/system/libevdev-testsuite.service
|
|
||||||
|
|
||||||
# enable the service
|
|
||||||
systemctl enable libevdev-testsuite.service
|
|
||||||
|
|
||||||
# disable some services we don't need in the CI
|
|
||||||
systemctl mask network-online.target
|
|
||||||
systemctl mask network-pre.target
|
|
||||||
systemctl mask timers.target
|
|
||||||
systemctl mask dnf-makecache.timer
|
|
||||||
systemctl mask systemd-logind.service
|
|
||||||
systemctl mask rpmdb-migrate.service
|
|
||||||
systemctl mask systemd-network-generator.service
|
|
||||||
systemctl mask cryptsetup-pre.target
|
|
||||||
systemctl mask cryptsetup.target
|
|
||||||
|
|
||||||
#change default target
|
|
||||||
systemctl set-default $systemd_target
|
|
||||||
|
|
||||||
# start the system
|
|
||||||
exec /usr/sbin/init
|
|
||||||
Loading…
Add table
Reference in a new issue