[openwrt/openwrt] CI: kernel: skip subtarget test on non-specific target test

LEDE Commits lede-commits at lists.infradead.org
Tue Mar 21 16:36:54 PDT 2023


ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/0c2b591b845640a733b5ead84970918e9240ebd5

commit 0c2b591b845640a733b5ead84970918e9240ebd5
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sun Feb 19 23:35:42 2023 +0100

    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 at gmail.com>
---
 .github/workflows/kernel.yml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/.github/workflows/kernel.yml b/.github/workflows/kernel.yml
index 6a94e79779..a25829a4c0 100644
--- a/.github/workflows/kernel.yml
+++ b/.github/workflows/kernel.yml
@@ -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




More information about the lede-commits mailing list