kernel: CI build for 5.15.y (#30)

This commit is contained in:
YuKongA
2023-01-07 16:39:19 +08:00
committed by GitHub
parent 36aff66835
commit 0c6de7a1ed
4 changed files with 65 additions and 22 deletions

View File

@@ -1,9 +1,9 @@
name: Build Kernel
name: Build Kernel 5.10
on:
push:
branches: [ "main" ]
paths:
- '.github/workflows/build-kernel.yml'
- '.github/workflows/build-kernel-5.10.yml'
- 'kernel/**'
pull_request:
branches: [ "main" ]
@@ -46,8 +46,8 @@ jobs:
cd $GITHUB_WORKSPACE
git clone https://gerrit.googlesource.com/git-repo
mkdir android-kernel && cd android-kernel
../git-repo/repo init -u https://android.googlesource.com/kernel/manifest -b common-${{ matrix.tag }}
../git-repo/repo sync
../git-repo/repo init --depth=1 --u https://android.googlesource.com/kernel/manifest -b common-${{ matrix.tag }}
../git-repo/repo sync -j$(nproc --all)
echo "[+] KernelSU setup"
GKI_ROOT=$(pwd)
echo "[+] GKI_ROOT: $GKI_ROOT"
@@ -100,4 +100,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: kernel-aarch64-${{ matrix.version }}-boot-gz.img
path: android-kernel/out/*/dist/boot-gz.img
path: android-kernel/out/*/dist/boot-gz.img

57
.github/workflows/build-kernel-5.15.yml vendored Normal file
View File

@@ -0,0 +1,57 @@
name: Build Kernel 5.15
on:
push:
branches: [ "main" ]
paths:
- '.github/workflows/build-kernel-5.15.yml'
- 'kernel/**'
pull_request:
branches: [ "main" ]
paths:
- 'kernel/**'
jobs:
build:
strategy:
matrix:
include:
- version: "android13-5.15-41"
tag: "android13-5.15-2022-11"
os_version: 13.0.0
os_version_level: "2022-11"
- version: "android13-5.15-74"
tag: "android13-5.15-2022-12"
os_version: 13.0.0
os_version_level: "2022-12"
name: Build aarch64-${{ matrix.version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: KernelSU
- name: Download Kernel Source
run: |
cd $GITHUB_WORKSPACE
git clone https://gerrit.googlesource.com/git-repo
mkdir android-kernel && cd android-kernel
../git-repo/repo init --depth=1 --u https://android.googlesource.com/kernel/manifest -b common-${{ matrix.tag }}
../git-repo/repo sync -j$(nproc --all)
echo "[+] KernelSU setup"
GKI_ROOT=$(pwd)
echo "[+] GKI_ROOT: $GKI_ROOT"
echo "[+] Copy kernel su driver to $GKI_ROOT/common/drivers"
ln -sf $GITHUB_WORKSPACE/KernelSU/kernel $GKI_ROOT/common/drivers/kernelsu
echo "[+] Add kernel su driver to Makefile"
DRIVER_MAKEFILE=$GKI_ROOT/common/drivers/Makefile
grep -q "kernelsu" $DRIVER_MAKEFILE || echo "obj-y += kernelsu/" >> $DRIVER_MAKEFILE
echo "[+] KernelSU setup Done."
- name: Build boot.img
working-directory: android-kernel
run: BUILD_BOOT_IMG=1 SKIP_VENDOR_BOOT=1 KERNEL_BINARY=Image AVB_SIGN_BOOT_IMG=1 AVB_BOOT_PARTITION_SIZE=$((64*1024*1024)) AVB_BOOT_ALGORITHM=SHA256_RSA2048 AVB_BOOT_KEY=prebuilts/kernel-build-tools/linux-x86/share/avb/testkey_rsa2048.pem BOOT_IMAGE_HEADER_VERSION=4 LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
- name: Upload boot.img
uses: actions/upload-artifact@v3
with:
name: kernel-aarch64-${{ matrix.version }}-boot.img
path: android-kernel/out/*/dist/boot.img