Skip to content

Run tests

Run tests #1480

Workflow file for this run

name: Run tests
on:
# Build at 23:00 every Sunday
schedule:
- cron: "0 23 * * 1"
pull_request:
push:
jobs:
test-distributions:
name: Build in containers
continue-on-error: true
strategy:
matrix:
distro:
- {name: "almalinux", tag: "10"}
- {name: "almalinux", tag: "9"}
- {name: "almalinux", tag: "8"}
- {name: "alpine", tag: "3.22", variant: "-lts"}
- {name: "alpine", tag: "3.22", variant: "-virt"}
- {name: "alpine", tag: "3.21", variant: "-lts"}
- {name: "alpine", tag: "3.21", variant: "-virt"}
- {name: "alpine", tag: "3.20", variant: "-lts"}
- {name: "alpine", tag: "3.20", variant: "-virt"}
- {name: "archlinux", tag: "latest"}
- {name: "archlinux", tag: "latest", variant: "-lts"}
- {name: "archlinux", tag: "latest", variant: "-zen"}
- {name: "centos", tag: "stream10", url: "quay.io/centos/"}
- {name: "centos", tag: "stream9", url: "quay.io/centos/"}
- {name: "debian", tag: "13"}
- {name: "debian", tag: "12"}
- {name: "fedora", tag: "rawhide", url: "registry.fedoraproject.org/"}
- {name: "fedora", tag: "43", url: "registry.fedoraproject.org/"}
- {name: "fedora", tag: "42", url: "registry.fedoraproject.org/"}
- {name: "gentoo/stage3", tag: "latest"}
- {name: "opensuse/tumbleweed", tag: "latest", variant: "-default", url: "registry.opensuse.org/"}
- {name: "opensuse/leap", tag: "15.6", variant: "-default", url: "registry.opensuse.org/"}
- {name: "opensuse/leap", tag: "16.0", variant: "-default", url: "registry.opensuse.org/"}
- {name: "oraclelinux", tag: "10", uek: "ol10_UEKR8"}
- {name: "oraclelinux", tag: "9", uek: "ol9_UEKR8", gcc: "gcc-toolset-14"}
- {name: "oraclelinux", tag: "8", uek: "ol8_UEKR7", gcc: "gcc-toolset-11"}
- {name: "ubuntu", tag: "25.10"}
- {name: "ubuntu", tag: "25.04"}
- {name: "ubuntu", tag: "24.04"}
- {name: "ubuntu", tag: "22.04"}
runs-on: ubuntu-24.04
container:
image: ${{ matrix.distro.url }}${{ matrix.distro.name }}:${{ matrix.distro.tag }}
steps:
- name: Checkout
if: matrix.distro.name == 'opensuse/leap' && matrix.distro.tag == '15.6'
# openSUSE Leap 15.6 does not have tar in the base image
run: |
zypper --non-interactive install tar gzip
- uses: actions/checkout@v6
- name: Install dependencies for Red Hat based distributions
if: matrix.distro.name == 'almalinux' || matrix.distro.name == 'centos' || matrix.distro.name == 'fedora'
# Relax crypto policies to allow RSA signatures
run: |
dnf install -y gawk diffutils elfutils-libelf gcc kernel kernel-devel make openssl patch crypto-policies-scripts
update-crypto-policies --set LEGACY
make install-redhat
- name: Install dependencies for Oracle Linux
if: matrix.distro.name == 'oraclelinux'
# Relax crypto policies to allow RSA signatures
run: |
dnf config-manager --set-enabled ${{ matrix.distro.uek }}
dnf install -y gawk diffutils elfutils-libelf gcc kernel-uek kernel-uek-devel make openssl patch crypto-policies-scripts
update-crypto-policies --set LEGACY
make install-redhat
if [ -n "${{ matrix.distro.gcc }}" ]; then
echo "build_environment=\"/opt/rh/${{ matrix.distro.gcc }}/enable\"" >> /etc/dkms/framework.conf.d/uek.conf
fi
- name: Install Alpine dependencies
if: matrix.distro.name == 'alpine'
run: |
apk --no-cache --update add bash gcc linux-headers linux${{ matrix.distro.variant }} linux${{ matrix.distro.variant }}-dev make openssl coreutils patch
make install
- name: Install Arch Linux dependencies
if: matrix.distro.name == 'archlinux'
run: |
pacman -Syu --noconfirm diffutils gcc make linux${{ matrix.distro.variant }} linux${{ matrix.distro.variant }}-headers openssl patch
make install
- name: Install Debian dependencies
if: matrix.distro.name == 'debian'
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update -q
apt-get install -qy make linux-headers-amd64 linux-image-amd64 openssl xz-utils patch
make install-debian
- name: Install Gentoo Linux dependencies
if: matrix.distro.name == 'gentoo/stage3'
run: |
echo -e "MAKEOPTS=\"-j$(nproc) -l$(nproc)\"\nACCEPT_LICENSE=\"*\"" >> /etc/portage/make.conf
wget --progress=dot:mega -O - https://github.com/gentoo-mirror/gentoo/archive/master.tar.gz | tar -xz && mv gentoo-master /var/db/repos/gentoo
FEATURES="getbinpkg binpkg-ignore-signature parallel-fetch parallel-install pkgdir-index-trusted" USE="-initramfs" emerge --quiet --noreplace -j$(nproc) -l$(nproc) --autounmask-continue --with-bdeps=n '>=sys-kernel/gentoo-kernel-bin-6.6.0'
make install
- name: Install openSUSE leap dependencies
if: contains(matrix.distro.name, 'opensuse')
run: |
zypper --non-interactive install diffutils elfutils gcc kernel${{ matrix.distro.variant }} kernel${{ matrix.distro.variant }}-devel make openssl patch zstd
make install
- name: Install Ubuntu dependencies
if: matrix.distro.name == 'ubuntu'
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update -q
apt-get install -qy gcc make linux-headers-generic linux-image-generic openssl shim-signed patch
make install-debian
- name: Run tests
run: |
for moddir in /usr/lib/modules/ /lib/modules/; do
if [ -e "$moddir" ]; then
kernels=$(find "$moddir" -maxdepth 1 -type d -exec basename {} \;)
break
fi
done
# There should be two entries - "modules" and the kernel we installed
if [ $(echo "${kernels}" | wc -l) -ne 2 ]; then
echo >&2 "Error: invalid number of kernels installed"
fi
KERNEL_VER=$(echo "${kernels}" | tail -n1)
if [ -z "${KERNEL_VER}" ] ; then
echo >&2 "Error: no kernel package found"
exit 1
fi
echo "Found kernel ${KERNEL_VER}"
export KERNEL_VER
echo "Module search paths"
for depmod in /etc/depmod.d/ /usr/lib/depmod.d/ /lib/depmod.d/; do
[ -e "$depmod" ] && grep -r ^search "$depmod" || true
done
# Run all tests
./run_test.sh
make uninstall