Commit graph

72 commits

Author SHA1 Message Date
Peter Hutterer
61600a6577 CI: run clang-format to make sure the coding style is correct
Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/390>
2026-05-13 10:05:50 +10:00
Peter Hutterer
aa5571ec08 CI: drop the ci-fairy check-mr job
The only thing this checked was the checkbox for allowing maintainers to
edit the MR. Changed permissions checks now fail this job but luckily
the setting it checked has been the default for years anyway so we can
drop it.

https://gitlab.freedesktop.org/freedesktop/ci-templates/-/issues/81

Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/376>
2026-02-17 06:18:06 +00:00
Peter Hutterer
2671079754 doc: drop the special sha for the hugo theme, update hugo instead
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>
2025-08-28 14:35:59 +10:00
Peter Hutterer
b2484c00d0 CI: bump to Fedora 42 and latest ci-templates
Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/333>
2025-05-19 16:11:49 +10:00
Peter Hutterer
6068f3b14c CI: drop the python-black naming from the ruff job
Fixes: 0770fec433 ("Drop black, switch to ruff format")
Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/325>
2025-02-03 13:13:59 +10:00
Peter Hutterer
cdec01dacd CI: force all auto features to enabled
Since we will automatically disable bits if required dependencies
aren't present let's make sure at least our CI complains.

Closes #70

Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/319>
2024-12-10 05:06:49 +00:00
Peter Hutterer
504afdea4a test: drop the use of attr
All our uses can be done with dataclasses so we don't need an external
package.

Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/319>
2024-12-10 05:06:49 +00:00
Peter Hutterer
247b6acd3c meson.build: allow disabling libei and libeis
This is primarily a development feature because it makes it easier to
develop a new feature for just one library without having to worry
about build errors in the other library (e.g. when new protocol parts
are added).

Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/310>
2024-12-02 00:23:14 +00:00
Peter Hutterer
0770fec433 Drop black, switch to ruff format 2024-10-17 16:18:51 +10:00
Peter Hutterer
dbc06510a1 scanner: switch to using dataclasses
This drops one dependency that we're not fully using anyway. Except for
the per-attribute validators that can be done in __post_init() we're not
using attrs for anything that dataclasses cannot do.
2024-09-12 00:39:09 +00:00
Peter Hutterer
b67cdba809 CI: avoid duplicate pipelines 2024-08-01 11:56:23 +10:00
Peter Hutterer
9ee399c8be CI: Lock hugo to v0.111 to allow for distro updates
F40 now ships v0.121 which again breaks something in the relearn theme
so let's lock our version here to one we know works and move on with
life. I can't be bothered to relearn hugo and themes every few months
just for a single static website.
2024-07-24 17:39:04 +10:00
Peter Hutterer
870123f54b CI: move the minium meson version job to debian
See 55e5deedd8 where this job was removed.
2023-12-14 10:44:54 +10:00
Peter Hutterer
eaed3883d8 CI: fix a hardcoded fedora and replace it with the jinja var 2023-12-14 10:44:54 +10:00
Peter Hutterer
97d66604fb CI: drop the git depth for the ABI check job
We need to make sure that we can checkout whichever sha was the last ABI
break.
2023-12-14 10:41:19 +10:00
Peter Hutterer
55e5deedd8 ci: bump to use F39
And drop the job to test the minimum meson version in the process. F39
ships with python 3.12 which causes this error with meson 0.56.0

proto/meson.build:17:0: ERROR: <ExternalProgram 'python3' -> ['/usr/bin/python3']> is not a valid python or it is missing setuptools

We could put the effort into setting up the CI to fix this, but we
won't.
2023-12-13 17:55:16 +10:00
Peter Hutterer
3f768ecbfc CI: add missing dependencies line 2023-10-11 13:31:47 +10:00
Peter Hutterer
b8884770f1 CI: add a separate job for the documentation build
The pages job is only run once we push to main, so any issues with the
documentation build won't be picked up until it's too late. Split those
up and build the doc in a separate job, the pages job simply takes the
artifacts from that job and publishes them.
2023-10-11 12:25:53 +10:00
Peter Hutterer
1bac0c28b4 CI: update the commit for the last ABI break
abe85e051 stopped the symbol leaks which will look like an ABI break.
2023-08-31 13:30:36 +10:00
Peter Hutterer
a9edea65ca ci: add a check that our event values cannot diverge
See commit 168de89a "eis: sync event codes with libei", this script
should've prevented that issue.
2023-06-07 14:36:00 +10:00
Peter Hutterer
2d6b11833b CI: remove a copy/pasted MESON_ARGS from the abicheck job 2023-06-07 14:28:04 +10:00
Peter Hutterer
1cf9412990 CI: fix the ABI check job, it was using the wrong HEAD
The ABI job git cloned from upstream and then compared HEAD with the
last ABI break. Problem though: the HEAD was origin/main, not the actual
HEAD from the merge request.

Fix this by adding upstream as a remote and fetching from it. And while
we're there update to the last ABI break commit sha and move the
abicheck bits into before_script.

Note that the remote has the CI job ID appended, this avoids conflicts
when the git repo is re-used betweenn jobs and the upstream remote
already exists.
2023-06-06 10:31:57 +10:00
Peter Hutterer
95366ea131 CI: use meson setup in the abi check job 2023-06-06 10:16:25 +10:00
Peter Hutterer
016072507e CI: add a build test for our minimum meson version
Since meson is installed from pip, we'll use the latest stable version
when we build an image. Add an extra job with the fixed minimum version
so we ensure we actually build with that version.
2023-05-24 08:16:43 +10:00
Peter Hutterer
82e8f20fff CI: clone the upstream repo for the abidiff job
The forked repo may not have the latest tags. And we only need to run
this on MRs, no point ABI-diffing on every push.
2023-05-19 14:49:17 +10:00
Peter Hutterer
4184e37442 CI: add an abidiff job 2023-05-18 23:00:43 +00:00
Peter Hutterer
92b002a013 CI: move the pip package list into the config.yml file as well 2023-05-18 12:07:19 +10:00
Peter Hutterer
ade03d5245 CI: install meson and ninja from pip
Let's keep testing against the most recent stable meson/ninja releases.
2023-05-18 12:05:59 +10:00
Peter Hutterer
5aad9fd777 scanner: add the protocol name so we can compile some #defines
The protocol name on an interface is a fixed string that is part of
the ABI since it's used in a few messages (e.g.
ei_handshake.interface_version). To avoid typos, let's expose that
string in the scanner and #define it in the generated sources.
2023-04-06 13:57:20 +10:00
Peter Hutterer
1bc04bffa8 CI: add new workflow rules
Required for pipelines to run after some infrastructure changes, see
See https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438
2023-03-15 09:47:14 +10:00
Peter Hutterer
940f2778a9 CI: bump to the latest ci templates
This version includes a fix for ci-fairy to handle the trailing newlines
in a more predictable manner.
2023-03-13 08:51:52 +10:00
Peter Hutterer
4ac13ac7a7 CI: fix the doxygen path
Adding the mkdir means we copy into that directory.
2023-03-07 15:26:36 +10:00
Peter Hutterer
8fad365f37 doc: split protocol and api builds into separate meson options 2023-03-07 15:26:36 +10:00
Peter Hutterer
2cf6df9cd0 meson: hook up the protocol documentation via meson
Since we want the generated documentation to be useful on-disk, drop the
baseURL and switch to relativeURLs = true for hugo.

This is arguably a bit nasty in that it git clones the theme into the
build directory. But oh well...
2023-03-07 14:14:58 +10:00
Peter Hutterer
30aab5179e Merge branch 'main' into wip/drop-protobuf 2023-03-07 12:55:18 +10:00
Peter Hutterer
449d808b42 CI: always run the tests
Embarassingly, only the valgrind test would actually run tests because
it was the only one with a non-null MESON_TEST_ARGS. Let's fix this by
explicitly telling the build script to run the tests.
2023-03-07 11:57:46 +10:00
Peter Hutterer
717900f6fe Generate the protocol documentation in gitlab pages 2023-03-03 15:24:42 +10:00
Peter Hutterer
bbc64b2eff CI: explicitly add ei-proto to the ruff check 2023-03-03 11:27:01 +10:00
Peter Hutterer
312ce6723b CI: run pytest as separate job
Because we currently only run the test suite in valgrind, we skip the
python test suite there (we don't want to valgrind python itself, too
messy).

Fix this by specifically excluding the python test suite and having a
separate job that just runs that suite instead.

And because the protocol test suite needs the directory to the
eis-demo-server and isn't smart enough to split spaces correctly, let's
change the builddir to just that.
2023-03-03 11:27:01 +10:00
Peter Hutterer
3fa396c012 test: add a framework for doing protocol tests directly
This tests the protocol layer which is hard to test using libei/libeis.
Similar to the generated C bindings we compile a eiproto.py file that is
then used in the test to talk protocol directly to the eis-demo-server
that we start up.

By sending the specific messages and checking things happen as we expect
on the socket we can verify that the EIS implementation is correct (and
robust enough).

In theory this could also be used to test some other binary with an EIS
implementation and the scaffolding is there to set LIBEI_TEST_SERVER to
that binary. Wether this works is untested though...
2023-03-03 11:27:01 +10:00
Peter Hutterer
e5948856bf CI: explicitly add the ei-scanner to the Python Black run
Without the file ending in .py, it won't be checked anymore.
2023-03-03 11:27:01 +10:00
Peter Hutterer
6096a20964 CI: fix typo in the package list
Fixes 1153368946
2023-02-15 16:14:59 +10:00
Peter Hutterer
83f3789954 CI: add a python linter job with Ruff
Same-ish as Flake8 but faster, let's see how that goes.
2023-02-15 09:19:03 +10:00
Peter Hutterer
90f450787a CI: use the ci-fairy image and a venv for the black job
The venv is needed now because black now requires a newer 'packaging'
and fails to installed with:
   ERROR: Cannot uninstall 'packaging'. It is a distutils installed
   project and thus we cannot accurately determine which files belong to
   it which would lead to only a partial uninstall.

So let's use a venv and while we're doing this switch to use the
ci-fairy image so we don't need to worry about docker limits.
2023-02-15 09:17:45 +10:00
Peter Hutterer
fe337d9866 CI: the check-commit and check-merge-request should use the ci-fairy image 2023-02-15 09:09:20 +10:00
Peter Hutterer
1153368946 CI: move the package list to the config.yml file
Using templates for our CI is a bit of overkill but while we have it,
let's make use of it.
2023-02-15 08:23:56 +10:00
Peter Hutterer
642e258ecb Format python files with black
And set up a gitlab ci job to check that
2023-02-01 11:48:53 +10:00
Peter Hutterer
857735fe7f gitlab-ci: add one more explanatory comment
Just so the CI is a bit easier to understand
2023-01-06 10:23:51 +10:00
Peter Hutterer
fde1424a42 gitlab CI: move default_artefacts to the default build template
No point having this as a separate template when the default build
template controls how things are built...
2023-01-06 10:04:01 +10:00
Peter Hutterer
19b4320594 gitlab CI: switch the ci-fairy job to the fdo ci-fairy image 2023-01-06 10:04:01 +10:00