summaryrefslogtreecommitdiff
path: root/.github/workflows/mkosi.yml
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2020-11-30 20:57:52 +0000
committerDaan De Meyer <daan.j.demeyer@gmail.com>2020-12-04 22:24:12 +0000
commit448d3462b0f85c0f70ce67f7684497247b34c3d8 (patch)
tree2a4d052a5d3886c93b36c7958c7bc9d03cb9cf6e /.github/workflows/mkosi.yml
parent8f2c4c5e93718ac6d6f790de61fced5ed143de5d (diff)
downloadsystemd-448d3462b0f85c0f70ce67f7684497247b34c3d8.tar.gz
CI: Add mkosi boot tests
Using the new mkosi Github Action, we can add some simple boot tests for the systemd mkosi configs. This makes sure these keep working as expected.
Diffstat (limited to '.github/workflows/mkosi.yml')
-rw-r--r--.github/workflows/mkosi.yml42
1 files changed, 42 insertions, 0 deletions
diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml
new file mode 100644
index 0000000000..7c55d7dc1b
--- /dev/null
+++ b/.github/workflows/mkosi.yml
@@ -0,0 +1,42 @@
+name: mkosi
+
+# Simple boot tests that build and boot the mkosi images generated by the mkosi config files in .mkosi.
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ ci:
+ runs-on: ubuntu-20.04
+ strategy:
+ fail-fast: false
+ matrix:
+ distro:
+ - arch
+ - debian
+ - ubuntu
+ - fedora
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: systemd/mkosi@v8
+
+ - name: Install
+ run: sudo apt-get update && sudo apt-get install --no-install-recommends
+ ovmf
+ python3-pexpect
+ qemu-system-x86-64
+
+ - name: Build ${{ matrix.distro }}
+ run: sudo python3 -m mkosi --default .mkosi/mkosi.${{ matrix.distro }} --password= --qemu-headless build
+
+ - name: Boot ${{ matrix.distro }} systemd-nspawn
+ run: sudo ./.github/workflows/test_mkosi_boot.py python3 -m mkosi --default .mkosi/mkosi.${{ matrix.distro }} --password= --qemu-headless boot
+
+ - name: Boot ${{ matrix.distro }} QEMU
+ run: sudo ./.github/workflows/test_mkosi_boot.py python3 -m mkosi --default .mkosi/mkosi.${{ matrix.distro }} --password= --qemu-headless qemu