Skip to content

Commit dff19cf

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

1 file changed

Lines changed: 81 additions & 0 deletions

File tree

.github/workflows/build.yaml

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

0 commit comments

Comments
 (0)