build #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 you want to build (check gitlab branches of xanmod))' | |
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 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} 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 | |
rm -rf *.gz | |
rm -rf *.dsc | |
rm -rf *.buildinfo | |
rm -rf *.changes | |
- name: Upload kernel | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Kernel-Build | |
path: kernel/ | |
compression-level: 9 |