34 Commits

Author SHA1 Message Date
Serge Hallyn
eef769836f Add ubuntu-22.04 to the CI test matrix
we need to check against older compilers.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
2025-12-30 17:00:49 +01:00
Iker Pedrosa
2fd29cd841 .github/workflows/static-code-analysis.yml: add Python linters
Add flake8, pycodestyle, isort, black and mypy in CI for Python linting.

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2025-09-10 09:56:36 +02:00
Evgeny Grin (Karlson2k)
324d070ff8 configure.ac: Make sure that logind is enabled if requested, make --enable-logind default
Before this commit, if configured with --enable-logind, but libsystemd
is not found, configure silently succeed, however logind is efficiently
disabled.
With this commit, the configure fails if logind is not explicitly
disabled and libsystemd is not found.
--disable-logind is mandatory if logind integration should not be used.

Automatic detection is disabled by Alejandro Colomar's request.
Extra help in the error message is added by lslebodn's request.

Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
2025-08-02 12:09:13 +02:00
Alejandro Colomar
6c62103ba6 lib/getdate.*: Reimplement in pure C
This removes all yacc(1) code from this project.  Add copyright and
license, since there remains nothing of the original code.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2025-06-02 09:59:51 +02:00
Iker Pedrosa
ab89ca47fd CI: purge man-db
This accelerates the CI.

Closes: https://github.com/shadow-maint/shadow/issues/1240
Link: <https://101010.pl/@nabijaczleweli/114149412203886808>
Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Reviewed-by: Alejandro Colomar <alx@kernel.org>
2025-03-20 12:23:54 +01:00
Michael Vetter
c8e8557803 ci: add openSUSE Tumbleweed
Add an ansible task for openSUSE which will use the
configure options used by the official openSUSE package.

Signed-off-by: Michael Vetter <jubalh@iodoru.org>
2025-01-21 13:09:24 +01:00
Iker Pedrosa
1807360fce CI: run system tests
Run the newly created system tests in CI and collect artifacts.

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2025-01-10 20:21:07 -06:00
Iker Pedrosa
bdb5e2b79f CI: update artifacts action
v3 of upload-artifact actions is being deprecated, so let's move to v4.

Link: https://github.com/actions/upload-artifact
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2024-12-05 14:31:23 +01:00
Iker Pedrosa
742a230e30 CI: avoid cancelling all jobs when one fails
If a job in a matrix fails we don't want to cancel all jobs, thus we
need to set `fail-fast: false` as a strategy property.

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2024-11-23 01:04:19 +01:00
Serge Hallyn
cd8a8da7de CI: fix handling of sources.list
Closes #1088

We can't be sure whether a github runner will have new- or old-
style sources.list, so check whether the new exists, else use
the old style.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
2024-10-31 09:46:51 +01:00
Iker Pedrosa
0d1faafd3c CI: install libltdl-dev
Required to manage an autoconf macro.

Reviewed-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2024-10-15 10:43:24 +02:00
Iker Pedrosa
c8600f1359 CI: run command as non-root user
Reviewed-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2024-10-15 10:43:24 +02:00
Iker Pedrosa
339a596374 CI: run Install dependencies workflow
Run this workflow instead of replicating the script every time we need
to install the dependencies.

Reviewed-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2024-10-15 10:43:24 +02:00
Iker Pedrosa
99c4f445c7 CI: update Ubuntu repositories configuration
Recently Ubuntu updated its repositories configuration file from
`/etc/apt/sources.list` to `/etc/apt/sources.list.d/ubuntu.source`.
Thus, we need to update its location to be able to install all the
package dependencies.

In addition, the CI script was trying to uncomment the lines starting
with `deb-src`, but there is none in the new configuration file format.
Replace `Types: deb` by `Types: deb deb-src` at the beginning of the
line instead.

This commit merges all dependency installation scripts into a single
workflow, which will be called from all sites that have to install
dependencies.

Link: https://linuxconfig.org/ubuntus-repository-configuration-ubuntu-sources-have-moved-to-etc-apt-sources-list-d-ubuntu-sources
Closes: https://github.com/shadow-maint/shadow/issues/1088
Reported-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2024-10-15 10:43:24 +02:00
Iker Pedrosa
28ffa634d8 CI: use Ansible build in Github Action
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2024-07-18 10:17:29 -05:00
Alejandro Colomar
a3cae72faa share/containers/, .github/workflows/: Don't make(1) twice
It was being done so that the second one prints errors without races.
However, the same thing can be achieved by passing -Orecurse to make(1).

And this makes the logs even more readable, since there's no racy output
at all.

Fixes: 97f79e3b2715 ("CI: Make build logs more readable")
Link: <https://github.com/shadow-maint/shadow/pull/702>
Link: <https://github.com/nginx/unit/pull/1123>
Acked-by: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Andrew Clayton <a.clayton@nginx.com>
Cc: Konstantin Pavlov <thresh@nginx.com>
Cc: Dylan Arbour <https://github.com/arbourd>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-13 11:05:36 -05:00
Alejandro Colomar
a14936cf2e .github/workflows/runner.yml: trap(1) to see the testsuite log
Otherwise, 'cat testsuite.log' isn't run, since 'set -e' aborts the
script earlier.

Reviewed-by: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-04 01:43:25 +01:00
Iker Pedrosa
0fc697a4b1 CI: build and run unit tests
Run `make check` after the project is built in every runner.

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2023-09-29 09:24:01 +02:00
Serge Hallyn
4107c49ecd Add a make dist CI test
Add a CI test to check that make dist builds a usable tarball.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
2023-08-04 14:15:49 -05:00
Alejandro Colomar
97f79e3b27 CI: Make build logs more readable
If make fails in a multi-process invocation, the log is pretty much
unreadable.  To make it readable, build as much as can be built without
failing.  Then run a single-process make again.  If we succeeded
previously, this should be a no-op.  If not, this run will stop at the
first error, which should be more readable, and will only print the few
lines we're interested in.

This has some side effects:  Now we build as much as we can, instead of
failing as early as possible; this may make CI a bit slower.  However,
it also has the benefit that you see _all_ the error messages that could
be given, instead of needing to fix the first error to see the next and
so on.

Cc: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-04-18 09:21:09 +02:00
Christian Göttsche
189a01f7a7 ci: update Differential ShellCheck
Run on pushes and drop unnecessary write access.

Should avoid pull-requests comments like
https://github.com/shadow-maint/shadow/pull/695#issuecomment-1491876950
2023-03-31 15:54:39 +02:00
Iker Pedrosa
d4f31a5b3e CI: build project in containers
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2023-03-26 12:45:34 -05:00
Serge Hallyn
6d03bbea96 fail on any run_some test failure
Signed-off-by: Serge Hallyn <serge@hallyn.com>
2023-02-27 21:38:45 -06:00
Serge Hallyn
17efd59252 g-h-a workflow: workaround
Skip updating grub packages that are currently breaking
apt-get dist-upgrade.

Signed-off-by: Serge Hallyn <serge@hallyn.com>
2023-02-24 13:27:57 -06:00
Serge Hallyn
66daa74232 run on github runner 2023-02-09 09:55:04 -06:00
Serge Hallyn
6a51e6893e use self-hosted runner for testsuite
Signed-off-by: Serge Hallyn <serge@hallyn.com>
2023-02-09 09:55:04 -06:00
Serge Hallyn
39ecca84d4 workflow: update checkout acton v2 to v3
Signed-off-by: Serge Hallyn <serge@hallyn.com>
2023-01-13 09:51:05 +01:00
Iker Pedrosa
99ce21a313 CI: add libbsd and pkg-config dependencies
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Co-developed-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-11-28 09:07:41 -06:00
Jan Macku
f33e7def06 ci(lint): add shell linter - Differential ShellCheck
It performs differential ShellCheck scans and report results directly in pull request.

documentation: https://github.com/redhat-plumbers-in-action/differential-shellcheck

Signed-off-by: Jan Macku <jamacku@redhat.com>
2022-09-12 19:29:24 -05:00
Iker Pedrosa
6688f1c1eb CI: update actions version
CodeQL Action v1 is being deprecated and v2 needs to be used instead.

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2022-06-12 10:08:30 -05:00
Iker Pedrosa
1f84142915 CI: enable CodeQL analyzer
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2022-05-24 10:55:32 -05:00
Iker Pedrosa
f4d5705e4a CI: create Github workflow to install dependencies
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
2022-05-24 10:55:32 -05:00
Serge Hallyn
f5a7404c7a remove broken github actions
Signed-off-by: Serge Hallyn <serge@hallyn.com>
2021-12-27 09:26:32 -06:00
Serge Hallyn
6be18d45e1 initial github actions attempt
Closes #415
2021-10-15 16:21:19 -05:00