linux-edge-dev is failing in alpine:
ERROR: unable to select packages:
linux-edge-dev (no such package):
required by: world[linux-edge-dev]
Error: Process completed with exit code 1.
Use linux-stable instead.
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
The former has been EOL for a bit now and somewhat recently has been
(re)moved from the repos -> our CI was failing.
Swap for bookworm, which gives us the "try a slightly older distro"
coverage, while still being green in CI.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/395
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
Drop .github/print-kdir.sh and just use KDIR=any to handle the kernel
headers.
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/384
Move the variants into their own section, similar to the moduledir and
co. This bears no functional change in the CI run.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/383
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Both -Dopenssl=enabled and -Dtools=true are the default. Omit them from
the meson_setup.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/383
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Currently running 32bit tests alongside sanitizers, segfaults due to our
syscall wrapper. Just disable the sanitizers, which means we get at
least some 32bit test coverage.
On a couple of attempts, I wasn't able to get a proper/robust solution,
as outlined in init_module.c - we need vsyscall() which does not exist.
Considering some distributions are dropping 32bit/i686 support, it may
be that we'll nuke these builds from CI sooner than later.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/383
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
A while ago the Alpine gtk-doc tool chain was having issues building our
docs. That got resolved at some point over the past months, so we can
drop this local workaround.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/373
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Instead of listing each combination on per-compiler basis, assume we
want both unless annotated otherwise.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/362
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
We currently construct a single container for each distro, which is
capable of running both 32 and 64 bit builds.
In addition, since we're meson only (which allows only out-of-tree
builds) we can do multiple builds for a given checkout.
As result we hammer the docker registry and distribution/package servers
a bit less.
Notes:
- 32bit distcheck is disabled - not particularly interesting
- 32bit tests are disabled for everyone - they are consistently failing
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/362
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
The upcoming CI rework will hard depend on some bash constructs. While
theoretically possible to make them dash compliant, I'm not sure it's
worth the effort. Just install bash and carry on.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/362
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Use builddir/ as indicated in our README, which makes it obvious that
what the argument is. While there, remove a few instances of mkdir/cd -
meson and ninja can handle it themselves.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/362
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
With codecov v5, the script/action requires curl (and maybe more)
although the documentation wasn't updated. Furthermore, the missing
program will be reported in the logs, while the action will report
overall success 🤦
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/347
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Fixes: ae7b0c30 ("ci: Test with Debian bullseye")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/322
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
In the main workflow the problem needing a double checkout is that
git may not be available in the containers we are using which causes the
action/checkout to use a tarball. However some of the steps (e.g. meson
dist) need the checkout to be a real git checkout.
Improve the double checkout by doing the first checkout to a local-actions
directory that can be removed after the setup is done. Even if doing it
in a separate dir, the CWD still belongs to a different user as
additional debugs show before removing that directory:
ls -la .
total 12
drwxr-xr-x 3 1001 118 4096 Mar 12 18:35 .
drwxr-xr-x 3 1001 118 4096 Mar 12 18:35 ..
drwxr-xr-x 10 root root 4096 Mar 12 18:35 local-actions
ls -la ..
total 12
drwxr-xr-x 3 1001 118 4096 Mar 12 18:35 .
drwxr-xr-x 6 1001 root 4096 Mar 12 18:35 ..
drwxr-xr-x 3 1001 118 4096 Mar 12 18:35 kmod
Move the safe directory setting to the cleanup step.
Another alternative would be to use the setup-os action from a "remote"
repository, i.e. kmod-project/kmod/.github/actions/setup-os. However it
would make harder to update it in PRs since it would fetch the action
from a different branch.
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/321
The only workflow that needs a double checkout is the main one, all the
others should be fine without.
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/321
Commit 23b45fc385c7 ("ci: Drop container object") dropped the container
object for the main workflow. Do the same for the other workflows.
Even if they don't need a matrix (since they run in just one
configuration), keep using it to make the structure common to all
workflows.
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/321
Use just one action for OS setup and make it call the right script. This
makes it easier to maintain as when devs are working with containers,
they can just call the script, and it also avoids repeated conditional
steps in the workflows.
If a distro is not supported, the action will simply fail and support
may be added later.
With the move to .sh files, also run shellcheck in them: surprisingly
just one quote missing.
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/321
We've dropped libtool across all distros but Fedora. The tool is not
needed anymore, so let's remove it.
Fixes: 04520dc9 ("ci: Remove autotools dependencies from containers")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/318
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
1. When master or a new tag is pushed, build API documentation
2. Push the newly built document to kmod-project.github.io
3. Dispatch kmod-project.github.io to publish documents
Co-developed-by: Chen, Yuchi <yuchi.chen@intel.com>
Signed-off-by: Chen, Yuchi <yuchi.chen@intel.com>
Signed-off-by: Gongjun Song <gongjun.song@intel.com>
Signed-off-by: Dan He <dan.h.he@intel.com>
Signed-off-by: Wenjie Wang <wenjie2.wang@intel.com>
Signed-off-by: Qingqing Li <qingqing.li@intel.com>
Link: https://github.com/kmod-project/kmod/pull/308
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Add a test for a common setup (/usr/lib/modules) and a weird one
(/kernel-modules) to cover uses of moduledir.
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Due to a mistake on using "multilib" fixed in commit
271d8ab ("ci: Fix 32b build ignoring options") and commit
6897912 ("ci: s/multilib/x32/"), most of our builds were actually
testing 32b, which is not the most common thing.
Leave just 2 32b builds, one with Archlinux and the other with Ubuntu
and remove the FIXME about configuration.
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
In some configurations we pass meson_setup and x32 options, but the
options were being ignored in 32b builds. Unify the configure/build/test
steps since just the 32b configuration step that needs to be handled
differently, then make sure --native-file and the configure options
are also handled for 32b builds.
Add a 64b configuration for Archlinux and disable test on Archlinux x32
since it's failing due to packages installed and/or distro
configuration.
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
It's confusing using "multilib" because it's not about adding the
"capability of building 32b", it's rather "this is really building and
testing 32b, which takes different steps.
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Just use all the properties in a single level rather than embeding it in
the container object.
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
The permutation available in github and extending it "include" or
reducing it with "exclude" are much harder than needed. It doesn't seem
we can have a mix of "properties" with the configurations. Just give up
and completly specify the matrix. Now that there's only 1 build system,
at least doing all the permutations doesn't make it too big.
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
The pahole package is required in our test suite for module creation:
BTF [M] /__w/kmod/kmod/build/testsuite/module-playground/mod-simple.ko
/bin/sh: 1: pahole: not found
make[3]: *** [/usr/src/linux-headers-6.12.16-common/scripts/Makefile.modfinal:64: /__w/kmod/kmod/build/testsuite/module-playground/mod-simple.ko] Error 127
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Link: https://github.com/kmod-project/kmod/pull/294
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
This generates a bunch of warnings in CI
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details,
see https://github.com/actions/runner-images/issues/10636
Update to ubuntu 24.04 to catch any possible issues and stop using
ubuntu-latest.
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Test disabling one of the compression libs while dlopen'ing the rest and
handling 1 linked and 2 dlopen'ed.
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/262
The second check is a "should fail" check, but it will fail because the
build dir already exists rather than for the true reason. Use a
different dir for the configure tests and move the `rm` inside the
function.
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/262
There is a severe number of false-positive in code scanning caused by
inspecting meson-internal test files like
'build/meson-private/tmpzb46osmq/testfile.c'.
As a workaround, use the 'filter-sarif' action to filter out these
results before uploading the SARIF (Static Analysis Results Interchange
Format).
This PR was inspired by https://github.com/rauc/rauc/pull/1346 and the
example from https://github.com/advanced-security/filter-sarif.
Signed-off-by: Enrico Joerns <ejo@pengutronix.de>
[Emil: port from rauc, use checksums for actions]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/249
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Based on the autotools build, meson does not support relative
directories for distconfig and moduledir. We fixed that recently, but
never added a check so we don't regress.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/245
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
The buxybox version of ln supports only the short options and does not
support -r/--relative.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/231
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Add a simple code coverage pipeline based on the CodeQL one.
Should give us pretty reports in the PRs and web UI with the results. We
can consider having HTML reports on our website (once it's up that is)
in addition or instead of at a future point.
Closes: https://github.com/kmod-project/kmod/issues/61
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/229
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
While in here drop the docs and manpages flags - both of those combined
take ~1s of CI time - and disable the sanitizers and tests instead.
This means we no longer get pre-existing code problems in the tests,
which is fine considering the number of pre-existing issues in there.
Another nice side effect is that the pipeline time is reduced by ~50%.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/229
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Make sure we are running in non-interactive mode and that we don't get
blocked on tzdata update.
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/235
We had the sanitizers disabled on Fedora 40, since the shared library
sanitizers comings with clang were not packaged. With Fedora 41 that has
changed, so let's try re-enabling them.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/219
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
The default for the compressions and openssl is based on the autotools
build ones. With the initial goal to make migration as easy as possible
- identical option names, help messages, defaults...
Although a bunch of these have changed already, plus we want builders to
get support for compressed/signed modules out of the box.
So let's flip the defaults - everyone is welcome to adjust those when
calling `meson setup -D foo=bar`.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/225
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>