-
Notifications
You must be signed in to change notification settings - Fork 4
69 lines (67 loc) · 3.13 KB
/
Builder.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Build KernelSU For MI8SE(sirius)
on:
workflow_dispatch:
jobs:
KSUForSirius:
runs-on: ubuntu-latest
steps:
- name: Installing Dependencies
run: |
sudo apt update -y
sudo apt-get install -y zip flex bison libncurses-dev gawk libiberty-dev autoconf kmod bc build-essential gcc libc6 curl libstdc++6 git wget libssl-dev cpio p7zip-full
sudo apt clean
- name: Cloning Sources and Toolchain
run: |
git clone https://github.com/liqidecg/android_kernel_xiaomi_sdm710 --depth=1 -b lineage-20 --recurse-submodules android_kernel_xiaomi_sdm710_LineageOS
git clone https://gitlab.com/crdroidandroid/android_prebuilts_clang_host_linux-x86_clang-r445002 --depth=1 --single-branch --no-tags -b 12.0 ~/clang
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 -b android-10.0.0_r47 --depth=1 --single-branch --no-tags ~/aarch64-linux-android-4.9
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9 -b android-10.0.0_r47 --depth=1 --single-branch --no-tags ~/arm-linux-androideabi-4.9
git clone https://github.com/SakuraNotStupid/AnyKernel3
- name: Applying Kernel Patch(LineageOS)
run: |
cd android_kernel_xiaomi_sdm710_LineageOS/KernelSU
wget https://github.com/liqideqq/KernelSU/commit/eeb2b07d5178a741341dce79eb68cd2052488cb3.patch
patch -p1 < eeb2b07d5178a741341dce79eb68cd2052488cb3.patch
rm -rf *.patch
- name: Compiling Kernel(LineageOS)
run: |
CLANG=~/clang/bin
GCC32=~/arm-linux-androideabi-4.9/bin
GCC64=~/aarch64-linux-android-4.9/bin
PATH=$CLANG:$GCC64:$GCC32:$PATH
export PATH
export ARCH=arm64
export CLANG_TRIPLE=aarch64-linux-gnu
export CROSS_COMPILE=aarch64-linux-android-
export CROSS_COMPILE_ARM32=arm-linux-androideabi-
output_dir=out
pushd android_kernel_xiaomi_sdm710_LineageOS
make O="$output_dir" \
sdm670-perf_defconfig \
xiaomi/sdm710-common.config \
xiaomi/sirius.config
make -j $(nproc) \
O="$output_dir" \
CC=clang
popd
- name: Packaging the Kernel(LineageOS)
run: |
cp -v android_kernel_xiaomi_sdm710_LineageOS/out/arch/arm64/boot/Image.gz \
AnyKernel3/
pushd AnyKernel3
7z a -mx9 ../MI8SE_KernelSU_LineageOS.zip *
popd
- name: Creating Config Info
run: |
echo "Device: MI 8 SE
Code: Sirius/Xmsirius
Build Code: ${{ github.run_number }}
KernelSU For MI8SE" >> INFO.txt
- name: Uploading Kernel Package to GH-Release
uses: ncipollo/[email protected]
with:
artifacts: MI8SE_KernelSU_LineageOS.zip
name: "MI8SE_KernelSU"
tag: " ${{ github.run_number }}_MI8SE_KernelSU"
bodyFile: "INFO.txt"
token: ${{ secrets.GITHUB_TOKEN }}