mirror of
https://github.com/systemd/systemd.git
synced 2026-07-25 08:45:56 +00:00
* 5a476a92de Use Path.relative_to instead of Path.parts * 03f41faf9f Update doc for mkosi ssh to mention sd v256 sshd-vsock * e054976d18 Rewrite note on fw deps of kernel modules in manpage * a046243a50 Add python3-pefile to fedora tools conf * 0bab54087e Fix truthy condition * 01c38544b2 code review * 563dca41da code review * 6074d14c0e code review * 7e842db3b1 Don't discard ordering of include/exclude entries in KernelModules= * 0047b64785 build(deps): bump github/codeql-action from 4.31.2 to 4.31.6 * f13325bc4b build(deps): bump actions/checkout from 5.0.0 to 6.0.0 * 9ac31d1795 Add zram and nfnetlink to default initrd * 4bdb47b6da verity: copy signing certificate to /usr/lib/verity.d/ * 8865afde9e Improve manpage output using pandoc lua filter (#4005) * a425313c58 Pass environment to systemd-sysusers invocation * 23f09d5de7 Make Ruff check for dangling whitespace * abeed73d13 qemu: Add missing sandbox * a05872e523 Ssh=yes maps to Ssh=always, update the manpage * 79489534ca Warn of mkosi's sshd lacking support in distros' SElinux policy * 696f99da43 Manpage: Update supported output formats * 21675c4822 Silence swtpm SHA1 signature deprecation warning * df53510982 DOC: update Ssh= to note sd-v256+ already generates sshd-vsock * 50ccef7926 Configure default tools tree with ToolsTree=yes * 0b701c690d opensuse: do not install openSUSE-release for Leap >= 16.0 * 4bababf421 opensuse: fix mirror URL for Leap >= 16.0 * c43123398c config.py: add config_default_proxy_exclude() * 07a0a2be67 installer: Only mount configured state subdirs into sandbox * d5efbf6f8c build(deps): bump github/codeql-action from 3.30.5 to 4.31.2 * 2912ed20d5 PTY forward fixes * 66dab75259 sandbox: Drop all capabilities that don't make sense in userns * 8fe5df4400 Respect SYSTEMD_TINT_BACKGROUND and SYSTEMD_ADJUST_TERMINAL_TITLE * b9d208789d log: Drop konsole hack * 7fa6eac65c Clarify that mkosi.images is not picked up in mkosi.conf.d * 08a0f768dd vmspawn: Support BindUser= * c7c3eaee4e mkosi-vm: Enable universe repository for ubuntu in mkosi-vm * 688e77f1a8 vmspawn: Use --grow-image * c47b7fe57b arch: Switch to the newly established fastly mirror * 7db8f2cda3 Match compressed pacman packages too * e3b3b93c50 Prevent using Overlay=yes with Format=portable * 83a25324b3 Make sure apt sources are installed when BaseTrees= is in the mix * f6fa2fd6a0 test: add unit tests for parents_below() utility function * 1eafbd8d03 Don't print newlines in stash_terminal_title() * bbaf92b50e Don't print newline after ansi sequences * d1b84f5fb3 Look for .sdmagic before we consider a PE binary a UKI/addon * b4efdbf14e Treat /opt the same as /usr for the sandbox * 71ffced0f1 Rework PACKAGE_GLOBS to be a PackageManager classmethod * 29605c2757 Various SPDX and whitespace fixes
157 lines
5.2 KiB
YAML
157 lines
5.2 KiB
YAML
---
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
name: coverage
|
|
|
|
on:
|
|
schedule:
|
|
# Calculate coverage daily at midnight
|
|
- cron: '0 0 * * *'
|
|
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- v[0-9]+-stable
|
|
paths:
|
|
- .github/workflows/coverage.yml
|
|
- test/integration-tests/integration-test-wrapper.py
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
coverage:
|
|
runs-on: ubuntu-24.04
|
|
if: github.repository == 'systemd/systemd' || github.repository == 'systemd/systemd-stable'
|
|
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
- uses: systemd/mkosi@5a476a92deca8ad54869e5d416217aa1bb137b25
|
|
|
|
# Freeing up disk space with rm -rf can take multiple minutes. Since we don't need the extra free space
|
|
# immediately, we remove the files in the background. However, we first move them to a different location
|
|
# so that nothing tries to use anything in these directories anymore while we're busy deleting them.
|
|
- name: Free disk space
|
|
run: |
|
|
sudo mv /usr/local /usr/local.trash
|
|
sudo mv /opt/hostedtoolcache /opt/hostedtoolcache.trash
|
|
sudo systemd-run rm -rf /usr/local.trash /opt/hostedtoolcache.trash
|
|
|
|
- name: Btrfs
|
|
run: |
|
|
truncate --size=100G btrfs.raw
|
|
mkfs.btrfs btrfs.raw
|
|
sudo mkdir /mnt/mkosi
|
|
LOOP="$(sudo losetup --find --show --direct-io=on btrfs.raw)"
|
|
sudo mount "$LOOP" /mnt/mkosi --options compress=zstd:1,user_subvol_rm_allowed,noatime,discard=async,space_cache=v2
|
|
sudo chown "$(id -u):$(id -g)" /mnt/mkosi
|
|
mkdir /mnt/mkosi/tmp
|
|
echo "TMPDIR=/mnt/mkosi/tmp" >>"$GITHUB_ENV"
|
|
ln -s /mnt/mkosi/build build
|
|
|
|
- name: Configure
|
|
run: |
|
|
tee mkosi/mkosi.local.conf <<EOF
|
|
[Distribution]
|
|
Distribution=arch
|
|
|
|
[Build]
|
|
ToolsTreeDistribution=arch
|
|
UseSubvolumes=yes
|
|
WithTests=no
|
|
|
|
WorkspaceDirectory=$TMPDIR
|
|
PackageCacheDirectory=$TMPDIR/cache
|
|
|
|
Environment=
|
|
# Build debuginfo packages since we'll be publishing the packages as artifacts.
|
|
WITH_DEBUG=1
|
|
CFLAGS=-Og
|
|
MESON_OPTIONS=--werror
|
|
COVERAGE=1
|
|
|
|
[Runtime]
|
|
RAM=4G
|
|
EOF
|
|
|
|
- name: Generate secure boot key
|
|
run: mkosi --debug genkey
|
|
|
|
- name: Show image summary
|
|
run: mkosi summary
|
|
|
|
- name: Build tools tree
|
|
run: sudo mkosi -f box -- true
|
|
|
|
- name: Configure meson
|
|
run: |
|
|
sudo mkosi box -- \
|
|
meson setup \
|
|
--buildtype=debugoptimized \
|
|
build
|
|
|
|
- name: Build image
|
|
run: sudo mkosi box -- meson compile -C build mkosi
|
|
|
|
- name: Initial coverage report
|
|
run: |
|
|
sudo mkdir -p build/test/coverage
|
|
sudo mkosi box -- \
|
|
lcov \
|
|
--directory build/mkosi.builddir/arch~rolling~x86-64 \
|
|
--capture \
|
|
--initial \
|
|
--exclude "*.gperf" \
|
|
--output-file build/test/coverage/initial.coverage-info \
|
|
--base-directory src/ \
|
|
--ignore-errors source \
|
|
--no-external \
|
|
--substitute "s#src/src#src#g"
|
|
|
|
- name: Run integration tests
|
|
run: |
|
|
# --preserve-env makes sure all the github actions environment variables are propagated which are
|
|
# used in integration-test-wrapper.py to construct the `gh` command line to download the journals
|
|
# of failed tests.
|
|
sudo --preserve-env mkosi box -- \
|
|
env \
|
|
TEST_RUNNER=ubuntu-24.04 \
|
|
meson test \
|
|
-C build \
|
|
--no-rebuild \
|
|
--setup=integration \
|
|
--suite=integration-tests \
|
|
--print-errorlogs \
|
|
--no-stdsplit \
|
|
--num-processes "$(($(nproc) - 1))" \
|
|
--timeout-multiplier 2 \
|
|
--max-lines 300
|
|
|
|
- name: Archive failed test journals
|
|
uses: actions/upload-artifact@v4
|
|
if: failure() && (github.repository == 'systemd/systemd' || github.repository == 'systemd/systemd-stable')
|
|
with:
|
|
name: ci-coverage-${{ github.run_id }}-${{ github.run_attempt }}-arch-rolling-failed-test-journals
|
|
path: |
|
|
build/test/journal/*.journal
|
|
build/meson-logs/*
|
|
retention-days: 7
|
|
|
|
- name: Combine coverage reports
|
|
run: |
|
|
lcov_args=()
|
|
|
|
while read -r file; do
|
|
lcov_args+=(--add-tracefile "${file}")
|
|
done < <(find build/test/coverage -name "TEST-*.coverage-info")
|
|
|
|
sudo mkosi box -- lcov --ignore-errors inconsistent,inconsistent "${lcov_args[@]}" --output-file build/test/coverage/everything.coverage-info
|
|
|
|
- name: List coverage report
|
|
run: sudo mkosi box -- lcov --ignore-errors inconsistent,inconsistent --list build/test/coverage/everything.coverage-info
|
|
|
|
- name: Coveralls
|
|
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b
|
|
if: github.repository == 'systemd/systemd' || github.repository == 'systemd/systemd-stable'
|
|
with:
|
|
file: build/test/coverage/everything.coverage-info
|