* ecf7f5702b Release 27.1 * ca08e2ccef docs: add notes on nsresourced in execution flow * 146b5dd4de docs: add a few notes on package manager specific behaviour * 344e42ee20 Update NEWS * dde1bf020f debian: fix debian-security/debug url when using a mirror * 699aa3b565 mkosi: upgrade debug message about fallback path to info * cb6da3f3ce mkosi: move fallback environment variable check to bypass nsresourced fully * 88c716a6b9 config: add delegate_ranges * f4de9a102a mkosi: use the foreign UID range only when requested when running as root * d091fed134 mkosi: only delegate UID ranges if we're not already root * 165bc99675 sandbox: rename delegate to delegate_ranges * bba53c50d0 sandbox: use equality check instead of boolean not for delegate * a033d03f59 summary: add foreign uid range * f13e96eb95 user: drop unused variable SUBRANGE * 847d113863 mkosi-obs: Only configure MakeScriptsExecutable in the main image * 568b1bce56 dnf: Only read repositories and variables from the sandbox tree * 938d6a1c21 obs: use policy signing data when available * 19d045e5e9 Rename sysupdate configuration files to .transfer * 9539f1771a action: bump fallback apk version to 3.0.8 * 8de4d25596 sandbox: add force_fallback to acquire_privileges and wire it up via env * af97d6ffef opensuse: tolerate missing RPM keyring * 0f2b7e0656 initrd: don't fail when encountering directories among ucode files * 5240191893 Allow using SignInitrdPCRs with SplitArtifacts=pcrs * ce90009686 Bump ukify required version from 261.999 to 262~ for SignInitrdPCRs * 58bbd63aca news: fix v27 `DiskType=` setting typo * 1da3299aec tests: skip test_fork_and_wait if on rc 1 * 5658e7abc9 Bump version to 28~devel * 4736cd8361 Release 27 * 97f305bf0a action: make shell style consistent * dd7140cbae action: only use apk version from API if non-empty * 2cfe0cefb8 news: update NEWS * 7bca598fa4 action: support container-based self-hosted runners * 08c86a25e1 action: bump fallback APK version * cc0fcef38f action: reduce timeouts and number of API calls * 211993d5d2 action: download latest version of apk | * f33cc45db3 Add ToolsTreeSnapshot= for pinning the default tools tree | * ddfc5a2cb5 tests: join options and their values with f-strings | * a497ff0251 doc: add missing matchers * | 589226cfd4 apk: disable grub's update-grub trigger during package installation / | * 595451bb4b debian: add new split-out systemd packages | * 7ce1851901 Revert "mkosi-tools: Install systemd-tpm on Debian" | * 50a1137be5 ci: pin resolved release for integration tests | * e30b0a0ba4 tests: drop obsolete @ prefix | * e7f4d57fac news: update NEWS |/ * bf2addb2ec build(deps): bump aws-actions/configure-aws-credentials * a58ded6a2a build(deps): bump actions/checkout from 6.0.2 to 7.0.1 * 9b7d87a170 add support for prebuilt UKIs * 75fdb9be15 mkosi-tools: Install systemd-tpm on Debian * d5ff0d0d98 Fall back to unprivileged user namespace on polkit denial * 0e4d5546ac Bump 261~devel version checks to 261 * 180d4a5329 Use systemd nightly OBS version in signing PCR policies auto detection * f7401bdc8d Add support for signing PCR policies for the initrd * 33d17b2b92 sandbox: Don't create shared propagation peer group * a078088f8e sandbox: Declare MS_PRIVATE as well * e1e9eafc87 kmod: eliminate duplication in calls to modinfo * df68b27e8e tools: add mount to Debian tools tree * 205dcedd45 util: don't drop single-character variable names in read_env_file * 35a9d38ea0 distribution: report the actual architecture in unsupported-arch errors * d4f44d212c sandbox: handle case where dev node for tty doesn't exist better * acf08c5eca build(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1 * b3ec53743a tests: Pass --output-directory to vm() and boot() * 9bc430a7fa config: Isolate build history per output directory * fd3d9bfe57 tests: Add regression test for build history lookup via configured output dir | * 55ab00bb13 Fix tar exclude patterns for apivfs paths |/ * 699da862f8 sandbox: Split a chroot() context manager out of chase() * 70ce10d132 sandbox: Default FSOperation.execute oldroot/newroot to / * 610b38538f Forbid AI attribution in commit messages * b7425bbe42 ci: Sync claude-review workflow with systemd * b9d4c06239 action: Make apk installation configurable and reliable again (cherry picked from commit 280dd84243c387af7510b727d123390fa9c61dc7)
163 lines
5.5 KiB
YAML
163 lines
5.5 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
|
|
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@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
with:
|
|
persist-credentials: false
|
|
- uses: systemd/mkosi@ecf7f5702bb2052b7a69cab3fe7d37bc3b9ad77b
|
|
|
|
# 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 \
|
|
--quiet
|
|
|
|
- name: Fix journal ownership
|
|
if: failure() && (github.repository == 'systemd/systemd' || github.repository == 'systemd/systemd-stable')
|
|
run: sudo chown -R "$(id -u):$(id -g)" build/test/journal build/meson-logs || true
|
|
|
|
- name: Archive failed test journals
|
|
uses: actions/upload-artifact@v7
|
|
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@8d6379e14d29928660c4ba802d8e85393440b329
|
|
if: github.repository == 'systemd/systemd' || github.repository == 'systemd/systemd-stable'
|
|
with:
|
|
file: build/test/coverage/everything.coverage-info
|