Update README.md #52
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
name: Test build kernel for 4.4-mtk | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
defconfig: | |
description: 'Defconfig file name' | |
required: true | |
default: 'your_default_defconfig' | |
repo_url: | |
description: 'Kernel repository URL (without https://github.com/)' | |
required: true | |
default: 'mlm-games/android_kernel_lenovo_mt8765_P' | |
branch: | |
description: 'Repository Branch' | |
required: true | |
default: 'stock' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
steps: | |
- name: Set swap to 10G | |
uses: pierotofy/set-swap-space@master | |
with: | |
swap-size-gb: 10 | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.event.inputs.repo_url || 'mlm-games/android_kernel_lenovo_mt8765_P' }} | |
ref: ${{ github.event.inputs.branch || 'stock' }} | |
fetch-depth: 1 | |
- name: Kernel build deps | |
run: | | |
sudo apt update | |
sudo apt-get 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 | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 2 | |
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1 | |
sudo update-alternatives --set python /usr/bin/python2.7 | |
- name: Download gcc | |
run: | | |
git clone https://github.com/djb77/aarch64-linux-android-4.9 ../aarch64-linux-android-4.9 | |
- name: Add ksu and build kernel using build_kernel.sh | |
run: | | |
curl -LSs "https://raw.githubusercontent.com/mlm-games/KernelSU-Non-GKI/main/kernel/setup-subm.sh" | bash -s | |
python3 KernelSU/scripts/integrate-no-kprobe.py ${{ github.event.inputs.defconfig || 'mt8765_P_defconfig' }} | |
./build_kernel.sh ${{ github.event.inputs.defconfig || 'mt8765_P_defconfig' }} |