Commit Graph

32 Commits (e325e65eb80c600e789c8d644d9f6ebf59b04dad)

Author SHA1 Message Date
Pierre Le Marre c88fe4b692 keysyms: Add tests with ICU
Added tests of the simple case mappings when the ICU library is
available. A warning is raised for missing mappings.

Note: `xkb_keysym_is_upper` is interpreted as matching the disjunction of the
Unicode character properties “Uppercase” or “Titlecase”.
2024-01-10 15:03:22 +01:00
Ran Benita 6073565903 ci: fix url in github release text
Signed-off-by: Ran Benita <ran@unusedvar.com>
2023-10-08 23:55:38 +03:00
Pierre Le Marre cf228acd26 CI: Use git master for xkeyboard-config on Linux
xkeyboard-config and xkbcommon projects are quite intertwined so we
want things to blow up early.

It also solves an issue with the x11comp test.
2023-09-18 16:07:09 +02:00
Peter Hutterer 0624d8ff49 Check the doxygen version
Doxygen 1.9.7 breaks our urls, see issue #347. Let's put a check for the
doxygen version into our CI build so that if our base distro updates beyond
that, the CI fails and we know we have to build doxygen from scratch or
update to some other version that's supported.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-07-04 14:56:32 +10:00
Peter Hutterer 134c6bb28e Configure github pages
Upload the doxygen output as artifact from the linux build and use that from
the pages job where we combine the static website with our newly build HTML
docs.  The GitHub actions/download-artefact doesn't work across workflows so
we use the other popular one that can do this. The rest of the job is
basically copy/paste from the "Static HTML" example GitHub provides.

To make this useful as drop-in replacement, replace the one fixed link to the
API docs a relative one.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-07-04 14:56:32 +10:00
Pierre Le Marre 2c86216b5b CI: Fix documentation generation for macOS
- Force Doxygen version 1.9.6, because 1.9.7 breaks our doc cool URIs,
  i.e. our system that maintain stable doc pages via redirection.

  Associated issue in Doxygen:
  https://github.com/doxygen/doxygen/issues/10146

- Install graphviz to build the .dot files.
2023-06-26 09:50:01 +02:00
Wismill 64aaa7cda2
Add support for stable doc URLs (#342)
Doc URLs may change with time because they depend on Doxygen machinery.
This is unfortunate because it is good practice to keep valid URLs
(see: https://www.w3.org/Provider/Style/URI.html).

I could not find a built-in solution in Doxygen, so the solution proposed
here is to maintain a registry of all URLs and manage legacy URLs as
redirections to their canonical page.

This commit adds a registry of URLs that has three functions:
- Check no previous URL is now invalid.
- Add aliases for moved pages.
- Generate redirection pages for aliases. The redirection works with
  a simple <meta http-equiv="refresh"> HTML tag. See:
  https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#http-equiv

This commit also initialize the URLs registry with current pages and some
redirections needed after recent documentation refactoring.

Finally, the CI is updated to catch any change that invalidate previous
URLs.
2023-05-14 15:11:15 +02:00
Ran Benita c8efb70406 ci: bump runs-on versions
Mostly to bump to macos one which will hopefully fix CI issues there.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2023-05-12 22:27:17 +03:00
Ran Benita 45ba936bf0 ci/windows: use the vs backend instead of ninja backend
So we have some coverage of that.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2023-05-05 11:17:07 +03:00
Ran Benita 7428eb6e8b ci: don't run linux on push to non-master branches
It's redundant with the pull request run.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2022-12-16 21:36:13 +02:00
Peter Hutterer a005d06c1d CI: bump a few actions to newer versions
Node 12 is deprecated so let's bump the actions to newer versions that
use Node 16. See
https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
2022-12-14 18:22:55 +02:00
Peter Hutterer b309514247 ci/linux: store the test logs as artifacts on failure
This makes debugging a lot easier than having to reproduce locally.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-09-24 10:09:11 +03:00
Peter Hutterer cc0e97e911 ci/linux: split normal testing from valgrind testing
A test case failure usually also triggers valgrind leaks, sifting through those
to find the actual test failure is painful. So let's separate the tests and run
them separately.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-09-24 10:09:11 +03:00
Ran Benita 3d56569ab2 ci/linux: bring back `apt update` to fix `apt install` 404s
Signed-off-by: Ran Benita <ran@unusedvar.com>
2022-03-20 13:51:14 +02:00
Ran Benita 9e7f3ba496 ci: another possible fix for release workflow
Signed-off-by: Ran Benita <ran@unusedvar.com>
2022-02-04 12:59:18 +02:00
Peter Hutterer be68829a6b CI: always run the linux workflow
This makes it easier for contributors to check if their code runs correctly
without having to file a PR.

The Mac and Windows workflows are a bit more involved, so let's keep those on
pull requests only.
2022-01-17 21:44:48 +10:00
Peter Hutterer 121cd37753 CI: split and rename the workflows to windows/macos/linux
"main" is a bit non-descriptive, let's name them after the platforms we run them
on. Splitting them up allows us to be less selective on how we run the various
workflows, e.g. always running the linux one.
2022-01-17 21:44:48 +10:00
Ran Benita ae3b010e62 ci: possible fix for release workflow
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-09-17 00:00:11 +03:00
Ran Benita 1318bedbb7 ci: some tweaks
- Reduce permissions
- Update some stuff

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-22 20:38:37 +03:00
Ran Benita c4fdcba305 ci: also link to tarball in github release
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-22 20:22:56 +03:00
Ran Benita 1f7ffde982 ci: automatically create github release when tag is pushed
Fixes: https://github.com/xkbcommon/libxkbcommon/issues/233
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-22 20:20:12 +03:00
Ran Benita d9a22f29c0 ci: fix windows CI failure due to add-path deprecation
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-11-19 01:31:09 +02:00
Ran Benita db98575327 ci: enable xkbregistry on macos job
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-09-07 22:01:57 +03:00
Ran Benita 4b2a91431b ci: fix windows job not finding bison
Instead of using the unpredictable chocolatey let's just handle it
ourselves. The versions are pinned but that's arguably good.

Fixes https://github.com/xkbcommon/libxkbcommon/issues/179
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-08-31 15:28:38 +03:00
Peter Hutterer cd119a2824 Drop use of ronn, switch to raw roff instead
Drop the ronn source files, check in the generated files instead. This gets rid
of the ruby+gem+ronn toolchain requirement at the cost of having to edit raw man
pages.

ronn files are as-generated but with the preamble and generation date removed.
The latter isn't important enough to keep, it'll just go stale for manually
maintained files and it's not worth setting up a configure_file() just for that
date.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-25 11:05:14 +03:00
Peter Hutterer ed57fb8b86 tools: add a xkbcli tool as entry point for the various tools we have
This is the base tool, no subtools are currently connected so you only get help
and version for now. The goal here is to have a git-like infrastructure where
/usr/bin/xkbcli is the main tool, anything else will hide in libexec.

The infrastructure for this is copied from libinput. Tools themselves will
will be installed in $prefix/libexec/xkbcommon and the xkbcli tool forks
off whatever argv[1] is after modifying the PATH to include the libexec dir.

libinput has additional code for checking whether we're running this from the
builddir but it's a bit iffy and it's usefulness is limited - if you're in the
builddir anyway you can just run ./builddir/xkbcli-<toolname> directly.
So for this code here, running ./builddir/xkbcli <toolname> will execute the
one in the prefix/libexecdir.

Since we want that tool available everywhere even where some of the subtools
aren't present, we need to ifdef the getopt handling.

man page generation is handled via ronn which is a ruby program but allows
markdown for the sources. It's hidden behind a meson option to disable where
downloading ronn isn't an option. The setup is generic enough that we can add
other man-pages by just appending to the array.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-25 11:05:14 +03:00
Peter Hutterer c3d42390f7 meson.build: add the valgrind test setup, exclude python tests
This way we can invoke the expected setup with
  meson test --setup=valgrind

And because we don't care about valgrinding python script, mark that test as
part of the "python-tests" suite and skip it during our CI valgrind run.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-07-25 11:01:49 +03:00
Peter Hutterer f0b1441f5e test: make the symbols-leak-test executable
Python leaks like crazy when run under valgrind. But if we make the script
executable **and** it has uses the env invocation (i.e. #!/usr/bin/env python3),
the leaks disappear. This is not the case for a shebang of /usr/bin/python3.

Why exactly this is the case I'm not sure but executables we plan to run
should have the exec bit set. So this is a janitor patch with the nice side
effect of fixing our valgrind runs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-25 10:59:32 +03:00
Ran Benita fa300b24d2 test: fix Windows CI by rewriting symbols-leak-test from bash to python
The CI started installing some wrapper instead of a real bash which is
what gets found.

See:
https://github.com/actions/virtual-environments/pull/1081

Given meson is written in python, it should always be available
hopefully.

Disabled valgrind wrapper for now because it now also applies to the
python interpreter which leaks like a sieve.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-07-22 13:45:17 +03:00
Ran Benita d4a17915db ci: cache chocolaty download
The bison sourceforge download is quite slow and unreliable.

Hopefully this works. Stolen directly from ruby:
a50750c8a9/.github/workflows/windows.yml (L26)

Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-07-22 13:45:17 +03:00
Peter Hutterer afb26e7df9 Add libxkbregistry to query available RMLVO
This library is the replacement for clients parsing evdev.xml directly.
Instead, they should use the API here so that in the future we may even
be able to swap evdev.xml for a more suitable data format.

The library parses through evdev.xml (using libxml2) and - if requested -
through evdev.extras.xml as well. The merge approach is optimised for
the default case where we have a system-installed rules XML and another file in
$XDG_CONFIG_DIR that adds a few entries.  We load the system file first, then
append any custom ones to that. It's not possible to overwrite the MLVO list
provided by the system files - if you want to do that, get the change upstream.

XML validation is handled through the DTD itself which means we only need to
check for a nonempty name, everything else the DTD validation should complain
about.

The logging system is effectively identical to xkbcommon.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-06 15:15:20 +10:00
Ran Benita 8dfece0cbb ci: add github actions build
We currently use Azure Pipelines. But it became out of date. Also it
requires a different account and setup than github account itself.

The configuration here is probably not very good and is less featureful
than the Azure one but it's what I managed.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2020-04-18 21:55:28 +03:00