--- # SPDX-License-Identifier: LGPL-2.1-or-later name: coverage on: schedule: # Calculate coverage daily at midnight - cron: '0 0 * * *' pull_request: branches: - main - v[0-9]+-stable paths: - .github/workflows/coverage.yml - test/integration-tests/integration-test-wrapper.py permissions: contents: read jobs: coverage: runs-on: ubuntu-24.04 if: github.repository == 'systemd/systemd' || github.repository == 'systemd/systemd-stable' steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: systemd/mkosi@10544812b35a668d4aac9834c78ee8166e99bc78 # 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: | tee mkosi/mkosi.local.conf <