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-02-16 16:16:32 +0000
commit4265882fd2293cebea4980f7df0f2c53357bf78b (patch)
treed14e35498481a418332976d88ebbeb09ad08a7c1 /.gitlab-ci.yml
parent6307c44a2d813350d90183f426de2174e3a4d6e3 (diff)
gitlab CI: generate the evdev keycodes (v2)
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 block any merge requests. Changes to v1, see commit 5dc9b48c and its revert 8fa3b314: - Parse the template for existing defines and alias those keys. e.g. alias <I121> = <MUTE>; - Kernel v5.10 keycodes are now included in the file - The script defaults to the correct template/keycode file, no commandline arguments needed for the default run. 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 21a63761..d6e96844 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
@@ -162,6 +162,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 || (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