--- # 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-24.04 concurrency: group: ${{ github.workflow }}-${{ matrix.distro }}-${{ matrix.release }}-${{ github.ref }} cancel-in-progress: true strategy: fail-fast: false matrix: include: - distro: arch release: rolling sanitizers: "" llvm: 0 cflags: "-O2 -D_FORTIFY_SOURCE=3" - distro: debian release: testing sanitizers: "" llvm: 0 cflags: "-Og" - distro: ubuntu release: noble sanitizers: "" llvm: 0 cflags: "-Og" - distro: fedora release: "40" sanitizers: "" llvm: 0 cflags: "-Og" - distro: fedora release: rawhide sanitizers: address,undefined llvm: 1 cflags: "-Og" - distro: opensuse release: tumbleweed sanitizers: "" llvm: 0 cflags: "-Og" - distro: centos release: "9" sanitizers: "" llvm: 0 cflags: "-Og" steps: - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - uses: systemd/mkosi@70aa901697f12182ccaa24e2325867d275479b55 # Freeing up disk space with rm -rf can take multiple minutes. Since we don't need the extra free space # immediately, we remove the files in the background. However, we first move them to a different location # so that nothing tries to use anything in these directories anymore while we're busy deleting them. - name: Free disk space run: | sudo mv /usr/local /usr/local.trash sudo mv /opt/hostedtoolcache /opt/hostedtoolcache.trash sudo systemd-run rm -rf /usr/local.trash /opt/hostedtoolcache.trash - name: Btrfs run: | truncate --size=100G btrfs.raw mkfs.btrfs btrfs.raw sudo mkdir /mnt/mkosi LOOP="$(sudo losetup --find --show --direct-io=on btrfs.raw)" sudo mount "$LOOP" /mnt/mkosi --options compress=zstd:1,user_subvol_rm_allowed,noatime,discard=async,space_cache=v2 sudo chown "$(id -u):$(id -g)" /mnt/mkosi mkdir /mnt/mkosi/tmp echo "TMPDIR=/mnt/mkosi/tmp" >>"$GITHUB_ENV" ln -s /mnt/mkosi/build build - name: Configure run: | # XXX: drop after the HyperV bug that breaks secure boot KVM guests is solved sed -i "s/'firmware'\s*:\s*'auto'/'firmware' : 'uefi'/g" test/*/meson.build tee mkosi.local.conf <