Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Kernel Builder

Kernel Builder #62

Workflow file for this run

name: Kernel Builder
on:
workflow_dispatch:
jobs:
build:
name: Kernel Builder
runs-on: ubuntu-latest
env:
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
CCACHE_NOHASHDIR: "true"
CCACHE_HARDLINK: "true"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup packages
run: |
sudo apt-get update -y
sudo apt-get -y install repo bc bison build-essential curl ccache coreutils flex g++-multilib gcc-multilib git gnupg \
gperf libxml2 lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-gtk3-dev imagemagick lunzip lzop schedtool squashfs-tools xsltproc zip \
zlib1g-dev perl xmlstarlet virtualenv xz-utils rr jq libncurses5 pngcrush lib32ncurses5-dev git-lfs libxml2 openjdk-11-jdk wget lib32readline-dev \
libssl-dev libxml2-utils android-sdk-libsparse-utils lld zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig ca-certificates bc cpio imagemagick \
bsdmainutils lz4 aria2 rclone ssh-client libncurses5 libssl-dev rsync schedtool python-is-python3 libarchive-tools python3 zstd
- name: Set swap to 10G
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 10
- name: Clone kernel repo
run: |
git clone https://github.com/SingkoLab/kernel_xiaomi_spes_sm6225 -b main kernel --depth=1
cd kernel
- name: Build
run: |
cd kernel
wget https://raw.githubusercontent.com/SingkoLab/Kernel-Builder/spes/config.env
wget https://raw.githubusercontent.com/SingkoLab/Kernel-Builder/spes/build.sh && chmod +x ./build.sh
echo "Building kernel"
./build.sh
- name: Extract Version Info
id: extract_version_info
run: |
FILE_NAME=$(basename kernel/builds/*.zip)
KERNEL_NAME=$(echo $FILE_NAME | cut -d'-' -f4)
VERSION=$(echo $FILE_NAME | cut -d'-' -f5)
DEVICE=$(echo $FILE_NAME | cut -d'-' -f6)
echo "KERNEL_NAME=${KERNEL_NAME}" >> $GITHUB_ENV
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "DEVICE=${DEVICE}" >> $GITHUB_ENV
- name: Create Release Notes
run: |
touch release_notes.txt
echo "## Release Notes" > release_notes.txt
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: kernel/builds/*.zip
tag: "${{ github.run_number }}"
name: "Release ${{ env.VERSION }}"
token: ${{ secrets.PAT_TOKEN }}
bodyFile: release_notes.txt