-
Notifications
You must be signed in to change notification settings - Fork 30
113 lines (103 loc) · 3.57 KB
/
linux-build.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Linux kernel module
on:
push:
paths:
- "mrmShared/linux/**"
- ".github/workflows/linux-build.yml"
pull_request:
paths:
- "mrmShared/linux/**"
- ".github/workflows/linux-build.yml"
workflow_dispatch:
jobs:
specific:
name: ${{ matrix.version }}
runs-on: ${{ matrix.os }}
env:
KSER: ${{ matrix.series }}
KVER: ${{ matrix.version }}
CC: ${{ matrix.cc }}
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu 22.04 - Series 4.x
os: ubuntu-22.04
series: v4.x
version: linux-4.9.1
- name: Ubuntu 22.04 - Series 5.x
os: ubuntu-22.04
series: v5.x
version: linux-5.9.6
- name: Ubuntu 22.04 - Series 6.x
os: ubuntu-22.04
series: v6.x
version: linux-6.5.9
- name: Ubuntu Latest - Series Latest
os: ubuntu-latest
series: latest
version: latest
- name: Ubuntu 22.04 - Centos Stream 9
os: ubuntu-22.04
series: Centos Stream 9
version: kernel-5.9.0-36.el9
git_repo: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9
steps:
- uses: actions/checkout@v2
- name: Info
run: |
gcc --version
- name: Deps
run: |
sudo apt-get update
# linux-headers-* only to pull in kbuild deps
sudo apt-get -y install linux-headers-`uname -r` kmod libelf-dev
[ "${{ matrix.cc }}" != "gcc-4.8" ] || sudo apt-get -y install gcc-4.8
- name: Setup Linux Kernel with Linux Kernel Archives
if: ${{ ! matrix.git_repo }}
run: |
echo $KSER $KVER
install -d kernel
if [ "$KSER" == "latest" ]; then
KSER=$(curl -s https://cdn.kernel.org/pub/linux/kernel/ | grep -o 'v[0-9]\+\.[0-9a-zA-Z]\+/' | sed 's/\/\s*//' | sort -t. -k2,2V -k3,3V -k4,4V | tail -n 1)
fi
if [ "$KVER" == "latest" ]; then
KVER=$(curl -s https://cdn.kernel.org/pub/linux/kernel/$KSER/ | grep -o 'linux-[0-9]\+\.[0-9]\+\.[0-9]\+\.tar\.xz' | sort -t- -k2,2n -k3,3n -k4,4n | tail -n 1 | sed 's/\.tar\.xz$//')
fi
echo "https://cdn.kernel.org/pub/linux/kernel/$KSER/$KVER.tar.xz"
curl -s https://cdn.kernel.org/pub/linux/kernel/$KSER/$KVER.tar.xz | tar -C kernel --strip-components=1 -xJ
make -C kernel CC=${CC:=gcc} defconfig
make -C kernel CC=${CC:=gcc} modules_prepare
- name: Setup Linux Kernel with git repository
if: ${{ matrix.git_repo }}
run: |
echo $KSER $KVER
echo ${{ matrix.git_repo }}
install -d kernel
git clone --depth 1 --branch $KVER --single-branch ${{ matrix.git_repo }} kernel
make -C kernel CC=${CC:=gcc} defconfig
make -C kernel CC=${CC:=gcc} modules_prepare
- name: Build
run: |
KBUILD_MODPOST_WARN=1 make -C mrmShared/linux CC=${CC:=gcc} KERNELDIR="$PWD/kernel"
host:
name: With VM host
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Info
run: |
uname -a
gcc --version
- name: Deps
run: |
sudo apt-get update
sudo apt-get -y install linux-headers-`uname -r`
- name: Build
run: make -C mrmShared/linux
- name: Install/Load
run: |
sudo make -C mrmShared/linux modules_install
sudo depmod -a
sudo modprobe mrf
sudo dmesg | tail -n 100