]> git.ipfire.org Git - thirdparty/systemd.git/blob - .github/workflows/mkosi.yml
mkosi: Update to latest
[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 paths:
13 - '**'
14 - '!README*'
15 - '!LICENSE*'
16 - '!LICENSES/**'
17 - '!TODO'
18 - '!docs/**'
19 - '!man/**'
20 - '!catalog/**'
21 - '!shell-completion/**'
22 - '!po/**'
23 - '!.**'
24 - '.github/**'
25
26 pull_request:
27 branches:
28 - main
29 - v[0-9]+-stable
30 paths:
31 - '**'
32 - '!README*'
33 - '!LICENSE*'
34 - '!LICENSES/**'
35 - '!TODO'
36 - '!docs/**'
37 - '!man/**'
38 - '!catalog/**'
39 - '!shell-completion/**'
40 - '!po/**'
41 - '!.**'
42 - '.github/**'
43
44 permissions:
45 contents: read
46
47 env:
48 # Enable debug logging in systemd, but keep udev's log level to info,
49 # since it's _very_ verbose in the QEMU task
50 # Disable the ISC DHCP servers, as they are failing in Ubuntu
51 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"
52
53 jobs:
54 ci:
55 runs-on: ubuntu-22.04
56 concurrency:
57 group: ${{ github.workflow }}-${{ matrix.distro }}-${{ matrix.release }}-${{ github.ref }}
58 cancel-in-progress: true
59 strategy:
60 fail-fast: false
61 matrix:
62 include:
63 - distro: arch
64 release: rolling
65 - distro: debian
66 release: testing
67 - distro: ubuntu
68 release: jammy
69 - distro: fedora
70 release: "37"
71 - distro: fedora
72 release: rawhide
73 - distro: opensuse
74 release: tumbleweed
75 - distro: centos
76 release: "9"
77 - distro: centos
78 release: "8"
79
80 steps:
81 - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
82 - uses: systemd/mkosi@4be912b0fa4931403fddf649aa242cd4406471c4
83
84 - name: Configure
85 run: |
86 tee mkosi.default <<- EOF
87 [Distribution]
88 Distribution=${{ matrix.distro }}
89 Release=${{ matrix.release }}
90 SecureBoot=yes
91
92 [Content]
93 Environment=CI_BUILD=1
94
95 [Output]
96 KernelCommandLine=${{ env.KERNEL_CMDLINE }}
97 EOF
98
99 - name: Generate secure boot key
100 run: mkosi genkey
101
102 - name: Build ${{ matrix.distro }}
103 run: mkosi
104
105 - name: Show ${{ matrix.distro }} image summary
106 run: mkosi summary
107
108 - name: Boot ${{ matrix.distro }} systemd-nspawn
109 run: sudo mkosi boot ${{ env.KERNEL_CMDLINE }} audit=0
110
111 - name: Check ${{ matrix.distro }} systemd-nspawn
112 run: sudo mkosi shell bash -c "[[ -e /testok ]] || { cat /failed-services; exit 1; }"
113
114 - name: Boot ${{ matrix.distro }} QEMU
115 run: timeout -k 30 10m mkosi qemu
116
117 - name: Check ${{ matrix.distro }} QEMU
118 run: sudo mkosi shell bash -c "[[ -e /testok ]] || { cat /failed-services; exit 1; }"