This repository was archived by the owner on Oct 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
161 lines (135 loc) · 4.91 KB
/
kernel_build_b1c1.yml
File metadata and controls
161 lines (135 loc) · 4.91 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: Build KernelSU-Next for B1C1 (Blueline/Crosshatch)
on:
push:
branches:
- b1c1
pull_request:
branches:
- b1c1
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: 📂 Checkout builder's sourcecode and get files
uses: actions/checkout@v4
- name: ⚡ Checkout kernel's sourcecode and clone submodules
run: |
git clone --depth=1 https://github.com/Evolution-X-Devices/kernel_google_b1c1/ -b vic
- name: 📅 Export date of build
run: |
echo "DATE=$(date +%d%m%Y)" >> $GITHUB_ENV
- name: 📥 Clone AnyKernel3
run: |
cd kernel_google_b1c1
git clone --depth=1 -b b1c1 https://github.com/Oneloutre/AnyKernel3.git anykernel
rm -rf anykernel/.git
- name: 📦 Install dépendencies
run: |
sudo apt-get update -y -qq
sudo apt-get install -y --no-install-recommends \
python3-pip \
git \
zip \
unzip \
gcc \
g++ \
make \
ninja-build \
file \
bc \
bison \
flex \
libfl-dev \
libssl-dev \
libelf-dev \
wget \
build-essential \
python3-dev \
python3-setuptools \
rsync \
ccache \
llvm-dev
sudo apt install flex libncurses6 libncurses5 binutils-aarch64-linux-gnu device-tree-compiler \
android-sdk-libsparse-utils python2
sudo apt install -y gcc-arm-linux-gnueabi
echo "CROSS_COMPILE_ARM32=arm-linux-gnueabi-" >> $GITHUB_ENV
- name: 🔧 Install Clang from a Github action
uses: KyleMayes/install-llvm-action@v2
with:
version: "18.1.8"
directory: ${{ runner.temp }}/llvm
- name: 🔧 Add Clang to the PATH
run: |
echo "${{ runner.temp }}/llvm/bin" >> $GITHUB_PATH
- name: 🛠 Use repo's mkdtimg
run: |
chmod +x tools/mkdtimg
sudo mv tools/mkdtimg /usr/local/bin/mkdtimg
- name: 🔍 Device's codename and kernel's version
run: |
cd kernel_google_b1c1
DEVICE_CODENAME=blueline-crosshatch
KERNEL_VERSION=$(make kernelversion)
echo "Device Codename: $DEVICE_CODENAME"
echo "Kernel Version: $KERNEL_VERSION"
echo "DEVICE_CODENAME=$DEVICE_CODENAME" >> $GITHUB_ENV
echo "KERNEL_VERSION=$KERNEL_VERSION" >> $GITHUB_ENV
- name: 🚀 Enable ccache to speed the build up
uses: hendrikmuhs/ccache-action@v1.2
with:
max-size: 7G
- name: 🛠️ Build the kramel
run: |
cd kernel_google_b1c1
export ARCH=arm64
export SUBARCH=arm64
export KBUILD_COMPILER_STRING=$(clang --version | head -n 1)
export CCACHE_EXEC=$(which ccache)
export KBUILD_BUILD_HOST="Caelum-Github-actions-Onelots"
make O=out ARCH=arm64 b1c1_defconfig vendor/kernelsu.config V=1
make O=out ARCH=arm64 olddefconfig
make -j$(nproc --all) O=out \
ARCH=arm64 \
CC="ccache clang" \
LLVM=1 \
LLVM_IAS=1 \
CLANG_TRIPLE=aarch64-linux-gnu- \
CROSS_COMPILE=aarch64-linux-android- \
CROSS_COMPILE_ARM32=arm-linux-androideabi-
- name: 🚀 Copy the compiled kernel to AnyKernel3 then create the zip
run: |
cd kernel_google_b1c1
ZIP_NAME="Kernel-Caelum-${DEVICE_CODENAME}-${KERNEL_VERSION}-$(date +%d%m%Y).zip"
cp out/arch/arm64/boot/Image.lz4-dtb anykernel/
cd anykernel && zip -r9 $ZIP_NAME ./*
mv $ZIP_NAME ../../
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV
- name: 🤌 Copy zip file to get 2 different zip files
run: |
ZIP_ALTERNATIVE="KernelSU-Next-Caelum-${DEVICE_CODENAME}-latest.zip"
cp ${ZIP_NAME} $ZIP_ALTERNATIVE
echo "Copied ${ZIP_NAME} as $ZIP_ALTERNATIVE"
echo "ZIP_ALTERNATIVE=$ZIP_ALTERNATIVE" >> $GITHUB_ENV
- name: 📤 Publish github release
uses: softprops/action-gh-release@v2
with:
files: ${{ env.ZIP_ALTERNATIVE }}
tag_name: "latest"
draft: false
prerelease: false
- name: 📤 Publish with tag associated to the kernel and the date
uses: softprops/action-gh-release@v2
with:
files: ${{ env.ZIP_NAME }}
tag_name: Kernel-Caelum-SUSFS-experimental-${{ env.DEVICE_CODENAME }}-${{ env.KERNEL_VERSION }}-${{ env.DATE }}
draft: false
prerelease: false
- name: 🚀 Notify people on Discord
env:
DEVICE_CODENAME: ${{ env.DEVICE_CODENAME }}
KERNEL_VERSION: ${{ env.KERNEL_VERSION }}
WEBHOOK: ${{ secrets.WEBHOOK }}
NAME: ${{ env.ZIP_NAME }}
run: |
python3 .github/webhook.py