ci: Add debug kernel build (#506)

This commit is contained in:
weishu
2023-05-16 18:30:33 +08:00
committed by GitHub
parent f5d3fb6217
commit 538d3f06f4
2 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
name: Build debug kernel
on:
workflow_dispatch:
jobs:
build-debug-kernel-a12:
uses: ./.github/workflows/gki-kernel.yml
with:
version: android12-5.10
version_name: android12-5.10.160
tag: android12-5.10-2023-02
os_patch_level: 2023-02
patch_path: "5.10"
debug: true
build-debug-kernel-a13:
strategy:
matrix:
include:
- version: "5.10"
sub_level: 149
os_patch_level: 2022-11
- version: "5.15"
sub_level: 74
os_patch_level: 2023-01
uses: ./.github/workflows/gki-kernel.yml
with:
version: android13-${{ matrix.version }}
version_name: android13-${{ matrix.version }}.${{ matrix.sub_level }}
tag: android13-${{ matrix.version }}-${{ matrix.os_patch_level }}
patch_path: ${{ matrix.version }}
debug: true

View File

@@ -45,6 +45,10 @@ on:
description: > description: >
Artifact name of prebuilt ksud to be embedded Artifact name of prebuilt ksud to be embedded
for example: ksud-aarch64-linux-android for example: ksud-aarch64-linux-android
debug:
required: false
type: boolean
default: false
secrets: secrets:
BOOT_SIGN_KEY: BOOT_SIGN_KEY:
required: false required: false
@@ -91,6 +95,7 @@ jobs:
- name: Setup KernelSU - name: Setup KernelSU
env: env:
PATCH_PATH: ${{ inputs.patch_path }} PATCH_PATH: ${{ inputs.patch_path }}
IS_DEBUG_KERNEL: ${{ inputs.debug }}
run: | run: |
cd $GITHUB_WORKSPACE/android-kernel cd $GITHUB_WORKSPACE/android-kernel
echo "[+] KernelSU setup" echo "[+] KernelSU setup"
@@ -105,6 +110,11 @@ jobs:
cd $GKI_ROOT/common/ && git apply $GITHUB_WORKSPACE/KernelSU/.github/patches/$PATCH_PATH/*.patch cd $GKI_ROOT/common/ && git apply $GITHUB_WORKSPACE/KernelSU/.github/patches/$PATCH_PATH/*.patch
echo "Patch script/setlocalversion" echo "Patch script/setlocalversion"
sed -i 's/-dirty//g' $GKI_ROOT/common/scripts/setlocalversion sed -i 's/-dirty//g' $GKI_ROOT/common/scripts/setlocalversion
if [ "$IS_DEBUG_KERNEL" = "true"]; then
echo "[+] Enable debug features for kernel"
echo "ccflags-y += -DCONFIG_KSU_DEBUG" >> $GITHUB_WORKSPACE/KernelSU/kernel/Makefile
fi
echo "[+] KernelSU setup done." echo "[+] KernelSU setup done."
- name: Symbol magic - name: Symbol magic