Skip to content

Commit 302e23e

Browse files
committed
ci(build): optimize kernel build workflow and patch application
- Move echo statements inside conditional blocks for cleaner output - Remove commented-out LTO configurations - Simplify bazel build command by removing redundant --config=stamp - Reorganize patch application logic for better readability
1 parent 71ba50c commit 302e23e

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -309,38 +309,37 @@ jobs:
309309
fi
310310
;;
311311
Next)
312-
echo "Applying show_pad; patch..."
313312
if [[ "${{ inputs.android_version }}" == "android12" && "${{ inputs.kernel_version }}" == "5.10" && $ACTUAL_SUBLEVEL -le 209 ]] ||
314313
[[ "${{ inputs.android_version }}" == "android13" && "${{ inputs.kernel_version }}" == "5.10" && "${{ inputs.os_patch_level }}" != "2024-05" && $ACTUAL_SUBLEVEL -le 209 ]] ||
315314
[[ "${{ inputs.android_version }}" == "android13" && "${{ inputs.kernel_version }}" == "5.15" && "${{ inputs.os_patch_level }}" != "2024-05" && $ACTUAL_SUBLEVEL -le 148 ]] ||
316315
[[ "${{ inputs.android_version }}" == "android14" && "${{ inputs.kernel_version }}" == "5.15" && "${{ inputs.os_patch_level }}" != "2024-05" && $ACTUAL_SUBLEVEL -le 148 ]] ||
317316
[[ "${{ inputs.android_version }}" == "android14" && "${{ inputs.kernel_version }}" == "6.1" && "${{ inputs.os_patch_level }}" != "2024-05" && $ACTUAL_SUBLEVEL -le 75 ]]; then
317+
echo "Applying show_pad; patch..."
318318
sed -i -e 's/goto show_pad;/return 0;/' ./fs/proc/task_mmu.c
319319
fi
320320
321-
echo "Applying 1_fix_base.c; patch..."
322321
if [[ "${{ inputs.android_version }}" == "android12" && "${{ inputs.kernel_version }}" == "5.10" && $ACTUAL_SUBLEVEL -le 43 ]] ||
323322
[[ "${{ inputs.android_version }}" == "android14" && "${{ inputs.kernel_version }}" == "6.1" && $ACTUAL_SUBLEVEL -ge 145 ]] ||
324323
[[ "${{ inputs.android_version }}" == "android15" && "${{ inputs.kernel_version }}" == "6.6" && $ACTUAL_SUBLEVEL -ge 98 ]]; then
324+
echo "Applying 1_fix_base.c; patch..."
325325
cp $KERNEL_PATCHES/wild/susfs_fix_patches/v${SUSFS_VERSION}/1_fix_base.c.patch ./
326326
patch -p1 < 1_fix_base.c.patch
327327
fi
328328
329-
echo "Applying 2_fix_base.c; patch..."
330329
if [[ "${{ inputs.android_version }}" == "android12" && "${{ inputs.kernel_version }}" == "5.10" && $ACTUAL_SUBLEVEL -le 43 ]]; then
330+
echo "Applying 2_fix_base.c; patch..."
331331
cp $KERNEL_PATCHES/wild/susfs_fix_patches/v${SUSFS_VERSION}/2_fix_base.c.patch ./
332332
patch -p1 < 2_fix_base.c.patch
333333
fi
334334
335-
echo "Applying fix_task_mmu.c; patch..."
336335
if [[ "${{ inputs.android_version }}" == "android15" && "${{ inputs.kernel_version }}" == "6.6" && $ACTUAL_SUBLEVEL -le 58 ]]; then
336+
echo "Applying fix_task_mmu.c; patch..."
337337
cp $KERNEL_PATCHES/wild/susfs_fix_patches/v${SUSFS_VERSION}/fix_task_mmu.c.patch ./
338338
patch -p1 < fix_task_mmu.c.patch
339339
fi
340340
341-
echo "Applying Android 13 5.15 patchs..."
342-
# Apply additional SUSFS patches for Android 13 5.15 compatibility
343341
if [[ "${{ inputs.android_version }}" == "android13" && "${{ inputs.kernel_version }}" == "5.15" ]] && [[ ${{ inputs.sub_level }} -le 41 ]]; then
342+
echo "Applying Android 13 5.15 patchs..."
344343
cp $KERNEL_PATCHES/ksu/susfs_fix_patches/v${SUSFS_VERSION}/fix_fdinfo.c.patch ./
345344
patch -p1 < fix_fdinfo.c.patch
346345
cp $KERNEL_PATCHES/ksu/susfs_fix_patches/v${SUSFS_VERSION}/fix_namespace.c.patch ./
@@ -514,9 +513,6 @@ jobs:
514513
CONFIG_IP_SET_HASH_NETIFACE=y
515514
CONFIG_IP_SET_LIST_SET=y
516515
517-
# CONFIG_LTO_CLANG is not set
518-
# CONFIG_LTO_CLANG_THIN is not set
519-
# CONFIG_LTO_CLANG_FULL is not set
520516
EOF
521517
522518
# Remove check_defconfig
@@ -705,11 +701,9 @@ jobs:
705701
run: |
706702
set -ex
707703
if [ -f "build/build.sh" ]; then
708-
#export KBUILD_BUILD_TIMESTAMP="$(date -u)"
709704
LTO=none BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh || exit 1
710705
else
711-
#export SOURCE_DATE_EPOCH=$(date +%s)
712-
tools/bazel build --config=stamp --config=fast --lto=none //common:kernel_aarch64_dist || exit 1
706+
tools/bazel build --config=fast --lto=none //common:kernel_aarch64_dist || exit 1
713707
fi
714708
715709
- name: Prepare AnyKernel3 Zip

0 commit comments

Comments
 (0)