forked from MYTHOSick/android_kernel_oneplus_sm8250
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (68 loc) · 2.5 KB
/
build-oneplus-sm8250-kernel.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
73
74
75
76
name: Build OnePluss-Sm8250-Kernel
on:
workflow_dispatch:
schedule:
# Run once a week on Sunday at midnight. See http://crontab.guru
- cron: '0 21 * * *'
push:
branches:
- HEAD
pull_request:
branches:
- HEAD
jobs:
build:
runs-on: ubuntu-latest
env:
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
CCACHE_NOHASHDIR: "true"
CCACHE_MAXSIZE: "2G"
CCACHE_HARDLINK: "true"
KERNEL_DEFCONFIG: "vendor/kona-perf_defconfig"
KERNEL_CMDLINE: "ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_ARM32=arm-linux-gnueabi- LLVM=1 LLVM_IAS=1 O=out"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
fetch-depth: 100
- name: Set up ccache
uses: hendrikmuhs/[email protected]
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt install gcc-aarch64-linux-gnu -y
sudo apt install gcc-arm-linux-gnueabi -y
sudo apt install binutils make python3 libssl-dev build-essential bc bison flex unzip libssl-dev ca-certificates xz-utils mkbootimg cpio device-tree-compiler git git-lfs -y
git clone https://codeberg.org/Mandi-Sa/clang --dept=1 -b amd64-kernel-arm
git clone https://github.com/lateautumn233/AnyKernel3 -b master --depth=1
rm -rf AnyKernel3/.git
- name: GetTime
id: get_time
run: |
echo "TIME=$(TZ=UTC-8 date +%m%d%H%M )" >> $GITHUB_OUTPUT
- name: Build Kernel
run: |
export PATH=$(pwd)/clang/bin/:$PATH
export ARCH=arm64
export SUBARCH=arm64
make $KERNEL_CMDLINE $KERNEL_DEFCONFIG CC="ccache clang"
make $KERNEL_CMDLINE CC="ccache clang" -j$(nproc --all)
cp out/arch/arm64/boot/Image.gz AnyKernel3
- name: Upload Kernel
uses: actions/upload-artifact@v3
with:
name: Qiuqiu-kernel-${{ steps.get_time.outputs.TIME }}
path: "AnyKernel3/*"
- name: Build Kernel-SU
run: |
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s main
export PATH=$(pwd)/clang/bin/:$PATH
make $KERNEL_CMDLINE $KERNEL_DEFCONFIG CC="ccache clang"
make $KERNEL_CMDLINE CC="ccache clang" -j$(nproc --all)
cp out/arch/arm64/boot/Image.gz AnyKernel3
- name: Upload Kernel-SU
uses: actions/upload-artifact@v3
with:
name: Qiuqiu-kernel-SU-${{ steps.get_time.outputs.TIME }}
path: "AnyKernel3/*"