3 # SPDX-License-Identifier: LGPL-2.1-or-later
4 # Simple boot tests that build and boot the mkosi images generated by the mkosi config files in mkosi.conf.d/.
21 - '!shell-completion/**'
39 - '!shell-completion/**'
51 group: ${{ github.workflow }}-${{ matrix.distro }}-${{ matrix.release }}-${{ github.ref }}
52 cancel-in-progress: true
75 SYSTEMD_LOG_LEVEL: debug
78 - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
79 - uses: systemd/mkosi@a8ecff0defa132d729dcdab38380dcae31138e7e
83 tee mkosi.conf <<- EOF
85 Distribution=${{ matrix.distro }}
86 Release=${{ matrix.release }}
89 tee mkosi.conf.d/99-ci.conf <<- EOF
91 Environment=CI_BUILD=1
95 KernelCommandLineExtra=systemd.unit=mkosi-check-and-shutdown.service
96 systemd.journald.max_level_console=debug
97 # udev's debug log output is very verbose, so up it to info in CI.
99 # Root device can take a long time to appear, so let's bump the timeout.
100 systemd.default_device_timeout_sec=180
105 # For erofs, we have to install linux-modules-extra-azure, but that doesn't match the running kernel
106 # version, so we can't load the erofs module. squashfs is a builtin module so we use that instead.
108 mkdir -p mkosi.presets/system/mkosi.repart/10-usr.conf.d
109 tee mkosi.presets/system/mkosi.repart/10-usr.conf.d/squashfs.conf <<- EOF
114 # The emergency shell is not useful in the CI, as it just blocks for a long time before the job
115 # eventually times out. Override it to just shutdown immediately.
116 mkdir -p mkosi.presets/initrd/mkosi.extra/usr/lib/systemd/system/emergency.service.d/
117 mkdir -p mkosi.presets/system/mkosi.extra/usr/lib/systemd/system/emergency.service.d/
118 tee mkosi.presets/initrd/mkosi.extra/usr/lib/systemd/system/emergency.service.d/poweroff.conf <<- EOF
126 cp mkosi.presets/initrd/mkosi.extra/usr/lib/systemd/system/emergency.service.d/poweroff.conf mkosi.presets/system/mkosi.extra/usr/lib/systemd/system/emergency.service.d/poweroff.conf
128 - name: Generate secure boot key
129 run: mkosi --debug genkey
131 - name: Show image summary
137 - name: Boot systemd-nspawn
138 run: test "$(sudo mkosi --debug boot 1>&2; echo $?)" -eq 123
141 run: timeout -k 30 10m test "$(mkosi --debug qemu 1>&2; echo $?)" -eq 123