-
Notifications
You must be signed in to change notification settings - Fork 41
67 lines (57 loc) · 1.59 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Build and Test
on:
push:
branches: [master, ci-test]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
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:
image: ${{ matrix.container }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-ubuntu
if: ${{ startsWith(matrix.container, 'ubuntu') }}
- uses: ./.github/actions/setup-archlinux
if: ${{ startsWith(matrix.container, 'archlinux') }}
- uses: ./.github/actions/setup-fedora
if: ${{ startsWith(matrix.container, 'fedora') }}
- uses: ./.github/actions/setup-alpine
if: ${{ startsWith(matrix.container, 'alpine') }}
- name: configure
run: |
mkdir build
cd build
../autogen.sh c
- name: build
run: |
cd build
make -j$(nproc)
- name: test
if: ${{ matrix.test == 'yes' }}
run: |
cd build
make KDIR=/usr/lib/modules/*/build -j$(nproc) check
- name: install
run: |
cd build
DESTDIR=$PWD/inst make install
- name: distcheck
if: ${{ matrix.test == 'yes' }}
run: |
cd build
make KDIR=/usr/lib/modules/*/build distcheck