Implement option to skip certain kernel configs that don't want to play along

This commit is contained in:
Igor Pecovnik 2025-11-08 19:15:31 +01:00
parent c7114e73a5
commit 73a43c993d
No known key found for this signature in database
GPG Key ID: AC67DF56D680226A
1 changed files with 17 additions and 1 deletions

View File

@ -27,12 +27,22 @@ jobs:
id: gen
shell: bash
run: |
set -euo pipefail
JSON="output/info/image-info.json"
# === Kernel config files to skip (filenames under config/kernel/) ===
# Add more entries as needed.
SKIP_CONFIGS=(
"linux-rockchip-rv1106-vendor.config"
)
# Convert bash array -> JSON array for jq
SKIP_JSON="$(printf '%s\n' "${SKIP_CONFIGS[@]}" | jq -R . | jq -s .)"
tmp="$(mktemp)"
jq -c '
jq -c --argjson skip "$SKIP_JSON" '
def norm_branches:
if . == null then []
elif (type=="string") then ( gsub("[,\\s]+";" ") | split(" ") | map(select(length>0)) )
@ -61,6 +71,12 @@ jobs:
# 4) If multiple boards share same (family,branch), keep smallest board (lexicographic)
| sort_by(.linuxfamily, .branch, .board)
| group_by([.linuxfamily,.branch]) | map(.[0])
# 5) Filter out rows whose kernel config filename is in skip list
| map(
. as $row
| ( "linux-" + $row.linuxfamily + "-" + $row.branch + ".config" ) as $fname
| select( ($skip | index($fname)) | not )
)
' "$JSON" > "$tmp"
echo "count=$(jq 'length' "$tmp")" >> "$GITHUB_OUTPUT"