summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2021-01-08 14:33:56 +1000
committerSergey Udaltsov <sergey.udaltsov@gmail.com>2021-01-18 10:58:58 +0000
commit5dc9b48c9b31de9f9780887a79ded3b1e52591d9 (patch)
treed1482f67a6baeb6019d03bc4a58e2a20d1b03552 /.gitlab-ci.yml
parenta9639617582bfc6ce81d9553d92dbea2ae80e061 (diff)
downloadxkeyboard-config-5dc9b48c9b31de9f9780887a79ded3b1e52591d9.tar.gz
gitlab CI: generate the evdev keycodes
The various <I123> keycodes in keycodes/evdev simply match the kernel defines + offset 8. There is no need to maintain these manually, let's generate them instead. Keycodes update rarely and irregularly (on average maybe every second kernel release) so there's no need to integrate this into the build itself, let's add it to our CI instead. The script here uses python-libevdev which has a list of the various key codes and their names (compile-time built-in in libevdev itself so it's advisable that a recent libevdev is used). The script is hooked up to a custom job that will fail if there are key codes with a #define in the kernel that are not listed in our evdev file. We allow that job to fail, it's not that urgent to prevent any other pipelines. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml20
1 files changed, 18 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ebfc498..7ef2fe2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,7 +23,7 @@ variables:
# Changing the tag will rebuild the container images. The value is just a
# string, but we use the date for human benefits.
- FDO_DISTRIBUTION_TAG: '2020-11-06.0'
+ FDO_DISTRIBUTION_TAG: '2021-01-08.0'
stages:
@@ -43,7 +43,7 @@ container-prep:
# minimal set of packages required to build xkeyboard-config.
BASE_PACKAGES: 'xorg-util-macros autoconf automake make gettext pkg-config gcc grep m4 python meson ninja git'
# extra packages we need for various tests
- EXTRA_PACKAGES: 'tree libxml2 bison xorg-xkbcomp python-pytest'
+ EXTRA_PACKAGES: 'tree libxml2 bison xorg-xkbcomp python-pytest python-libevdev'
FDO_DISTRIBUTION_PACKAGES: $BASE_PACKAGES $EXTRA_PACKAGES
@@ -161,6 +161,22 @@ meson_from_tarball:
TARBALL: "xkeyboard-config-master.tar.bz2"
GIT_STRATEGY: none
+# Checks for new evdev keycodes to be added to keycodes/evdev
+evdev keycode check:
+ extends:
+ - .default_setup
+ stage: test
+ script:
+ - .gitlab-ci/generate-evdev-keycodes.py --verbose --compare-with ./keycodes/evdev --template ./keycodes/evdev.in --output keycodes/evdev || (echo "keycodes/evdev file needs to be updated" && false)
+ allow_failure: true
+ artifacts:
+ when: on_failure
+ name: Updated evdev keycodes
+ expire_in: 2 weeks
+ paths:
+ - keycodes/evdev
+ needs: ['container-prep']
+
xmllint:
extends:
- .default_setup