]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
ci: Enable KVM
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 13 Mar 2024 13:16:17 +0000 (14:16 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 13 Mar 2024 16:07:20 +0000 (17:07 +0100)
Since https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/,
it seems that KVM has started working, so let's make sure we take
advantage of it to speed up CI.

.github/workflows/ci.yml
tests/test_boot.py
tests/test_initrd.py

index 846c1fa8af148fc938ef2d98c093ed839ee10eae..1e2c3cd6d81f02d7e7cb978343ef99b276408996 100644 (file)
@@ -149,7 +149,7 @@ jobs:
         Environment=SYSTEMD_REPART_MKFS_OPTIONS_EROFS="--quiet"
 
         [Host]
-        QemuKvm=no
+        QemuKvm=yes
         EOF
 
         # Work around for https://src.fedoraproject.org/rpms/grub2/pull-request/61 by disabling obsoletes.
index 9086aea9481ebbdc28331d170f92716f3986db79..0030ef399753d0d44f153494c026c1f52c760c5c 100644 (file)
@@ -32,6 +32,8 @@ def test_format(config: Image.Config, format: OutputFormat) -> None:
             "--kernel-command-line=systemd.unit=mkosi-check-and-shutdown.service",
             "--incremental",
             "--ephemeral",
+            # TODO: Drop once https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2038777 is fixed in Github Actions
+            "--qemu-firmware=uefi" if format in (OutputFormat.disk, OutputFormat.uki) else "--qemu-firmware=auto",
         ],
     ) as image:
         if image.config.distribution == Distribution.rhel_ubi and format in (OutputFormat.esp, OutputFormat.uki):
@@ -79,7 +81,9 @@ def test_bootloader(config: Image.Config, bootloader: Bootloader) -> None:
     if config.distribution == Distribution.rhel_ubi:
         return
 
-    firmware = QemuFirmware.linux if bootloader == Bootloader.none else QemuFirmware.auto
+    # TODO: Use "auto" again instead of "uefi" once https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2038777 is
+    # fixed in Github Actions.
+    firmware = QemuFirmware.linux if bootloader == Bootloader.none else QemuFirmware.uefi
 
     with Image(
         config,
index 916c94a0d4476b2d3213ddcc28b6dce5e4534af1..c2327734e5c8ac6847c323fb515aef056bc64ff2 100644 (file)
@@ -63,6 +63,8 @@ def test_initrd(initrd: Image) -> None:
             "--incremental",
             "--ephemeral",
             "--format=disk",
+            # TODO: Drop once https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2038777 is fixed in Github Actions
+            "--qemu-firmware=uefi",
         ]
     ) as image:
         image.build()
@@ -185,6 +187,9 @@ def test_initrd_luks(initrd: Image, passphrase: Path) -> None:
                 "--incremental",
                 "--ephemeral",
                 "--format=disk",
+                # TODO: Drop once https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2038777 is fixed in Github
+                # Actions.
+                "--qemu-firmware=uefi",
             ]
         ) as image:
             image.build()