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
2023-03-29 11:42:23 +03:00
# Simple boot tests that build and boot the mkosi images generated by the mkosi config files in mkosi.conf.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
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"
2023-01-29 17:17:06 +03:00
- distro : centos
release : "8"
2020-11-30 23:57:52 +03:00
steps :
2023-03-01 12:58:39 +03:00
- uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
2023-04-18 15:35:48 +03:00
- uses : systemd/mkosi@ebc8b63f3be58243c7ff4273517fa4d2858c7e30
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 : |
2023-03-29 11:42:23 +03:00
tee mkosi.conf <<- EOF
2022-02-04 14:10:33 +03:00
[ Distribution]
Distribution=${{ matrix.distro }}
Release=${{ matrix.release }}
2023-02-09 11:53:05 +03:00
SecureBoot=yes
2022-02-04 14:10:33 +03:00
[ Content]
Environment=CI_BUILD=1
2023-03-16 14:12:38 +03:00
DEFAULT_TIMEOUT_SEC=90
2022-02-04 14:10:33 +03:00
[ Output]
2023-03-16 20:28:14 +03:00
KernelCommandLineExtra=systemd.unit=mkosi-check-and-shutdown.service
systemd.journald.max_level_console=debug
2023-03-21 12:01:09 +03:00
# udev's debug log output is very verbose, so up it to info in CI.
udev.log_level=info
2023-04-12 18:27:06 +03:00
[ Host]
ExtraSearchPaths=!*
2022-02-04 14:10:33 +03:00
EOF
2021-01-03 18:05:06 +03:00
2023-01-31 20:53:28 +03:00
- name : Generate secure boot key
2023-02-09 11:53:05 +03:00
run : mkosi genkey
2023-01-31 20:53:28 +03:00
2020-11-30 23:57:52 +03:00
- name : Build ${{ matrix.distro }}
2023-02-09 11:53:05 +03:00
run : mkosi
2020-11-30 23:57:52 +03:00
2021-05-19 22:29:42 +03:00
- name : Show ${{ matrix.distro }} image summary
2023-02-09 11:53:05 +03:00
run : mkosi summary
2021-05-19 22:29:42 +03:00
2020-11-30 23:57:52 +03:00
- name : Boot ${{ matrix.distro }} systemd-nspawn
2023-03-16 20:28:14 +03:00
run : sudo mkosi boot
2021-12-08 21:31:25 +03:00
- name : Check ${{ matrix.distro }} systemd-nspawn
2023-03-07 17:23:35 +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
2023-02-09 11:53:05 +03:00
run : timeout -k 30 10m mkosi qemu
2021-12-08 21:31:25 +03:00
- name : Check ${{ matrix.distro }} QEMU
2023-03-07 17:23:35 +03:00
run : sudo mkosi shell bash -c "[[ -e /testok ]] || { cat /failed-services; exit 1; }"