-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (81 loc) · 2.53 KB
/
build.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
name: build
on:
workflow_dispatch:
inputs:
LLVM_VER:
description: 'LLVM_VER (Specify LLVM Version)'
required: true
default: '19'
KERNEL_VER:
description: 'KERNEL_VER (Specify XANMOD branch to build)'
required: true
default: '6.6'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install packages & setup
run: |
sudo apt update
sudo apt purge firefox -y
sudo apt upgrade
sudo apt install \
wget \
build-essential \
bison \
flex \
pkg-config \
qtcreator \
qtbase5-dev \
qt5-qmake \
qttools5-dev-tools \
libssl-dev \
libncurses-dev \
git \
libelf-dev \
lz4 \
debhelper \
dh-virtualenv \
zstd \
elfutils -y
- name: Setup Clang/LLVM
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{ github.event.inputs.LLVM_VER }}
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 12
- name: Clone Kernel Source
run: |
git clone --depth=1 https://gitlab.com/xanmod/linux -b ${{ github.event.inputs.KERNEL_VER }} kernel/xanmod
- name: Run Build
run: |
cp config kernel/xanmod/.config
cd kernel/xanmod
make clean
rm -rf vmlinux-gdb.py
export LLVM_SUFFIX=-${{ github.event.inputs.LLVM_VER }}
make \
CC=clang${LLVM_SUFFIX} \
LD=ld.lld${LLVM_SUFFIX} \
LLVM=1 \
LLVM_IAS=1 \
LLVM_SUFFIX=-${{ github.event.inputs.LLVM_VER }} \
LOCALVERSION=-xanmod-${{ github.event.inputs.KERNEL_VER }}-clang-${{ github.event.inputs.LLVM_VER }} \
deb-pkg -j$(nproc)
cd ..
cp xanmod/.config config
rm -rf xanmod *.gz *.dsc *.buildinfo *.changes
tar -cf - *.deb | zstd > Xanmod-${{ github.event.inputs.KERNEL_VER }}-${{ github.event.inputs.LLVM_VER }}.tar.zst
- name: Upload-Kernel
uses: actions/upload-artifact@v4
with:
name: Xanmod-${{ github.event.inputs.KERNEL_VER }}-${{ github.event.inputs.LLVM_VER }}-nongenric
path: kernel/
compression-level: 0