Skip to content

debug CI

debug CI #12796

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
jobs:
unit-test:
runs-on: ubuntu-24.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: ./
# Make sure the latest changes from the pull request are used.
- name: Install
run: sudo ln -svf $PWD/bin/mkosi /usr/bin/mkosi
working-directory: ./
- name: Build tools tree
run: |
tee mkosi.local.conf <<EOF
[Build]
ToolsTreeDistribution=arch
EOF
mkosi -f box -- true
- name: Run unit tests
run: mkosi box -- python3 -m pytest -sv
- name: Run installation tests
run: mkosi box -- python3 -m pytest -sv -m install
- name: Test execution from current working directory (sudo call)
run: sudo python3 -m mkosi -h
integration-test:
runs-on: ${{ matrix.runner }}
needs: unit-test
concurrency:
group: ${{ github.workflow }}-${{ matrix.distro }}-${{ matrix.tools }}-${{ matrix.runner }}-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
distro:
- arch
- centos
- debian
- fedora
- opensuse
- postmarketos
- ubuntu
tools:
- arch
- centos
- debian
- fedora
- opensuse
- ubuntu
runner:
- ubuntu-24.04
exclude:
# pacman is not packaged in EPEL.
- distro: arch
tools: centos
# apt and debian-keyring are not packaged in EPEL.
- distro: debian
tools: centos
- distro: ubuntu
tools: centos
# pacman is not packaged in openSUSE.
- distro: arch
tools: opensuse
# apt, debian-keyring and ubuntu-keyring are not packaged in openSUSE.
- distro: debian
tools: opensuse
- distro: ubuntu
tools: opensuse
# apk is not packaged in Debian, Ubuntu, or EPEL.
- distro: postmarketos
tools: centos
- distro: postmarketos
tools: debian
- distro: postmarketos
tools: ubuntu
include:
# low rate limit on s390x/ppc64le/arm64 workers
- distro: debian
tools: debian
runner: ubuntu-24.04-arm
- distro: fedora
tools: fedora
runner: ubuntu-24.04-arm
- distro: opensuse
tools: opensuse
runner: ubuntu-24.04-arm
- distro: ubuntu
tools: ubuntu
runner: ubuntu-24.04-arm
- distro: fedora
tools: fedora
runner: ubuntu-24.04-ppc64le
- distro: debian
tools: debian
runner: ubuntu-24.04-ppc64le
- distro: debian
tools: debian
runner: ubuntu-24.04-s390x
# build pmOS using pmOS tools tree
- distro: postmarketos
tools: postmarketos
runner: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: ./
with:
# Bootstrapping a postmarketOS tools tree on the Ubuntu host needs apk; all other
# tools trees install apk-tools from th tools distro's own repo
apk: ${{ matrix.tools == 'postmarketos' }}
# 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
# Make sure the latest changes from the pull request are used.
- name: Install
run: sudo ln -svf $PWD/bin/mkosi /usr/bin/mkosi
working-directory: ./
# TODO: Use $SYSTEMD_REPART_OVERRIDE_FSTYPE_ROOT once we drop support for Ubuntu Noble.
- name: Add hack for missing $SYSTEMD_REPART_OVERRIDE_FSTYPE_ROOT
run: sed -i 's/return "btrfs"/return "ext4"/' mkosi/distribution/*.py
- name: Configure and build
run: sudo tools/integration-test-setup.sh ${{ matrix.distro }} ${{ matrix.tools }}
- name: Run integration tests
run: |
# Without KVM the tests are way too slow and time out
if [[ -e /dev/kvm ]]; then
sudo mkosi box -- \
timeout -k 30 1h \
python3 -m pytest \
--tb=no \
--capture=no \
--verbose \
-m integration \
--distribution ${{ matrix.distro }} \
tests/
fi