From 093fd51946bcdca91d9c7f7e28bef9ad451ed422 Mon Sep 17 00:00:00 2001 From: Aelin Date: Tue, 23 Jun 2026 16:15:32 +0200 Subject: [PATCH] ci: Also require building with LLVM for modified kernel packages Previously, we only checked that new or moved kernel APKBUILDs in testing or above were building the kernel with LLVM. Now that it is also formally a requirement for testing, we should change this check to also enforce it when making modifications to a kernel APKBUILD in testing or above. Part-of: --- .ci/grep.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.ci/grep.sh b/.ci/grep.sh index 8f7fa53eb..ff94af044 100755 --- a/.ci/grep.sh +++ b/.ci/grep.sh @@ -121,14 +121,14 @@ if grep -qr '# Maintainer:' -- *; then fi if [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then - # Find all moved or new kernel APKBUILDs in main, community or testing - MOVED_OR_NEW_MAINLINE_KERNEL_PACKAGES=$(git show --pretty="" --name-only --diff-filter=AR "$CI_MERGE_REQUEST_DIFF_BASE_SHA"..HEAD | grep "device/\(main\|community\|testing\)/linux-.*/APKBUILD" || true) + # Find all added, modified or renamed kernel APKBUILDs in main, community or testing + MODIFIED_MAINLINE_KERNEL_PACKAGES=$(git show --pretty="" --name-only --diff-filter=AMR "$CI_MERGE_REQUEST_DIFF_BASE_SHA"..HEAD | grep "device/\(main\|community\|testing\)/linux-.*/APKBUILD" || true) - if [ -n "$MOVED_OR_NEW_MAINLINE_KERNEL_PACKAGES" ]; then - if [ -n "$(grep -L LLVM=1 $MOVED_OR_NEW_MAINLINE_KERNEL_PACKAGES || true)" ]; then - echo "ERROR: An added or moved close-to-mainline kernel package is not being built with LLVM." + if [ -n "$MODIFIED_MAINLINE_KERNEL_PACKAGES" ]; then + if [ -n "$(grep -L LLVM=1 $MODIFIED_MAINLINE_KERNEL_PACKAGES || true)" ]; then + echo "ERROR: A new or modified close-to-mainline kernel package is not being built with LLVM." echo "See https://postmarketos.org/edge/2025/11/11/kernels-llvm/ for more details" - grep --color=always -L LLVM=1 $MOVED_OR_NEW_MAINLINE_KERNEL_PACKAGES + grep --color=always -L LLVM=1 $MODIFIED_MAINLINE_KERNEL_PACKAGES exit_code=1 fi fi