From 45bcebd103f23fb595d0ff1d5e02ea5edd25f12d Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Tue, 27 Feb 2024 12:53:35 +0100 Subject: [PATCH] ci: backport mkosi CI configuration from upstream Notes: - on RHEL 9 we don't have vsock support in systemd, so we have to fall back to some "older" checks (i.e. pre-6aca147f82). - our systemd-repart doesn't automatically fall back to Format=swap for Type=swap partitions, so we have to do that explicitely - don't pull in sd-resolved and sd-networkd, since the former needs some extra configuration to work alongsideNM, and we don't build the latter at all on RHEL 9 RHEL-only Related: RHEL-27512 --- .github/workflows/mkosi.yml | 139 ++++++++++++++++++ .../mkosi.extra/usr/lib/repart.d/15-swap.conf | 1 + .../lib/systemd/mkosi-check-and-shutdown.sh | 3 + .../system/mkosi-check-and-shutdown.service | 5 +- 4 files changed, 144 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/mkosi.yml diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml new file mode 100644 index 0000000000..f9b6d9ba58 --- /dev/null +++ b/.github/workflows/mkosi.yml @@ -0,0 +1,139 @@ +--- +# vi: ts=2 sw=2 et: +# SPDX-License-Identifier: LGPL-2.1-or-later +# Simple boot tests that build and boot the mkosi images generated by the mkosi config files in mkosi.conf.d/. +name: mkosi + +on: + push: + branches: + - main + - v[0-9]+-stable + paths: + - '**' + - '!README*' + - '!LICENSE*' + - '!LICENSES/**' + - '!TODO' + - '!docs/**' + - '!man/**' + - '!catalog/**' + - '!shell-completion/**' + - '!po/**' + - '!.**' + - '.github/**' + + pull_request: + branches: + - main + - v[0-9]+-stable + paths: + - '**' + - '!README*' + - '!LICENSE*' + - '!LICENSES/**' + - '!TODO' + - '!docs/**' + - '!man/**' + - '!catalog/**' + - '!shell-completion/**' + - '!po/**' + - '!.**' + - '.github/**' + +permissions: + contents: read + +jobs: + ci: + runs-on: ubuntu-22.04 + concurrency: + group: ${{ github.workflow }}-${{ matrix.distro }}-${{ matrix.release }}-${{ github.ref }} + cancel-in-progress: true + strategy: + fail-fast: false + matrix: + include: + - distro: centos + release: "9" + + env: + SYSTEMD_LOG_LEVEL: debug + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: systemd/mkosi@070528fec478fc93af7ec057a5d2fd0045123c99 + + - name: Configure + run: | + tee mkosi.local.conf <