Skip to content

Commit

Permalink
workflows/tests.yml: add gentoo to CI
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Ammerlaan <[email protected]>
  • Loading branch information
Nowa-Ammerlaan committed Sep 25, 2023
1 parent 7f7f51c commit b070b31
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ jobs:
- {name: "ubuntu", tag: "22.04"}
- {name: "ubuntu", tag: "20.04"}
- {name: "ubuntu", tag: "18.04"}
- {name: "gentoo/stage3", tag: "latest"}
runs-on: ubuntu-20.04

container:
image: docker://docker.io/library/${{ matrix.distro.name }}:${{ matrix.distro.tag }}
image: docker://docker.io/${{ matrix.distro.name }}:${{ matrix.distro.tag }}

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -70,6 +72,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/stage3'
run: |
emerge --sync
emerge --noreplace -j2 -l2 gentoo-kernel-bin openssl
- name: Compute packaged kernel version
id: versions
run: |
Expand All @@ -84,6 +92,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"
Expand Down

0 comments on commit b070b31

Please sign in to comment.