Skip to content

Commit a13c871

Browse files
committed
github: add build workflow
1 parent 7f2ff7b commit a13c871

1 file changed

Lines changed: 78 additions & 0 deletions

File tree

.github/workflows/build.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# based on https://github.com/zabbly/linux/blob/x86_64/.github/workflows/builds.yml
2+
name: Builds
3+
on:
4+
- push
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
build-kernel:
11+
name: Build kernel
12+
strategy:
13+
fail-fast: false
14+
runs-on: ubuntu-24.04
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Install dependencies
20+
run: |
21+
sudo apt-get install --yes \
22+
bc \
23+
binutils \
24+
bison \
25+
cpio \
26+
debhelper \
27+
dpkg-dev \
28+
flex \
29+
git \
30+
kmod \
31+
libelf-dev \
32+
libssl-dev \
33+
rsync \
34+
zstd
35+
36+
sudo apt-get install --yes pahole || true
37+
38+
- name: Configure git
39+
run: |
40+
git config user.email "noreply@kernoops.org"
41+
git config user.name "Custom kernel build"
42+
43+
- name: Generate version string
44+
env:
45+
PKGARCH: "amd64"
46+
PKGOS: "ubuntu-24.04"
47+
run: |
48+
VERSION="$(make kernelversion)-${PKGARCH}-$(date -u +%Y%m%d%H%M)-$(echo ${PKGOS} | sed "s/-//g")"
49+
echo "${VERSION}"
50+
echo "${VERSION}" > ../.version
51+
52+
- name: Build the kernel
53+
env:
54+
DEBEMAIL: "noreply@kernoops.org"
55+
DEBFULLNAME: "Custom Kernel Builds"
56+
KDEB_CHANGELOG_DIST: "ubuntu-24.04"
57+
KDEB_COMPRESS: "zstd"
58+
PKGOS: "ubuntu-24.04"
59+
run: |
60+
export KDEB_PKGVERSION="$(cat ../.version)"
61+
export KDEB_SOURCENAME="linux-kernoops-${KDEB_PKGVERSION}"
62+
63+
make oldconfig
64+
make deb-pkg -j$(nproc) || make deb-pkg -j$(nproc)
65+
66+
- name: Prepare the artifacts
67+
run: |
68+
mkdir out/
69+
mv ../linux-* out/
70+
71+
- name: Upload resulting build
72+
uses: actions/upload-artifact@v4
73+
continue-on-error: true
74+
with:
75+
name: linux-kernel-build
76+
path: out/*
77+
if-no-files-found: error
78+
retention-days: 90

0 commit comments

Comments
 (0)