Skip to content

build

build #8

Workflow file for this run

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
strategy:
fail-fast: true
matrix:
include:
- config: v1
# - config: v2
# - config: v3
# - config: v4
name: "🚧 Build for ${{matrix.config}}"
steps:
- 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: |
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 }} \
config_x86-64-${{ matrix.config }}
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
- name: Upload-Kernel
uses: actions/upload-artifact@v4
with:
name: Xanmod-${{ github.event.inputs.KERNEL_VER }}-${{ github.event.inputs.LLVM_VER }}-config_x86-64-${{ matrix.config }}
path: kernel/
compression-level: 9