-
Notifications
You must be signed in to change notification settings - Fork 53
271 lines (248 loc) · 14.5 KB
/
test.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
name: test
on:
push:
pull_request:
schedule:
- cron: '30 1 * * *' #every day at 1:30am
permissions: {}
jobs:
Ubuntu-2204-dkms:
runs-on: ubuntu-latest
container: ubuntu:22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout ivsc-driver repo
uses: actions/checkout@v4
with:
repository: intel/ivsc-driver
path: ivsc-driver
- name: Merge with ivsc-driver
shell: bash
run: |
cp -r ivsc-driver/backport-include ivsc-driver/drivers ivsc-driver/include .
rm -rf ivsc-driver
- name: Prepare environment
shell: bash
run: |
apt-get update --quiet;
apt-get install --yes --no-install-recommends dkms gpg-agent kmod software-properties-common sudo
- name: Download header files
shell: bash
run: |
# Add unstable kernel ppa
add-apt-repository ppa:canonical-kernel-team/unstable
apt-get update --quiet;
# latest generic kernel headers
apt-get install --yes linux-headers-generic linux-headers-generic-hwe-22.04-edge
# latest oem kernel
apt-get install --yes linux-headers-oem-20.04 linux-headers-oem-22.04 linux-headers-oem-22.04b linux-headers-oem-22.04c
- name: Register with dkms
shell: bash
run: |
dkms add .
- name: Compile driver
shell: bash
run: |
# run dkms build and all available kernel headers
failed=""
succeeded=""
for kver in /lib/modules/*/build; do
# skip the kernel headers from the azure kernel. These kernel headers
# are preinstalled and of no interest
if [[ "$kver" == *"azure"* ]]; then
echo "Skipping $kver - This is the kernel of the github runner.";
continue;
fi;
test -d $kver || continue
kver=${kver%/build}
kver=${kver##*/}
echo "=== Testing ${kver} ===";
echo "running: dkms build -m ipu6-drivers/0.0.0 -k ${kver}";
ret=$(sudo dkms build -m ipu6-drivers/0.0.0 -k ${kver} >&2; echo $?);
if [ ${ret} -eq 0 ]; then
succeeded="${succeeded} ${kver}"
else
echo "#### Skipped unexpected failure ${kver}";
failed="${failed} ${kver}";
fi;
done
if [ "x${failed}" != "x" ]; then
echo "#### Failed kernels: ${failed}";
exit 1
fi
echo "#### Successful builds for kernels: ${succeeded}";
Ubuntu-2404-dkms:
runs-on: ubuntu-latest
container: ubuntu:24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare environment
shell: bash
run: |
sed -i 's/noble noble-updates noble-backports/noble noble-updates noble-backports noble-proposed/' /etc/apt/sources.list.d/ubuntu.sources
apt-get update --quiet;
apt-get install --yes --no-install-recommends dkms gpg-agent kmod software-properties-common sudo
- name: Download header files
shell: bash
run: |
# latest generic kernel headers
apt-get install --yes linux-headers-generic linux-headers-generic-hwe-24.04-edge
# latest oem kernel
apt-get install --yes linux-headers-oem-24.04 linux-headers-oem-24.04a linux-headers-oem-24.04b
- name: Register with dkms
shell: bash
run: |
dkms add .
- name: Compile driver
shell: bash
run: |
# run dkms build and all available kernel headers
failed=""
succeeded=""
for kver in /lib/modules/*/build; do
# skip the kernel headers from the azure kernel. These kernel headers
# are preinstalled and of no interest
if [[ "$kver" == *"azure"* ]]; then
echo "Skipping $kver - This is the kernel of the github runner.";
continue;
fi;
test -d $kver || continue
kver=${kver%/build}
kver=${kver##*/}
echo "=== Testing ${kver} ===";
echo "running: dkms build -m ipu6-drivers/0.0.0 -k ${kver}";
ret=$(sudo dkms build -m ipu6-drivers/0.0.0 -k ${kver} >&2; echo $?);
if [ ${ret} -eq 0 ]; then
succeeded="${succeeded} ${kver}"
else
echo "#### Skipped unexpected failure ${kver}";
failed="${failed} ${kver}";
fi;
done
if [ "x${failed}" != "x" ]; then
echo "#### Failed kernels: ${failed}";
exit 1
fi
echo "#### Successful builds for kernels: ${succeeded}";
Ubuntu-rolling-dkms:
runs-on: ubuntu-latest
container: ubuntu:rolling
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout ivsc-driver repo
uses: actions/checkout@v4
with:
repository: intel/ivsc-driver
path: ivsc-driver
- name: Merge with ivsc-driver
shell: bash
run: |
cp -r ivsc-driver/backport-include ivsc-driver/drivers ivsc-driver/include .
rm -rf ivsc-driver
- name: Prepare environment
shell: bash
run: |
apt-get update --quiet;
apt-get install --yes --no-install-recommends dkms gpg-agent kmod software-properties-common sudo
- name: Download header files
shell: bash
run: |
# Add unstable kernel ppa
add-apt-repository ppa:canonical-kernel-team/unstable
apt-get update --quiet;
# latest generic kernel headers
apt-get install --yes linux-headers-generic
# latest oem kernel
apt-get install --yes linux-headers-oem-22.04
- name: Register with dkms
shell: bash
run: |
dkms add .
- name: Compile driver
shell: bash
run: |
# run dkms build and all available kernel headers
failed=""
succeeded=""
for kver in /lib/modules/*/build; do
# skip the kernel headers from the azure kernel. These kernel headers
# are preinstalled and of no interest
if [[ "$kver" == *"azure"* ]]; then
echo "Skipping $kver - This is the kernel of the github runner.";
continue;
fi;
test -d $kver || continue
kver=${kver%/build}
kver=${kver##*/}
echo "=== Testing ${kver} ===";
echo "running: dkms build -m ipu6-drivers/0.0.0 -k ${kver}";
ret=$(sudo dkms build -m ipu6-drivers/0.0.0 -k ${kver} >&2; echo $?);
if [ ${ret} -eq 0 ]; then
succeeded="${succeeded} ${kver}"
else
echo "#### Skipped unexpected failure ${kver}";
failed="${failed} ${kver}";
fi;
done
if [ "x${failed}" != "x" ]; then
echo "#### Failed kernels: ${failed}";
exit 1
fi
echo "#### Successful builds for kernels: ${succeeded}";
Debian-sid-dkms:
runs-on: ubuntu-latest
container: debian:sid
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare environment
shell: bash
run: |
apt-get update --quiet;
apt-get install --yes --no-install-recommends dkms gpg-agent kmod software-properties-common sudo
- name: Download header files
shell: bash
run: |
apt-get update --quiet;
# latest kernel
apt-get install --yes linux-headers-amd64
- name: Register with dkms
shell: bash
run: |
dkms add .
- name: Compile driver
shell: bash
run: |
# run dkms build and all available kernel headers
failed=""
succeeded=""
for kver in /lib/modules/*/build; do
# skip the kernel headers from the azure kernel. These kernel headers
# are preinstalled and of no interest
if [[ "$kver" == *"azure"* ]]; then
echo "Skipping $kver - This is the kernel of the github runner.";
continue;
fi;
test -d $kver || continue
kver=${kver%/build}
kver=${kver##*/}
echo "=== Testing ${kver} ===";
echo "running: dkms build -m ipu6-drivers/0.0.0 -k ${kver}";
ret=$(sudo dkms build -m ipu6-drivers/0.0.0 -k ${kver} >&2; echo $?);
if [ ${ret} -eq 0 ]; then
succeeded="${succeeded} ${kver}"
elif [ ${ret} -eq 77 ]; then
echo "#### Config of ${kver} doesn't support";
else
echo "#### Skipped unexpected failure ${kver}";
failed="${failed} ${kver}";
fi;
done
if [ "x${failed}" != "x" ]; then
echo "#### Failed kernels: ${failed}";
exit 1
fi
echo "#### Successful builds for kernels: ${succeeded}";