]> git.ipfire.org Git - thirdparty/systemd.git/blame - .github/workflows/mkosi.yml
Merge pull request #20303 from andir/sysconfig-example
[thirdparty/systemd.git] / .github / workflows / mkosi.yml
CommitLineData
448d3462
DDM
1name: mkosi
2
3# Simple boot tests that build and boot the mkosi images generated by the mkosi config files in .mkosi.
4
5on:
6 push:
7 branches:
9b25429c 8 - main
448d3462
DDM
9 pull_request:
10 branches:
9b25429c 11 - main
448d3462
DDM
12
13jobs:
14 ci:
15 runs-on: ubuntu-20.04
16 strategy:
17 fail-fast: false
18 matrix:
19 distro:
20 - arch
21 - debian
22 - ubuntu
23 - fedora
3ec4fccb 24 - opensuse
448d3462
DDM
25
26 steps:
27 - uses: actions/checkout@v2
7c87fb21 28 - uses: systemd/mkosi@v10
448d3462
DDM
29
30 - name: Install
392ed185 31 run: sudo apt-get update && sudo apt-get install --no-install-recommends python3-pexpect python3-jinja2
448d3462 32
6242cda9
DDM
33 - name: Symlink
34 run: ln -s .mkosi/mkosi.${{ matrix.distro }} mkosi.default
35
d227b6a7
FS
36 # Ubuntu's systemd-nspawn doesn't support faccessat2() syscall, which is
37 # required, since current Arch's glibc implements faccessat() via faccessat2().
38 - name: Update systemd-nspawn
39 if: ${{ matrix.distro == 'arch' }}
40 run: |
41 echo "deb-src http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs) main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
42 sudo apt update
43 sudo apt build-dep systemd
44 meson build
45 ninja -C build
46 sudo ln -svf $PWD/build/systemd-nspawn `which systemd-nspawn`
47 systemd-nspawn --version
48
448d3462 49 - name: Build ${{ matrix.distro }}
2e9055ab 50 run: sudo python3 -m mkosi --password= --network-veth=no --qemu-headless build
448d3462 51
715a273b
FS
52 - name: Show ${{ matrix.distro }} image summary
53 run: sudo python3 -m mkosi --password= --qemu-headless summary
54
448d3462 55 - name: Boot ${{ matrix.distro }} systemd-nspawn
2e9055ab 56 run: sudo ./.github/workflows/test_mkosi_boot.py python3 -m mkosi --password= --network-veth=no --qemu-headless boot
448d3462
DDM
57
58 - name: Boot ${{ matrix.distro }} QEMU
2e9055ab 59 run: sudo ./.github/workflows/test_mkosi_boot.py python3 -m mkosi --password= --network-veth=no --qemu-headless qemu