CI: kernel: skip subtarget test on non-specific target test

Reduce testing time by skipping subtarget test on non-specific target
test.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2023-02-19 23:35:42 +01:00
parent 68883278ab
commit 0c2b591b84
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
1 changed files with 6 additions and 0 deletions

View File

@ -52,6 +52,12 @@ jobs:
TARGETS_SUBTARGETS="$(echo "$ALL_TARGETS" | sort -u -t '/' -k1 | awk '{ print $1 }')"
TARGETS="$(echo "$ALL_TARGETS" | sort -u -t '/' -k1,1 | awk '{ print $1 }')"
# On testing non-specific target, skip testing each subtarget
if echo "$CHANGED_FILES" | grep -v -q target/linux ||
echo "$CHANGED_FILES" | grep -q target/linux/generic; then
TARGETS_SUBTARGETS=$TARGETS
fi
JSON_TARGETS_SUBTARGETS='['
FIRST=1
for TARGET in $TARGETS_SUBTARGETS; do