-
Notifications
You must be signed in to change notification settings - Fork 16
620 lines (557 loc) · 22.1 KB
/
build.yaml
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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
name: Build
# ========== TRIGGER ==========
on:
push:
branches:
- main # default branch name
- '*-build*' # Temporary build, no testing
- '*build-*' # Temporary build, no testing
- 'prerelease-*' # Prerelease build
- 'release-*' # Release build
- '*.check'
# Schedule run at midnight daily
schedule:
- cron: '0 0 * * *'
env:
DOWNLOAD: ".download"
UNPACKED: ".unpacked"
jobs:
build-ubuntu:
name: 'Build Ubuntu: ${{matrix.release.name}}-${{matrix.release.kernel}}-${{matrix.release.hwe}}'
runs-on: ubuntu-${{ matrix.release.name }}
timeout-minutes: 90
env:
MIRROR: "https://mirrors.edge.kernel.org/ubuntu"
FLAVOUR: generic
MAKEFLAGS: ""
strategy:
matrix:
release: [
{ "name": "24.04", "kernel": "6.8" },
{ "name": "22.04", "kernel": "6.8", "hwe": "hwe" },
{ "name": "22.04", "kernel": "5.15" },
{ "name": "20.04", "kernel": "5.4" },
{ "name": "20.04", "kernel": "5.15", "hwe": "hwe" },
]
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set HWE Environment (Ubuntu 22.04)
if: matrix.release.hwe != '' && matrix.release.name == '22.04'
env:
NAME: ${{ matrix.release.name }}
KERNEL_VERSION: ${{ matrix.release.kernel }}
run: |
MATCH="*~${NAME#*-}.[0-9]"
echo "MATCH=$MATCH" >> $GITHUB_ENV
echo "FLAVOUR_MATCH=*-${FLAVOUR}_${MATCH}" >> $GITHUB_ENV
echo "PKG_DIR=linux-hwe-${KERNEL_VERSION}" >> $GITHUB_ENV
- name: Set HWE Environment (Ubuntu 20.04)
if: matrix.release.hwe != '' && matrix.release.name == '20.04'
env:
NAME: ${{ matrix.release.name }}
KERNEL_VERSION: ${{ matrix.release.kernel }}
run: |
MATCH="${{ matrix.release.kernel }}.0-1[0-9][0-9]*~${NAME#*-}.[0-9]"
#MATCH="*~${NAME#*-}.[0-9]"
echo "MATCH=$MATCH" >> $GITHUB_ENV
echo "FLAVOUR_MATCH=*-${FLAVOUR}_${MATCH}" >> $GITHUB_ENV
echo "PKG_DIR=linux-hwe-${KERNEL_VERSION}" >> $GITHUB_ENV
- name: Set Non-HWE Environment
if: matrix.release.hwe == ''
env:
MATCH: ${{ matrix.release.kernel }}.0-*
REJECT: "*+[0-9][0-9].[0-9][0-9].[0-9]*"
run: |
echo "MATCH=$MATCH" >> $GITHUB_ENV
echo "REJECT=$REJECT" >> $GITHUB_ENV
echo "FLAVOUR_MATCH=${MATCH}-${FLAVOUR}_*" >> $GITHUB_ENV
echo "PKG_DIR=linux" >> $GITHUB_ENV
- name: Limit download range for 20.04
if: matrix.release.hwe == '' && matrix.release.kernel == 5.4
env:
MATCH: ${{ matrix.release.kernel }}.0-1[5-9][0-9]*
REJECT: "*+[0-9][0-9].[0-9][0-9].[0-9]*"
run: |
echo "MATCH=$MATCH" >> $GITHUB_ENV
echo "REJECT=$REJECT" >> $GITHUB_ENV
echo "FLAVOUR_MATCH=${MATCH}-${FLAVOUR}_*" >> $GITHUB_ENV
echo "PKG_DIR=linux" >> $GITHUB_ENV
- name: Limit download range for 22.04
if: matrix.release.hwe == '' && matrix.release.kernel == 5.15
env:
MATCH: ${{ matrix.release.kernel }}.0-1[0-9][0-9]*
REJECT: "*+[0-9][0-9].[0-9][0-9].[0-9]*"
run: |
echo "MATCH=$MATCH" >> $GITHUB_ENV
echo "REJECT=$REJECT" >> $GITHUB_ENV
echo "FLAVOUR_MATCH=${MATCH}-${FLAVOUR}_*" >> $GITHUB_ENV
echo "PKG_DIR=linux" >> $GITHUB_ENV
- name: Install dependencies 20.04
if: matrix.release.name == '20.04'
run: sudo apt-get -q=2 install libelf-dev
- name: Install dependencies 22.04
if: matrix.release.name == '22.04'
run: |
sudo apt-get -q=2 install libelf-dev gcc-12
MAKEFLAGS="${{ env.MAKEFLAGS }} CC=gcc-12"
echo "MAKEFLAGS=$MAKEFLAGS" >> $GITHUB_ENV
- name: Download Kernel Headers
uses: ./.github/actions/download
with:
output-path: ${{ env.DOWNLOAD }}
url: "${{ env.MIRROR }}/pool/main/l/${{ env.PKG_DIR }}"
accept: "linux-headers-${{ env.MATCH }}_all.deb,linux-hwe*-headers-${{ env.MATCH }}_all.deb,linux-headers-${{ env.FLAVOUR_MATCH }}_amd64.deb"
reject: "${{ env.REJECT }}"
- name: Unpack Kernel Headers
uses: ./.github/actions/unpack-deb
with:
input-path: ${{ env.DOWNLOAD }}
output-path: ${{ env.UNPACKED }}
- name: Build Ubuntu
uses: ./.github/actions/build
with:
search-path: "${{ env.UNPACKED }}/usr/src"
search-pattern: "*-${{ env.FLAVOUR }}"
build-centos:
name: 'Build-CentOS: ${{matrix.release.name}}'
runs-on: ubuntu-20.04
timeout-minutes: 90
env:
KVER: "*"
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
strategy:
matrix:
release: [
# CentOS
{ "name": "7.0.1406", "container": "centos:7.9.2009" },
{ "name": "7.1.1503", "container": "centos:7.9.2009" },
{ "name": "7.2.1511", "container": "centos:7.9.2009" },
{ "name": "7.3.1611", "container": "centos:7.9.2009" },
{ "name": "7.4.1708", "container": "centos:7.9.2009" },
{ "name": "7.5.1804", "container": "centos:7.9.2009" },
{ "name": "7.6.1810", "container": "centos:7.9.2009" },
{ "name": "7.7.1908", "container": "centos:7.9.2009" },
{ "name": "7.8.2003", "container": "centos:7.9.2009" },
{ "name": "7.9.2009", "container": "centos:7.9.2009" },
{ "name": "8.0.1905", "container": "rockylinux:8.5" },
{ "name": "8.1.1911", "container": "rockylinux:8.5" },
{ "name": "8.2.2004", "container": "rockylinux:8.5" },
{ "name": "8.3.2011", "container": "rockylinux:8.5" },
{ "name": "8.4.2105", "container": "rockylinux:8.5" },
{ "name": "8.5.2111", "container": "rockylinux:8.5" },
{ "name": "8.6", "container": "rockylinux:8.5" },
{ "name": "8.7", "container": "rockylinux:8.5" },
{ "name": "8.8", "container": "rockylinux:8.5" },
{ "name": "8.9", "container": "rockylinux:8.5" },
{ "name": "8.10", "container": "rockylinux:8.5" },
{ "name": "8-stream", "container": "rockylinux:8.5" },
{ "name": "9.0", "container": "rockylinux:9.0" },
{ "name": "9.1", "container": "rockylinux:9.0" },
{ "name": "9.2", "container": "rockylinux:9.0" },
{ "name": "9.3", "container": "rockylinux:9.0" },
{ "name": "9.4", "container": "rockylinux:9.0" },
{ "name": "9.5", "container": "rockylinux:9.0" },
{ "name": "9-stream", "container": "rockylinux:9.0" },
]
container:
image: ${{ matrix.release.container }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set Download Environment
env:
RELEASE_NAME: ${{ matrix.release.name }}
run: |
case $RELEASE_NAME in
7.[0-9].*|8.[0-5].*|8-stream) MIRROR="vault.centos.org" ;;
8.[6-9]) MIRROR="dl.rockylinux.org/vault/rocky" ;;
8.10) MIRROR="dl.rockylinux.org/pub/rocky" ;;
9.[0-4]) MIRROR="dl.rockylinux.org/vault/rocky" ;;
9.[5-9]) MIRROR="dl.rockylinux.org/pub/rocky" ;;
9-*) MIRROR="mirror.stream.centos.org" ;;
*) MIRROR="mirror.centos.org/centos" ;;
esac
case $RELEASE_NAME in
7.*) OS_DIR1="os"
OS_DIR2=""
;;
8*) OS_DIR1="BaseOS"
OS_DIR2="os"
;;
9*) OS_DIR1="AppStream"
OS_DIR2="os"
;;
esac
case $RELEASE_NAME in
9.*) OS_PATH="$MIRROR/$RELEASE_NAME/$OS_DIR1/x86_64/$OS_DIR2/Packages/k/"
;;
8.[6-9]) OS_PATH="$MIRROR/$RELEASE_NAME/$OS_DIR1/x86_64/$OS_DIR2/Packages/k/"
;;
8.1[0-9]) OS_PATH="$MIRROR/$RELEASE_NAME/$OS_DIR1/x86_64/$OS_DIR2/Packages/k/"
;;
*) OS_PATH="$MIRROR/$RELEASE_NAME/$OS_DIR1/x86_64/$OS_DIR2/Packages/"
esac
UPDATE_PATH="$MIRROR/$RELEASE_NAME/updates/x86_64/$OS_DIR2/Packages/"
echo "OS_PATH=$OS_PATH" >> $GITHUB_ENV
echo "UPDATE_PATH=$UPDATE_PATH" >> $GITHUB_ENV
- name: Cache OS Kernel Header Packages
uses: actions/cache@v3
env:
cache-name: cache-os-headers
with:
path: ${{ env.DOWNLOAD }}/${{ env.OS_PATH }}
key: ${{ env.cache-name }}-${{ matrix.release.name }}-v1
- name: Cache Update Kernel Header Packages
if: startsWith(matrix.release.name, '7')
uses: actions/cache@v3
env:
cache-name: cache-update-headers
with:
path: ${{ env.DOWNLOAD }}/${{ env.UPDATE_PATH }}
key: ${{ env.cache-name }}-${{ matrix.release.name }}-v1
- name: Fixup mirror for CentOS7 - Point to vault after EOL
if: startsWith(matrix.release.name, '7')
run: |
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#.*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
- name: Install Dependencies
run: yum -q -y install cpio elfutils-libelf-devel findutils gcc make wget ca-certificates
- name: Filter CentOS stream 8 kernel
if: startsWith(matrix.release.name, '8-stream')
run: |
KVER=$(curl -s "http://${{ env.OS_PATH }}/" | \
sed -En 's/.*kernel-devel-(4.18.0-[0-9].*).el8.*rpm.*/\1/p' | \
tail -n 1)
echo $KVER
echo "KVER=${KVER}*" >> $GITHUB_ENV
- name: Filter CentOS stream 9 and RHEL 9 kernels
if: startsWith(matrix.release.name, '9')
run: |
KVER=$(curl -s "http://${{ env.OS_PATH }}/" | \
sed -En 's/.*kernel-devel-(5.14.0-[0-9].*).el9*rpm.*/\1/p' | \
tail -n 1)
echo $KVER
echo "KVER=${KVER}*" >> $GITHUB_ENV
- name: Download OS Kernel Header Packages
uses: ./.github/actions/download
with:
output-path: ${{ env.DOWNLOAD }}
url: "http://${{ env.OS_PATH }}"
accept: "kernel-devel-${{ env.KVER }}.rpm"
- name: Download Update Kernel Header Packages
if: startsWith(matrix.release.name, '7')
uses: ./.github/actions/download
with:
output-path: ${{ env.DOWNLOAD }}
url: "http://${{ env.UPDATE_PATH }}"
accept: "kernel-devel-${{ env.KVER }}.rpm"
- name: Unpack Kernel Headers
uses: ./.github/actions/unpack-rpm
with:
input-path: ${{ env.DOWNLOAD }}
output-path: ${{ env.UNPACKED }}
- name: Build
uses: ./.github/actions/build
with:
search-path: "${{ env.UNPACKED }}/usr/src/kernels"
build-upstream-ubuntu:
name: 'Build-Upstream: ${{matrix.release.name}}'
runs-on: ubuntu-${{ matrix.release.runs-on }}
timeout-minutes: 20
env:
CDN: "cdn.kernel.org/pub/linux/kernel"
GITWEB: "git.kernel.org"
KERNEL_TARGET: "bindeb-pkg"
strategy:
matrix:
release: [
{ name: "net-next", runs-on: "20.04", },
{ name: "net", runs-on: "20.04", },
{ name: "6.11", runs-on: "20.04", },
{ name: "6.10", runs-on: "20.04", },
{ name: "6.9", runs-on: "20.04", },
{ name: "6.8", runs-on: "20.04", },
{ name: "6.7", runs-on: "20.04", },
{ name: "6.6", runs-on: "20.04", },
{ name: "6.5", runs-on: "20.04", },
{ name: "6.4", runs-on: "20.04", },
{ name: "6.3", runs-on: "20.04", },
{ name: "6.2", runs-on: "20.04", },
{ name: "6.1", runs-on: "20.04", },
{ name: "6.0", runs-on: "20.04", },
{ name: "5.19", runs-on: "20.04", },
{ name: "5.18", runs-on: "20.04", },
{ name: "5.17", runs-on: "20.04", },
{ name: "5.16", runs-on: "20.04", },
{ name: "5.15", runs-on: "20.04", },
{ name: "5.14", runs-on: "20.04", },
{ name: "5.13", runs-on: "20.04", },
{ name: "5.12", runs-on: "20.04", },
{ name: "5.11", runs-on: "20.04", },
{ name: "5.10", runs-on: "20.04", },
{ name: "5.9", runs-on: "20.04", },
{ name: "5.8", runs-on: "20.04", },
{ name: "5.7", runs-on: "20.04", },
{ name: "5.6", runs-on: "20.04", },
{ name: "5.5", runs-on: "20.04", },
{ name: "5.4", runs-on: "20.04", },
{ name: "5.3", runs-on: "20.04", },
]
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set Environment (Release)
if: startsWith(matrix.release.name, 'net') != true
run: |
RELEASE="${{ matrix.release.name }}"
MAJOR="${RELEASE%.*}"
DIR="linux-$RELEASE"
echo "CACHE_ID=$RELEASE" >> $GITHUB_ENV
echo "EXTRA_DEP=$EXTRA_DEP" >> $GITHUB_ENV
echo "KERNEL_DIR=$UNPACKED/$DIR" >> $GITHUB_ENV
echo "REMOTE=$CDN/v$MAJOR.x/$DIR.tar.xz" >> $GITHUB_ENV
echo "TAR_FLAGS=-J" >> $GITHUB_ENV
- name: Set Environment (Development Tree)
if: startsWith(matrix.release.name, 'net')
run: |
TREE="${{ matrix.release.name }}"
COMMIT_ID="$(wget -q -O - https://$GITWEB/netdev/$TREE/p/main | sed -En 's/[^ ]* //; T; s/(.{12}).*/\1/; p; q')"
DIR="$TREE-main"
echo "REMOTE=kernel.googlesource.com/pub/scm/linux/kernel/git/netdev/$TREE/+archive/refs/heads/main.tar.gz" >> $GITHUB_ENV
echo "CACHE_ID=$COMMIT_ID" >> $GITHUB_ENV
echo "KERNEL_DIR=$UNPACKED/$DIR" >> $GITHUB_ENV
echo "TAR_FLAGS=-z" >> $GITHUB_ENV
- name: Cache Kernel Header Package
uses: actions/cache@v3
id: header-cache
env:
cache-name: cache-headers-upstream
with:
path: ${{ env.UNPACKED }}/linux-headers-*.deb
# Need invalidate the cache when local_defconfig changes.
key: ${{ env.cache-name }}-${{ env.CACHE_ID }}-on-ubuntu-${{ hashFiles('./.github/data/local_defconfig') }}
- name: Set Environment (Not Cached)
if: steps.header-cache.outputs.cache-hit != 'true'
run: |
EXTRA_DEP+=" libelf-dev"
EXTRA_DEP+=" debhelper"
echo "EXTRA_DEP=$EXTRA_DEP" >> $GITHUB_ENV
- name: Install Dependencies
if: env.EXTRA_DEP != ''
run: sudo apt-get -q=2 install ${{ env.EXTRA_DEP }}
- name: Download Kernel Source
if: steps.header-cache.outputs.cache-hit != 'true'
uses: ./.github/actions/download
with:
output-path: "$DOWNLOAD"
url: "https://$REMOTE"
- name: Unpack Kernel Source
if: steps.header-cache.outputs.cache-hit != 'true'
run: |
case "${{ matrix.release.name }}" in
"net"*)
mkdir -p "$KERNEL_DIR";
tar -C "$KERNEL_DIR" "$TAR_FLAGS" -xf "$DOWNLOAD/$REMOTE";;
*)
mkdir -p "$UNPACKED";
tar -C "$UNPACKED" "$TAR_FLAGS" -xf "$DOWNLOAD/$REMOTE";;
esac
- name: Configure Kernel
if: steps.header-cache.outputs.cache-hit != 'true'
run: |
cp -p .github/data/local_defconfig "$KERNEL_DIR/arch/x86/configs/"
make -s -C "$KERNEL_DIR" local_defconfig
- name: Build Kernel Packages
if: steps.header-cache.outputs.cache-hit != 'true'
run: |
make -s -j"$(nproc)" -C "$KERNEL_DIR" "$KERNEL_TARGET"
- name: List Kernel Header Packages
run: |
ls "$UNPACKED"/linux-headers-*.deb
- name: Unpack Kernel Headers
uses: ./.github/actions/unpack-deb
with:
input-path: ${{ env.UNPACKED }}
output-path: ${{ env.UNPACKED }}
- name: Build
uses: ./.github/actions/build
with:
search-path: "${{ env.UNPACKED }}/usr/src"
build-upstream-ubuntu-container:
name: 'Build-Upstream-Old: ${{matrix.release}}'
runs-on: ubuntu-20.04
timeout-minutes: 20
env:
CDN: "cdn.kernel.org/pub/linux/kernel"
KERNEL_TARGET: "deb-pkg"
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
strategy:
matrix:
release: [
"5.2",
"5.1",
"5.0",
"4.20",
"4.19",
"4.18",
"4.17",
"4.16",
"4.15",
"4.14",
"4.13",
"4.12",
"4.11",
]
container:
image: ubuntu:18.04
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set Environment (Release)
run: |
RELEASE="${{ matrix.release }}"
EXTRA_DEP="wget libelf-dev xz-utils make gcc flex bison bc libssl-dev dpkg-dev kmod cpio"
MAJOR="${RELEASE%.*}"
DIR="linux-$RELEASE"
echo "CACHE_ID=$RELEASE" >> $GITHUB_ENV
echo "EXTRA_DEP=$EXTRA_DEP" >> $GITHUB_ENV
echo "KERNEL_DIR=$UNPACKED/$DIR" >> $GITHUB_ENV
echo "REMOTE=$CDN/v$MAJOR.x/$DIR.tar.xz" >> $GITHUB_ENV
echo "TAR_FLAGS=-J" >> $GITHUB_ENV
- name: Cache Kernel Header Package
uses: actions/cache@v3
id: header-cache
env:
cache-name: cache-headers-upstream
with:
path: ${{ env.UNPACKED }}/linux-headers-*.deb
# Need invalidate the cache when local_defconfig changes.
key: ${{ env.cache-name }}-${{ env.CACHE_ID }}-on-ubuntu-${{ hashFiles('./.github/data/local_defconfig') }}
- name: Install Dependencies
run: |
apt-get update
apt-get -q=2 install ${{ env.EXTRA_DEP }}
- name: Download Kernel Source
if: steps.header-cache.outputs.cache-hit != 'true'
uses: ./.github/actions/download
with:
output-path: "$DOWNLOAD"
url: "https://$REMOTE"
- name: Unpack Kernel Source
if: steps.header-cache.outputs.cache-hit != 'true'
run: |
mkdir -p "$UNPACKED"
tar -C "$UNPACKED" "$TAR_FLAGS" -xf "$DOWNLOAD/$REMOTE"
- name: Configure Kernel
if: steps.header-cache.outputs.cache-hit != 'true'
run: |
cp -p .github/data/local_defconfig "$KERNEL_DIR/arch/x86/configs/"
make -s -C "$KERNEL_DIR" local_defconfig
- name: Build Kernel Packages
if: steps.header-cache.outputs.cache-hit != 'true'
run: |
make -s -j"$(nproc)" -C "$KERNEL_DIR" "$KERNEL_TARGET"
- name: List Kernel Header Packages
run: |
ls "$UNPACKED"/linux-headers-*.deb
- name: Unpack Kernel Headers
uses: ./.github/actions/unpack-deb
with:
input-path: ${{ env.UNPACKED }}
output-path: ${{ env.UNPACKED }}
- name: Build
uses: ./.github/actions/build
with:
search-path: "${{ env.UNPACKED }}/usr/src"
build-upstream-centos-container:
name: 'Build-Really-Old: ${{matrix.release}}'
runs-on: ubuntu-20.04
timeout-minutes: 20
env:
CDN: "cdn.kernel.org/pub/linux/kernel"
KERNEL_TARGET: ""
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
strategy:
matrix:
release: [
"4.10",
"4.9",
"4.8",
"4.7",
"4.6",
"4.5",
"4.4",
"4.3",
"4.2",
"4.1",
"4.0",
"3.19",
"3.18",
"3.17",
"3.16",
"3.15",
"3.14",
"3.13",
"3.12",
"3.11",
"3.10",
"3.9",
"3.8",
]
container:
image: centos:7.5.1804
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set Environment (Release)
run: |
RELEASE="${{ matrix.release }}"
EXTRA_DEP+=" elfutils-libelf-devel"
EXTRA_DEP+=" gcc"
EXTRA_DEP+=" make"
EXTRA_DEP+=" wget"
EXTRA_DEP+=" rpm-build"
EXTRA_DEP+=" perl"
EXTRA_DEP+=" perl-devel"
EXTRA_DEP+=" bc"
EXTRA_DEP+=" ca-certificates"
MAJOR="${RELEASE%.*}"
DIR="linux-$RELEASE"
echo "EXTRA_DEP=$EXTRA_DEP" >> $GITHUB_ENV
echo "KERNEL_DIR=$UNPACKED/$DIR" >> $GITHUB_ENV
echo "REMOTE=$CDN/v$MAJOR.x/$DIR.tar.xz" >> $GITHUB_ENV
echo "TAR_FLAGS=-J" >> $GITHUB_ENV
- name: Fixup mirror for CentOS7 - Point to vault after EOL
run: |
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#.*baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
- name: Install Dependencies
if: env.EXTRA_DEP != ''
run: yum -qy install ${{ env.EXTRA_DEP }}
- name: Download Kernel Source
uses: ./.github/actions/download
with:
output-path: "$DOWNLOAD"
url: "https://$REMOTE"
- name: Unpack Kernel Source
run: |
mkdir -p "$UNPACKED"
tar -C "$UNPACKED" "$TAR_FLAGS" -xf "$DOWNLOAD/$REMOTE"
- name: Patch Kernel Source
if: matrix.release.name == '3.8'
run: |
sed -i 's/if (!defined(@val))/if (!(@val))/' \
"$KERNEL_DIR/kernel/timeconst.pl"
- name: Configure Kernel
run: |
cp -p .github/data/local_defconfig "$KERNEL_DIR/arch/x86/configs/"
make -s -C "$KERNEL_DIR" local_defconfig
- name: Build Kernel Packages
run: |
make -s -j $(nproc) -C "$KERNEL_DIR"
- name: Build
uses: ./.github/actions/build
with:
search-path: "$KERNEL_DIR/../"
search-pattern: "*${{ matrix.release.name }}*"