-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (64 loc) · 2.58 KB
/
test-build.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
70
71
72
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'
required: true
default: 'https://github.com/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: Remove unused packages
if: env.REMOVE_UNUSED_PACKAGES == 'true'
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: false
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false
- 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 || 'https://github.com/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
- 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' }}