-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f91763
commit 5f51213
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: (LINEAGE 21) Redmi 9 (lancelot) | ||
on: | ||
schedule: | ||
- cron: "0 0 * * 6" | ||
workflow_dispatch: | ||
push: | ||
|
||
jobs: | ||
build: | ||
name: Build default kernel for Redmi 9 (lancelot) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Preparing build environment | ||
run: | | ||
echo "BUILD_TIME=$(TZ=Europe/Moscow date "+%Y%m%d%H%M")" >> $GITHUB_ENV | ||
sudo apt update | ||
sudo apt install git ccache automake flex lzop bison gperf build-essential zip curl zlib1g-dev g++-multilib libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools pngcrush schedtool dpkg-dev liblz4-tool make optipng maven libssl-dev pwgen libswitch-perl policycoreutils minicom libxml-sax-base-perl libxml-simple-perl bc libc6-dev-i386 lib32ncurses5-dev libx11-dev lib32z-dev libgl1-mesa-dev xsltproc unzip device-tree-compiler python2 python3 | ||
mkdir -p $GITHUB_WORKSPACE/action_dir | ||
|
||
- name: Cloning Proton Clang | ||
run: | | ||
cd $GITHUB_WORKSPACE/action_dir | ||
git clone https://github.com/kdrag0n/proton-clang --depth=1 | ||
|
||
- name: Cloning kernel tree | ||
run: | | ||
cd $GITHUB_WORKSPACE/action_dir | ||
git clone https://github.com/mt6768-dev/android_kernel_xiaomi_mt6768 -b lineage-21 kernel_tree --depth=1 | ||
|
||
- name: Building kernel | ||
run: | | ||
cd $GITHUB_WORKSPACE/action_dir/kernel_tree | ||
export PATH=$GITHUB_WORKSPACE/action_dir/proton-clang/bin:$PATH | ||
export KBUILD_BUILD_HOST=github | ||
export KBUILD_BUILD_USER=BadSoul_SFC | ||
|
||
make -j$(nproc --all) CC=clang O=out ARCH=arm64 LD=ld.lld CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_ARM32=arm-linux-gnueabi- lancelot_defconfig | ||
make -j$(nproc --all) CC=clang O=out ARCH=arm64 LD=ld.lld CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_ARM32=arm-linux-gnueabi- | ||
|
||
- name: Creating update.zip (AnyKernel3) | ||
run: | | ||
cd $GITHUB_WORKSPACE/action_dir | ||
git clone https://github.com/osm0sis/AnyKernel3 --depth=1 AnyKernel3 | ||
sed -i 's/do.devicecheck=1/do.devicecheck=0/g' AnyKernel3/anykernel.sh | ||
sed -i 's!block=/dev/block/platform/bootdevice/by-name/boot;!block=auto;!g' AnyKernel3/anykernel.sh | ||
sed -i 's/is_slot_device=0;/is_slot_device=auto;/g' AnyKernel3/anykernel.sh | ||
cp kernel_tree/out/arch/arm64/boot/Image.gz-dtb AnyKernel3/ | ||
rm -rf AnyKernel3/.git* AnyKernel3/README.md | ||
|
||
- name: Uploading update.zip | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: KernelSU-${{ env.BUILD_TIME }}-lancelot-14 | ||
path: action_dir/AnyKernel3/* |