2021-10-01 13:09:20 +03:00
---
# vi: ts=2 sw=2 et:
2021-10-01 13:10:22 +03:00
# SPDX-License-Identifier: LGPL-2.1-or-later
2021-10-01 13:09:20 +03:00
# Simple boot tests that build and boot the mkosi images generated by the mkosi config files in mkosi.default.d/.
2020-11-30 23:57:52 +03:00
name : mkosi
on :
push :
branches :
2021-01-21 16:52:18 +03:00
- main
2021-11-12 19:37:15 +03:00
- v[0-9]+-stable
2022-11-10 17:00:53 +03:00
paths :
- '**'
- '!README*'
- '!LICENSE*'
- '!LICENSES/**'
- '!TODO'
- '!docs/**'
- '!man/**'
- '!catalog/**'
- '!shell-completion/**'
- '!po/**'
- '!.**'
- '.github/**'
2020-11-30 23:57:52 +03:00
pull_request :
branches :
2021-01-21 16:52:18 +03:00
- main
2021-11-12 19:37:15 +03:00
- v[0-9]+-stable
2022-11-10 17:00:53 +03:00
paths :
- '**'
- '!README*'
- '!LICENSE*'
- '!LICENSES/**'
- '!TODO'
- '!docs/**'
- '!man/**'
- '!catalog/**'
- '!shell-completion/**'
- '!po/**'
- '!.**'
- '.github/**'
2020-11-30 23:57:52 +03:00
2021-11-14 01:34:04 +03:00
permissions :
contents : read
2021-11-13 17:40:20 +03:00
2021-12-08 21:31:25 +03:00
env :
# Enable debug logging in systemd, but keep udev's log level to info,
# since it's _very_ verbose in the QEMU task
2022-08-26 01:02:29 +03:00
# Disable the ISC DHCP servers, as they are failing in Ubuntu
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"
2021-12-08 21:31:25 +03:00
2020-11-30 23:57:52 +03:00
jobs :
ci :
2022-06-21 21:53:42 +03:00
runs-on : ubuntu-22.04
2021-11-10 18:45:12 +03:00
concurrency :
2022-03-07 18:18:42 +03:00
group : ${{ github.workflow }}-${{ matrix.distro }}-${{ matrix.release }}-${{ github.ref }}
2021-11-10 18:45:12 +03:00
cancel-in-progress : true
2020-11-30 23:57:52 +03:00
strategy :
fail-fast : false
matrix :
2022-02-04 14:10:33 +03:00
include :
- distro : arch
release : rolling
- distro : debian
release : testing
- distro : ubuntu
2022-05-21 17:03:14 +03:00
release : jammy
2022-02-04 14:10:33 +03:00
- distro : fedora
2022-10-17 15:53:16 +03:00
release : "37"
2022-07-26 15:53:16 +03:00
- distro : fedora
release : rawhide
2022-02-04 14:10:33 +03:00
- distro : opensuse
release : tumbleweed
2023-01-10 14:04:10 +03:00
- distro : centos
2023-01-24 14:51:31 +03:00
release : "9"
2020-11-30 23:57:52 +03:00
steps :
2023-01-01 12:01:18 +03:00
- uses : actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
2023-01-24 14:51:31 +03:00
- uses : systemd/mkosi@37c0524360ee460174f83081fa14e0dc9bc6ee0d
2020-11-30 23:57:52 +03:00
2021-09-17 12:57:39 +03:00
- name : Configure
2022-02-04 14:10:33 +03:00
run : |
tee mkosi.default <<- EOF
[ Distribution]
Distribution=${{ matrix.distro }}
Release=${{ matrix.release }}
[ Content]
Environment=CI_BUILD=1
[ Output]
KernelCommandLine=${{ env.KERNEL_CMDLINE }}
EOF
2021-01-03 18:05:06 +03:00
2020-11-30 23:57:52 +03:00
- name : Build ${{ matrix.distro }}
2023-01-10 14:04:10 +03:00
run : sudo mkosi --idmap no
2020-11-30 23:57:52 +03:00
2021-05-19 22:29:42 +03:00
- name : Show ${{ matrix.distro }} image summary
2022-11-10 17:10:08 +03:00
run : sudo mkosi summary
2021-05-19 22:29:42 +03:00
2020-11-30 23:57:52 +03:00
- name : Boot ${{ matrix.distro }} systemd-nspawn
2022-11-10 17:10:08 +03:00
run : sudo mkosi boot ${{ env.KERNEL_CMDLINE }}
2021-12-08 21:31:25 +03:00
- name : Check ${{ matrix.distro }} systemd-nspawn
2022-11-10 17:10:08 +03:00
run : sudo mkosi shell bash -c "[[ -e /testok ]] || { cat /failed-services; exit 1; }"
2020-11-30 23:57:52 +03:00
- name : Boot ${{ matrix.distro }} QEMU
2022-11-10 17:10:08 +03:00
run : sudo timeout -k 30 10m mkosi qemu
2021-12-08 21:31:25 +03:00
- name : Check ${{ matrix.distro }} QEMU
2022-11-10 17:10:08 +03:00
run : sudo mkosi shell bash -c "[[ -e /testok ]] || { cat /failed-services; exit 1; }"