CI: kernel: test each subtarget on push events
authorChristian Marangi <ansuelsmth@gmail.com>
Tue, 30 May 2023 18:43:18 +0000 (20:43 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 31 May 2023 11:22:05 +0000 (13:22 +0200)
Test each subtarget on push events to improve testing and to refresh
ccache of each subtarget.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
.github/workflows/kernel.yml

index 5f18a39c55322271d6e5291a9c210965946d4ed9..3aa46f5cd7cacfe983308b2cafb12e2e6da97d2d 100644 (file)
@@ -54,10 +54,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
+          # On testing non-specific target, skip testing each subtarget if we are testing pr
+          if [ ${{ github.event_name }} != 'push' ]; then
+            if echo "$CHANGED_FILES" | grep -v -q target/linux ||
+              echo "$CHANGED_FILES" | grep -q target/linux/generic; then
+              TARGETS_SUBTARGETS=$TARGETS
+            fi
           fi
 
           JSON_TARGETS_SUBTARGETS='['