From 5f5121369ac03d485dda7fd97bddae81397d2d06 Mon Sep 17 00:00:00 2001 From: BadSoulSFC <70845078+BadSoulSFC@users.noreply.github.com> Date: Sat, 17 Aug 2024 09:47:42 +0400 Subject: [PATCH] Update workflows --- .github/workflows/lancelot-14-default | 54 +++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/lancelot-14-default diff --git a/.github/workflows/lancelot-14-default b/.github/workflows/lancelot-14-default new file mode 100644 index 0000000..f378819 --- /dev/null +++ b/.github/workflows/lancelot-14-default @@ -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/* \ No newline at end of file