From bec15cef2395201016561da6badc95c15754cf24 Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Mon, 25 Sep 2023 08:43:35 +0200 Subject: [PATCH] workflows/tests.yml: add gentoo to CI Signed-off-by: Andrew Ammerlaan --- .github/workflows/tests.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d5f590f2..0de89744 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,7 +31,13 @@ jobs: - {name: "ubuntu", tag: "22.04"} - {name: "ubuntu", tag: "20.04"} - {name: "ubuntu", tag: "18.04"} + - {name: "gentoo", tag: "latest"} runs-on: ubuntu-20.04 + if: matrix.distro.name == 'gentoo' + container: + image: docker://docker.io/${{ matrix.distro.name }}:${{ matrix.distro.tag }} + + if: matrix.distro.name != 'gentoo' container: image: docker://docker.io/library/${{ matrix.distro.name }}:${{ matrix.distro.tag }} @@ -70,6 +76,12 @@ jobs: apt-get update -q apt-get install -qy gcc make linux-headers-generic linux-image-generic openssl shim-signed + - name: Install Gentoo Linux dependencies + if: matrix.distro.name == 'gentoo' + run: | + emerge --sync + emerge --noreplace -j2 -l2 gentoo-kernel-bin openssl + - name: Compute packaged kernel version id: versions run: | @@ -84,6 +96,8 @@ jobs: KERNEL_VER="$(LANG=C dpkg --status linux-headers-amd64 | sed -n 's/^Depends: linux-headers-\(\S\+\)\( .*\)\?/\1/p' | head -n 1)" elif [ "${{ matrix.distro.name }}" = ubuntu ] ; then KERNEL_VER="$(LANG=C dpkg --status linux-headers-generic | sed -n 's/^Depends: linux-headers-\(\S\+\)\( .*\)\?/\1/p' | head -n 1)" + elif [ "${{ matrix.distro.name }}" = gentoo ] ; then + KERNEL_VER="$(emerge --search gentoo-kernel-bin | sed -n 's/Latest version installed: \([0-9.]\)/\1/p' | head -n 1)" fi if [ -z "${KERNEL_VER}" ] ; then echo >&2 "Error: no kernel package found"