Commit Graph

6 Commits

Author SHA1 Message Date
Lucas De Marchi
91e4ea5a50 ci: Add Alpine
Add setup action for Alpine and start building it. Unfortunately the
testsuite is not ready yet and fails to build like this:

	../testsuite/path.c:219:14: error: conflicting types for '__xstat64';
	have 'int(int,  const char *, struct stat64 *)'
	  219 | WRAP_VERSTAT(__x,64);
	      |              ^~~

Add everything needed on the setup action, so when the underlying issue
is fixed, the testsuite can be enabled in CI.

Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/44
2024-07-17 12:37:51 -05:00
Lucas De Marchi
8c8860021a ci: Add Fedora
Add an action to setup latest Fedora and use it for the initial setup.
Add hack on /usr/lib/modules so /usr/lib/modules/*/build can still be
used in the rest of the workflow as the KDIR.

Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/44
2024-07-17 12:37:51 -05:00
Lucas De Marchi
0efaaa5355 ci: Add Archlinux
Add an action to setup Archlinux and use it for the initial setup.
The rest of the workflow can stay the same.

Currently the Arch container in docker hub is not very up-to-date with
some expired keys and other keys not yet in the package. Workaround
that by wiping the current db and reinstalling the keyring. As requested
by Emil, add a comment in this part of the github-action about why
that is done.

Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/44
2024-07-17 12:37:51 -05:00
Lucas De Marchi
e9f4600bd0 ci: Use a container and expand versions
Use containers to build/test so it's not restricted to the OS versions
supported by Github runners. A few changes are needed to the workflow to
support using containers:

	1) No need for sudo, so remove it
	2) Explicitly install missing zlib
	3) Explicitly pass KDIR= while building kernel modules, since it
	   won't match `uname -r`. This assumes the container has just
	   one kernel installed and so /usr/lib/modules/*/build can be
	   used as the single symlink to the kernel headers. This should
	   be common to other distros to be added, too.

Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/44
2024-07-17 12:37:51 -05:00
Lucas De Marchi
da6345d17a ci: Replace package installation with local action
Separate the package installation step with a local action so
it's easier to support more versions and distros.

Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/44
2024-07-17 12:37:51 -05:00
Lucas De Marchi
a6f070b3e1 ci: Add github workflow
Add a minimal github workflow to test kmod. This can be incremented in
future to test more distros, compilers and libc.

Link: https://lore.kernel.org/r/20240709135007.104325-2-lucas.de.marchi@gmail.com
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
2024-07-12 07:28:50 -05:00