]> git.ipfire.org Git - thirdparty/systemd.git/blob - .github/workflows/mkosi.yml
test: fix the default timeout values described in README.testsuite
[thirdparty/systemd.git] / .github / workflows / mkosi.yml
1 ---
2 # vi: ts=2 sw=2 et:
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.default.d/.
5 name: mkosi
6
7 on:
8 push:
9 branches:
10 - main
11 - v[0-9]+-stable
12 pull_request:
13 branches:
14 - main
15 - v[0-9]+-stable
16
17 permissions:
18 contents: read
19
20 env:
21 # Enable debug logging in systemd, but keep udev's log level to info,
22 # since it's _very_ verbose in the QEMU task
23 # Disable the ISC DHCP servers, as they are failing in Ubuntu
24 KERNEL_CMDLINE: "systemd.unit=mkosi-check-and-shutdown.service !quiet systemd.log_level=debug systemd.log_target=console udev.log_level=info systemd.default_standard_output=journal+console systemd.mask=isc-dhcp-server6.service systemd.mask=isc-dhcp-server.service"
25
26 jobs:
27 ci:
28 runs-on: ubuntu-22.04
29 concurrency:
30 group: ${{ github.workflow }}-${{ matrix.distro }}-${{ matrix.release }}-${{ github.ref }}
31 cancel-in-progress: true
32 strategy:
33 fail-fast: false
34 matrix:
35 include:
36 - distro: arch
37 release: rolling
38 - distro: debian
39 release: testing
40 - distro: ubuntu
41 release: jammy
42 - distro: fedora
43 release: "37"
44 - distro: fedora
45 release: rawhide
46 - distro: opensuse
47 release: tumbleweed
48 - distro: centos_epel
49 release: 9-stream
50 - distro: centos_epel
51 release: 8-stream
52
53 steps:
54 - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
55 - uses: systemd/mkosi@c9772ec920f1cd03181ba14e6fe2c3d35ccb4f92
56
57 - name: Install
58 run: sudo apt-get update && sudo apt-get install --no-install-recommends python3-pexpect python3-jinja2
59
60 - name: Configure
61 run: |
62 tee mkosi.default <<- EOF
63 [Distribution]
64 Distribution=${{ matrix.distro }}
65 Release=${{ matrix.release }}
66
67 [Content]
68 Environment=CI_BUILD=1
69
70 [Output]
71 KernelCommandLine=${{ env.KERNEL_CMDLINE }}
72 EOF
73
74 - name: Build ${{ matrix.distro }}
75 run: sudo python3 -m mkosi build
76
77 - name: Show ${{ matrix.distro }} image summary
78 run: sudo python3 -m mkosi summary
79
80 - name: Boot ${{ matrix.distro }} systemd-nspawn
81 run: sudo python3 -m mkosi boot ${{ env.KERNEL_CMDLINE }}
82
83 - name: Check ${{ matrix.distro }} systemd-nspawn
84 run: sudo python3 -m mkosi shell bash -c "[[ -e /testok ]] || { cat /failed-services; exit 1; }"
85
86 - name: Boot ${{ matrix.distro }} QEMU
87 run: sudo timeout -k 30 10m python3 -m mkosi qemu
88
89 - name: Check ${{ matrix.distro }} QEMU
90 run: sudo python3 -m mkosi shell bash -c "[[ -e /testok ]] || { cat /failed-services; exit 1; }"