forked from torvalds/linux
-
-
Notifications
You must be signed in to change notification settings - Fork 8
111 lines (96 loc) · 2.73 KB
/
builds.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
name: Builds
on:
- push
permissions:
contents: read
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build-kernel:
name: Build kernel
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- debian-11
- debian-12
arch:
- amd64
exclude:
- os: debian-11
arch: arm64
runs-on:
- self-hosted
- cpu-16
- mem-8G
- arch-${{ matrix.arch }}
- image-${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get install --yes \
bc \
binutils \
bison \
cpio \
debhelper \
dpkg-dev \
flex \
git \
kmod \
libelf-dev \
libssl-dev \
rsync \
zstd
sudo apt-get install --yes pahole || true
- name: Configure git
run: |
git config user.email "[email protected]"
git config user.name "Zabbly kernel build"
- name: Generate version string
env:
PKGARCH: "${{ matrix.arch }}"
PKGOS: "${{ matrix.os }}"
run: |
VERSION="$(make kernelversion)-${PKGARCH}-$(date -u +%Y%m%d%H%M)-$(echo ${PKGOS} | sed "s/-//g")"
echo "${VERSION}"
echo "${VERSION}" > ../.version
- name: Update the configuration
run: |
export KDEB_PKGVERSION="$(cat ../.version)"
make oldconfig
git diff .config > ../linux-${KDEB_PKGVERSION}.config.diff
git commit -m "TEMP: Refresh kernel configuration" .config
- name: Prepare for the build
run: |
mv .config .config.new
git commit -m "TEMP: Remove config from index" .config
mv .config.new .config
- name: Build the kernel
env:
DEBEMAIL: "[email protected]"
DEBFULLNAME: "Zabbly Kernel Builds"
KDEB_CHANGELOG_DIST: "${{ matrix.os }}"
KDEB_COMPRESS: "zstd"
PKGOS: "${{ matrix.os }}"
run: |
[ "${PKGOS}" = "debian-11" ] && export KDEB_COMPRESS="gzip"
export KDEB_PKGVERSION="$(cat ../.version)"
export KDEB_SOURCENAME="linux-zabbly-${KDEB_PKGVERSION}"
make deb-pkg -j16 || make deb-pkg -j16
- name: Prepare the artifacts
run: |
mkdir out/
mv ../linux-* out/
rm -f out/*dbg*
- name: Upload resulting build
uses: actions/upload-artifact@v3
continue-on-error: true
with:
name: ${{ matrix.os }}-${{ matrix.arch }}
path: out/*