Commit graph

51 commits

Author SHA1 Message Date
Daan De Meyer d5474f78b8 ci: Switch to Ubuntu 24.04 2024-06-08 12:33:32 +02:00
Luca Boccassi 2d0c95f2b2 ci: remove packages.microsoft.com
It is not needed, it publishes things like dotnet, and it is often
broken, so just remove the sources
2024-04-24 18:07:52 +02:00
Frantisek Sumsal 96e4c62698 ci: build with -O2 and -Wmaybe-uninitialized
According to the comment in meson.build this should be a supported
configuration, so let's test it in the CI as well.
2024-01-04 21:27:10 +01:00
Luca Boccassi 37f16ef072 ci: add -Dutmp=false coverage 2023-11-08 18:41:47 +00:00
Luca Boccassi 64ec2d073f CI: add a build job with TPM but without OpenSSL
We keep introducing build failures with this combination due to the
high amount of changes, add a combination that covers it
2023-10-27 14:03:23 +01:00
Jan Janssen 79ae0d0b3e ci: Update compiler build matrix
Given that gold is pretty much unmaintained and does not support
`-static-pie` for bootloader components it should be safe to drop.

Also switch to clang-17 while we're at it.
2023-09-29 16:56:30 +02:00
Jan Janssen 690db0c80f ci: Do not run build test as root
Although, this is CI, we can still do better. It also ensures that any
env var changes make it into the script, as things like PATH would not
survive a `sudo -E`.
2023-09-06 11:01:53 +02:00
Jan Janssen ce2c01789c ci: Don't produce debug output for build tests
These binaries are never used, so generating debug symbols just
slows down build time.
2023-09-06 11:01:53 +02:00
Jan Janssen 051ec23ce2 ci: Use apt-get in favor of apt
Apparently, apt does not have a stable CLI interface and warns about it.
2023-09-06 11:01:53 +02:00
Jan Janssen 592ee08f3b ci: Use add-apt-repository to enable sources
This should also ensure that consistent mirrors are selected.
2023-09-06 11:01:53 +02:00
Jan Janssen 40e9c4e45d meson: Convert options to meson features (require)
These options use requre() to conveniently express their dependency
requirements.
2023-08-23 14:45:02 +02:00
Jan Janssen 43abc59a27 meson: Use feature options
By using meson features we can replace the handcrafted dependency
auto-detection by just passing the value from get_option directly to the
required arg for dependency, find_library etc.
'auto' features make the dependency optional, 'enabled' requires it
while 'disabled' features will skip detection entirely.

Any skipped or not found dependency will just be a no-op when passed to
build steps and therefore we can also skip the creation of empty vars.

The use of skip_deps for these is dropped here as meson provides a way
to disable all optional features in one go by passing
'-Dauto_features=disabled'.
2023-08-23 14:45:02 +02:00
Frantisek Sumsal c5afbac31b ci: explicitly install python3-lldb-$COMPILER_VERSION
To avoid apt complaining:

 + apt-get -y install clang-15 lldb-15 lld-15 clangd-15
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-lldb-14 : Conflicts: python3-lldb-x.y
 python3-lldb-15 : Conflicts: python3-lldb-x.y
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
2023-07-27 13:45:00 +01:00
Evgeny Vereshchagin 83dda3d28b ci: drop the "find" kludge
meson no longer complains about install_tag
2023-06-16 10:43:06 +09:00
Zbigniew Jędrzejewski-Szmek 98e2089f1b mkosi,ci: do not install perl 2023-05-09 08:11:10 +02:00
Luca Boccassi b7b48b389c ci: do one build with no tpm/p11kit/fido2
We have some missing coverage in the CI, all builds enable these features,
but there are often changes and they cover a lot of code. Do one build
without them to ensure we don't break builds.
2023-04-04 22:38:08 +01:00
Jan Janssen e8509329d7 ci: Adjust for new EFI build 2023-03-10 11:41:08 +01:00
Jan Janssen dfca5587cf tree-wide: Drop gnu-efi
This drops all mentions of gnu-efi and its manual build machinery. A
future commit will bring bootloader builds back. A new bootloader meson
option is now used to control whether to build sd-boot and its userspace
tooling.
2023-03-10 11:41:03 +01:00
Zbigniew Jędrzejewski-Szmek 8112c91e48 github: use 'meson setup'
Meson started warning when 'setup' is not used:
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.

Also add more quoting in output to make the message clearer.
2023-01-11 16:46:24 +01:00
Zbigniew Jędrzejewski-Szmek 1f6da5d902 ci: install pefile 2022-12-07 15:53:47 +01:00
Samuel Thibault ede5a78f50 shutdown: Add Xen kexec support
In the Xen case, it's the hypervisor which manages kexec. We thus
have to ask it whether a kernel is loaded, instead of relying on
/sys/kernel/kexec_loaded.
2022-11-02 20:47:41 +01:00
Jan Janssen 4fb6506deb meson: Downgrade efi-ld warning
The warning isn't that serious and mostly there to inform the user that
lld/mold cannot build efi binaries. It is also better to build test with
fatal meson warnings.
2022-08-23 10:26:02 +02:00
Jan Janssen ed862b95b2 ci: Add mold to build tests 2022-08-23 10:25:30 +02:00
Evgeny Vereshchagin af72115412 ci: bump gcc in the "build test" workflow
gcc-12 has been released
2022-05-23 14:30:48 +00:00
Frantisek Sumsal 50b2b52004 ci: prefer the distro llvm version if available 2022-05-21 20:23:48 +02:00
Evgeny Vereshchagin 2d14ec9b8a ci: actually turn on fatal-meson-warnings in the "build" workflow
It's a follow-up to https://github.com/systemd/systemd/pull/23211
2022-04-29 13:58:27 +09:00
Evgeny Vereshchagin 67b9732f1b ci: bring fatal-meson-warnings back
It's a follow-up to https://github.com/systemd/systemd/pull/23204

v2: replaced xargs with exec as suggested by Jan Janssen
2022-04-28 21:21:59 +03:00
Luca Boccassi 0a5e638cc7 meson: add install_tag to sd-boot, libsystemd and libudev
Allows to 'meson install --tags systemd-boot --no-rebuild' to install only the EFI
binaries, skipping the rest, for a very quick build:

$ ninja src/boot/efi/linuxx64.efi.stub
[21/21] Generating src/boot/efi/linuxx64.efi.stub with a custom command
$ ninja src/boot/efi/systemd-bootx64.efi
[10/10] Generating src/boot/efi/systemd-bootx64.efi with a custom command
$ DESTDIR=/tmp/foo meson install --tags systemd-boot --no-rebuild
Installing src/boot/efi/systemd-bootx64.efi to /tmp/foo/usr/lib/systemd/boot/efi

Requires Meson 0.60 to be used, prints a warning for unknown keyword
in earlier versions, but there's no failure

https://mesonbuild.com/Installing.html#installation-tags
2022-04-27 22:24:53 +01:00
Jan Janssen 7fc60c071f ci: Add ia32 EFI multilib test
This makes sure that building ia32 EFI binaries on x86_64 works.
We force gnu-efi support to ensure it's not skipped by accident
and provide the lib32 dir manually, because clang does not support
'--print-multi-os-directory', which is used to auto-detect it.
2022-04-07 18:45:21 +02:00
Frantisek Sumsal b491d74064 ci: fix clang-13 installation
For some reason Ubuntu Focal repositories now have `llvm-13` virtual
package which can't be installed, but successfully fools our check,
resulting in no clang/llvm being installed...

```
$ apt show llvm-13
Package: llvm-13
State: not a real package (virtual)
N: Can't select candidate version from package llvm-13 as it has no candidate
N: Can't select versions from package 'llvm-13' as it is purely virtual
N: No packages found

$ apt install --dry-run llvm-13
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package llvm-13 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'llvm-13' has no installation candidate
```
2022-02-22 17:57:25 +01:00
Evgeny Vereshchagin 007721e939 ci: turn meson warnings into errors 2022-01-14 01:53:37 +03:00
Evgeny Vereshchagin 4e1ab496ae {build|unit}-test: show meson-log.txt when meson fails
to make it easier to figure out why it fails.

For example in https://github.com/systemd/systemd/runs/4799774735?check_suite_focus=true
it failed with
```

meson.build:1003:8: ERROR: Command "/usr/bin/clang -print-targets" failed with status 1.

A full log can be found at /home/runner/work/systemd/systemd/build/meson-logs/meson-log.txt
Error: Process completed with exit code 1.
```
and it wasn't clear what exactly happened there.
2022-01-13 20:27:25 +09:00
Jan Janssen bbbf1c3d32 ci: Test efi binaries for section table gaps 2022-01-02 20:05:58 +01:00
Evgeny Vereshchagin bfa6bd1be0 ci: replace apt-key with signed-by
to limit the scope of the key to apt.llvm.org only.

This is mostly inspired by https://blog.cloudflare.com/dont-use-apt-key/
2021-12-26 15:38:42 +00:00
Frantisek Sumsal 298cff6171 ci: test build with supported cryptolibs to some degree
Let's assign a specific -Dcryptolib= value to each job to have at least
some coverage for all supported cryptolibs without unnecessarily
multiplying the test matrix.

Should provide coverage for #21880.
2021-12-24 16:24:16 +01:00
Frantisek Sumsal 7b55f29797 ci: drop build test with -O2, since it's covered by -O3 tests 2021-12-24 16:24:16 +01:00
наб f1e6f93372
Change all fixed-path bash shebangs to /u/b/env bash outside test/ 2021-12-12 21:13:50 +01:00
Jan Janssen aa22e69856 ci: Build test with different linkers 2021-12-11 11:03:29 +01:00
Evgeny Vereshchagin 4997d1b965 ci: pin python dependencies and let Dependabot keep track of them 2021-12-07 09:08:26 +00:00
Frantisek Sumsal 9371d44afe ci: install libbpf 2021-12-03 16:30:56 +01:00
Frantisek Sumsal 1c71302f70 ci: use the system llvm-11 package on Focal
ATTOW llvm-11 got into focal-updates, which conflicts with llvm-11
provided by the apt.llvm.org repositories. Let's use the system
llvm package if available in such cases to avoid that.
2021-10-12 08:17:56 +02:00
Zbigniew Jędrzejewski-Szmek 186b9041ae ci: use LGPLv2+ for all our ci configuration 2021-10-01 14:45:00 +02:00
Frantisek Sumsal 8370da9ea6 ci: shellcheck-ify CI scripts 2021-09-29 22:24:12 +02:00
Zbigniew Jędrzejewski-Szmek 392ed18542 ci: drop py2 lxml, pull in jinja2 2021-05-19 10:25:26 +09:00
Frantisek Sumsal c191e09230 ci: cover standalone/static binaries in build test 2021-05-06 11:52:58 +09:00
Evgeny Vereshchagin 8e32f20d13 Revert "ci: switch back to meson-0.56.2"
This reverts commit c39e36203f.

Now that meson-0.57.1 (where https://github.com/mesonbuild/meson/issues/8347
is fixed) is out it should be safe to keep rolling forward.
2021-02-20 20:20:04 +01:00
Frantisek Sumsal 98f6d5769f ci: enable DNS over TLS using OpenSSL in the build test
Prompted by:
    * https://github.com/systemd/systemd/pull/18641#issuecomment-780371055
    * https://github.com/systemd/systemd/issues/18639
2021-02-17 16:41:23 +01:00
Evgeny Vereshchagin c39e36203f ci: switch back to meson-0.56.2
It seems there is another meson (0.57.0) regression preventing clang from
building systemd with --optimization=3 -Db_lto=true

By analogy with https://github.com/google/oss-fuzz/pull/5199 let's just switch
to 0.56.2 for the time being
2021-02-15 15:38:27 +09:00
Frantisek Sumsal 54cf684f5f ci: use the recommended meson syntax
See: docs/HACKING.md
2021-01-25 16:01:56 +01:00
Frantisek Sumsal 753803a66c ci: drop an unnecessary sudo 2021-01-25 15:49:27 +01:00