Files
systemd/.github/workflows/mkosi.yml
dependabot[bot] 70a180a490 build(deps): bump the actions group with 6 updates
Bumps the actions group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `7.0.0` | `7.0.1` |
| [actions/setup-python](https://github.com/actions/setup-python) | `6.3.0` | `7.0.0` |
| [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) | `4.36.2` | `4.37.3` |
| [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) | `6.2.0` | `6.2.3` |
| [softprops/action-gh-release](https://github.com/softprops/action-gh-release) | `3.0.1` | `3.0.2` |
| [ossf/scorecard-action](https://github.com/ossf/scorecard-action) | `2.4.3` | `2.4.4` |


Updates `actions/checkout` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0...3d3c42e5aac5ba805825da76410c181273ba90b1)

Updates `actions/setup-python` from 6.3.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/ece7cb06caefa5fff74198d8649806c4678c61a1...5fda3b95a4ea91299a34e894583c3862153e4b97)

Updates `github/codeql-action/upload-sarif` from 4.36.2 to 4.37.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/8aad20d150bbac5944a9f9d289da16a4b0d87c1e...e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81)

Updates `aws-actions/configure-aws-credentials` from 6.2.0 to 6.2.3
- [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases)
- [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/e7f100cf4c008499ea8adda475de1042d6975c7b...e6de054238d6b7531b4efff3b6587d9aade6a06c)

Updates `softprops/action-gh-release` from 3.0.1 to 3.0.2
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/718ea10b132b3b2eba29c1007bb80653f286566b...3d0d9888cb7fd7b750713d6e236d1fcb99157228)

Updates `ossf/scorecard-action` from 2.4.3 to 2.4.4
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/4eaacf0543bb3f2c246792bd56e8cdeffafb205a...2d1146689b8cda280b9bc96326124645441f03bc)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: actions/setup-python
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: github/codeql-action/upload-sarif
  dependency-version: 4.37.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: aws-actions/configure-aws-credentials
  dependency-version: 6.2.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: softprops/action-gh-release
  dependency-version: 3.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-01 12:46:12 +01:00

260 lines
8.6 KiB
YAML

---
# vi: ts=2 sw=2 et:
# SPDX-License-Identifier: LGPL-2.1-or-later
# Simple boot tests that build and boot the mkosi images generated by the mkosi config files in mkosi.conf.d/.
name: mkosi
on:
push:
branches:
- main
- v[0-9]+-stable
paths:
- "**"
- "!README*"
- "!LICENSE*"
- "!LICENSES/**"
- "!TODO"
- "!docs/**"
- "!man/**"
- "!catalog/**"
- "!shell-completion/**"
- "!po/**"
- "!.**"
- ".github/**"
pull_request:
branches:
- main
- v[0-9]+-stable
paths:
- "**"
- "!README*"
- "!LICENSE*"
- "!LICENSES/**"
- "!TODO"
- "!docs/**"
- "!man/**"
- "!catalog/**"
- "!shell-completion/**"
- "!po/**"
- "!.**"
- ".github/**"
permissions:
contents: read
jobs:
ci:
runs-on: ${{ matrix.runner || 'ubuntu-24.04' }}
concurrency:
group: ${{ github.workflow }}-${{ matrix.distro }}-${{ matrix.release }}-${{ github.ref }}-${{ matrix.runner || 'ubuntu-24.04' }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
include:
- distro: arch
release: rolling
cflags: "-O2 -D_FORTIFY_SOURCE=3"
vm: 1
- distro: debian
release: stable
- distro: debian
release: testing
shim: 1
- distro: debian
release: testing
runner: ubuntu-24.04-arm
no_qemu: 1
no_kvm: 1
- distro: ubuntu
release: noble
- distro: ubuntu
release: resolute
- distro: fedora
release: "44"
sanitizers: address,undefined
llvm: 1
- distro: fedora
release: rawhide
- distro: opensuse
release: tumbleweed
- distro: centos
release: "9"
- distro: centos
release: "10"
- distro: postmarketos
release: edge
libc: musl
skip: TEST-92-TPM2-SWTPM
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: systemd/mkosi@f7762b71437227922a367bb89597843c77494ef9
# 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 -p /mnt/mkosi
LOOP="$(sudo losetup --find --show --direct-io=on btrfs.raw)"
rm -f 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 -p /mnt/mkosi/tmp
echo "TMPDIR=/mnt/mkosi/tmp" >>"$GITHUB_ENV"
ln -sf /mnt/mkosi/build build
- name: Configure
run: |
tee mkosi/mkosi.local.conf <<EOF
[Distribution]
Distribution=${{ matrix.distro }}
Release=${{ matrix.release }}
[Output]
# Build a disk image in CI as this logic is much more prone to breakage.
Format=disk
[Build]
UseSubvolumes=yes
ToolsTreeDistribution=${{ matrix.distro }}
ToolsTreeRelease=${{ matrix.release }}
WithTests=yes
WorkspaceDirectory=$TMPDIR
PackageCacheDirectory=$TMPDIR/cache
Environment=
# Build debuginfo packages since we'll be publishing the packages as artifacts.
WITH_DEBUG=1
CFLAGS="${{ matrix.cflags || '-Og' }}"
SANITIZERS="${{ matrix.sanitizers || '' }}"
MESON_OPTIONS=--werror
LLVM="${{ matrix.llvm || 0 }}"
SYSEXT=1
[Runtime]
RAM=4G
EOF
# Preferred for cloud/CIs
if [ "${{ matrix.distro }}" = opensuse ]; then
tee -a mkosi/mkosi.local.conf <<EOF
[Distribution]
Mirror=https://cdn.opensuse.org/
EOF
fi
- 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: |
# /usr/sbin/bpftool is completely broken inside containers on Ubuntu which makes meson blow up so
# disable the bpf-framework stuff to avoid the issue.
# TODO: Drop when we move off Ubuntu Noble as this will be fixed in the next Ubuntu LTS release.
sudo mkosi box -- \
meson setup \
--buildtype=debugoptimized \
-Dbpf-framework=disabled \
-Dlibc="${{ matrix.libc || 'glibc' }}" \
build
- name: Prepare shim integration
run: |
if [ "${{ matrix.shim || 0 }}" = 1 ]; then
{ printf '[Content]\nPackages=shim-signed\nShimBootloader=signed\n'; \
printf '[Runtime]\nFirmware=uefi-secure-boot\nFirmwareVariables=%%O/ovmf_vars_shim.fd\n'; } \
>>mkosi/mkosi.local.conf
sudo mkdir -p build/mkosi.output/
sudo mkosi -f box -- \
virt-fw-vars \
--secure-boot \
--enroll-cert mkosi/mkosi.crt \
--add-mok 605dab50-e046-4300-abb6-3dd810dd8b23 mkosi/mkosi.crt \
--input /usr/share/OVMF/OVMF_VARS_4M.fd \
--output build/mkosi.output/ovmf_vars_shim.fd
fi
- name: Build image
run: sudo mkosi box -- meson compile -C build mkosi
- name: Make sure sources weren't polluted by package build scripts
run: |
git status
git diff
test -z "$(git status --porcelain)"
# There will only be one subdirectory, so we don't have to know exactly which one. Also, the
# subdirectory will be owned by root since we used sudo to build the image, so use sudo here as well.
sudo git -C pkg/* status
sudo git -C pkg/* diff
test -z "$(sudo git -C pkg/* status --porcelain)"
- name: Run integration tests
run: |
if [[ "$(sudo mkosi box -- meson test --help)" == *"--max-lines"* ]]; then
MAX_LINES=(--max-lines 300)
else
MAX_LINES=()
fi
if [ "${{ matrix.no_kvm || 0 }}" = 1 ] && [ "${{ matrix.no_qemu || 0 }}" = 0 ]; then
timeout_multiplier=4
fi
# --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_PREFER_QEMU="${{ matrix.vm || 0 }}" \
TEST_NO_QEMU="${{ matrix.no_qemu || 0 }}" \
TEST_NO_KVM="${{ matrix.no_kvm || 0 }}" \
TEST_RUNNER="${{ matrix.runner || 'ubuntu-24.04' }}" \
TEST_SKIP="${{ matrix.skip }}" \
meson test \
-C build \
--timeout-multiplier="${timeout_multiplier:-1}" \
--no-rebuild \
--setup=integration \
--suite=integration-tests \
--print-errorlogs \
--no-stdsplit \
--num-processes "$(($(nproc) - 1))" \
"${MAX_LINES[@]}"
- 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-mkosi-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.distro }}-${{ matrix.release }}-${{ matrix.runner || 'ubuntu-24.04' }}-failed-test-journals
path: |
build/test/journal/*.journal
build/meson-logs/*
retention-days: 7