ci: Add Alpine

Add setup action for Alpine and start building it. Unfortunately the
testsuite is not ready yet and fails to build like this:

	../testsuite/path.c:219:14: error: conflicting types for '__xstat64';
	have 'int(int,  const char *, struct stat64 *)'
	  219 | WRAP_VERSTAT(__x,64);
	      |              ^~~

Add everything needed on the setup action, so when the underlying issue
is fixed, the testsuite can be enabled in CI.

Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/44
This commit is contained in:
Lucas De Marchi 2024-07-12 14:10:29 -05:00
parent 8c8860021a
commit 91e4ea5a50
2 changed files with 37 additions and 1 deletions

22
.github/actions/setup-alpine/action.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: 'setup Alpine'
description: 'Setup an Alpine container for running CI'
runs:
using: 'composite'
steps:
- name: Install dependencies
shell: sh
run: |
apk update
apk add \
autoconf \
automake \
bash \
build-base \
gtk-doc \
libtool \
linux-edge-dev \
openssl-dev \
scdoc \
xz-dev \
zlib-dev \
zstd-dev

View File

@ -11,7 +11,17 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
container: ['ubuntu:22.04', 'ubuntu:24.04', 'archlinux:base-devel', 'fedora:latest'] include:
- container: 'ubuntu:22.04'
test: 'yes'
- container: 'ubuntu:24.04'
test: 'yes'
- container: 'archlinux:base-devel'
test: 'yes'
- container: 'fedora:latest'
test: 'yes'
- container: 'alpine:latest'
test: 'no'
container: container:
image: ${{ matrix.container }} image: ${{ matrix.container }}
@ -25,6 +35,8 @@ jobs:
if: ${{ startsWith(matrix.container, 'archlinux') }} if: ${{ startsWith(matrix.container, 'archlinux') }}
- uses: ./.github/actions/setup-fedora - uses: ./.github/actions/setup-fedora
if: ${{ startsWith(matrix.container, 'fedora') }} if: ${{ startsWith(matrix.container, 'fedora') }}
- uses: ./.github/actions/setup-alpine
if: ${{ startsWith(matrix.container, 'alpine') }}
- name: configure - name: configure
run: | run: |
@ -38,6 +50,7 @@ jobs:
make -j$(nproc) make -j$(nproc)
- name: test - name: test
if: ${{ matrix.test == 'yes' }}
run: | run: |
cd build cd build
make KDIR=/usr/lib/modules/*/build -j$(nproc) check make KDIR=/usr/lib/modules/*/build -j$(nproc) check
@ -48,6 +61,7 @@ jobs:
DESTDIR=$PWD/inst make install DESTDIR=$PWD/inst make install
- name: distcheck - name: distcheck
if: ${{ matrix.test == 'yes' }}
run: | run: |
cd build cd build
make KDIR=/usr/lib/modules/*/build distcheck make KDIR=/usr/lib/modules/*/build distcheck