6 - '.github/workflows/check-kernel-patches.yml'
7 - '.github/workflows/build.yml'
8 - '.github/workflows/kernel.yml'
11 - 'target/linux/generic/**'
14 - '.github/workflows/check-kernel-patches.yml'
15 - '.github/workflows/build.yml'
16 - '.github/workflows/kernel.yml'
25 group: ${{ github.workflow }}-${{ github.ref }}
26 cancel-in-progress: ${{ github.event_name == 'pull_request' }}
31 runs-on: ubuntu-latest
33 targets_subtargets: ${{ steps.find_targets.outputs.targets_subtargets }}
34 targets: ${{ steps.find_targets.outputs.targets }}
38 uses: actions/checkout@v3
42 - name: Get changed files
44 uses: tj-actions/changed-files@v35
46 since_last_remote_commit: true
51 export TARGETS_SUBTARGETS="$(perl ./scripts/dump-target-info.pl targets 2>/dev/null \
52 | sort -u -t '/' -k1 \
53 | awk '{ print $1 }')"
55 export TARGETS="$(perl ./scripts/dump-target-info.pl targets 2>/dev/null \
56 | sort -u -t '/' -k1,1 \
57 | awk '{ print $1 }')"
59 JSON_TARGETS_SUBTARGETS='['
61 for TARGET in $TARGETS_SUBTARGETS; do
62 if echo ${{ steps.changed-files.outputs.all_changed_files }} | grep -q target/linux/generic ||
63 echo ${{ steps.changed-files.outputs.all_changed_files }} | grep -q $(echo $TARGET | cut -d "/" -f 1); then
64 [[ $FIRST -ne 1 ]] && JSON_TARGETS_SUBTARGETS="$JSON_TARGETS_SUBTARGETS"','
65 JSON_TARGETS_SUBTARGETS="$JSON_TARGETS_SUBTARGETS"'"'"${TARGET}"'"'
69 JSON_TARGETS_SUBTARGETS="$JSON_TARGETS_SUBTARGETS"']'
73 for TARGET in $TARGETS; do
74 if echo ${{ steps.changed-files.outputs.all_changed_files }} | grep -q target/linux/generic ||
75 echo ${{ steps.changed-files.outputs.all_changed_files }} | grep -q $(echo $TARGET | cut -d "/" -f 1); then
76 [[ $FIRST -ne 1 ]] && JSON_TARGETS="$JSON_TARGETS"','
77 JSON_TARGETS="$JSON_TARGETS"'"'"${TARGET}"'"'
81 JSON_TARGETS="$JSON_TARGETS"']'
83 echo -e "\n---- targets to build ----\n"
84 echo "$JSON_TARGETS_SUBTARGETS"
85 echo -e "\n---- targets to build ----\n"
87 echo -e "\n---- targets to check patch ----\n"
89 echo -e "\n---- targets to check patch ----\n"
91 echo "targets_subtargets=$JSON_TARGETS_SUBTARGETS" >> $GITHUB_OUTPUT
92 echo "targets=$JSON_TARGETS" >> $GITHUB_OUTPUT
95 name: Build Kernel with external toolchain
96 needs: determine_targets
103 target: ${{fromJson(needs.determine_targets.outputs.targets_subtargets)}}
104 uses: ./.github/workflows/build.yml
106 target: ${{ matrix.target }}
108 build_all_kmods: true
110 check-kernel-patches:
111 name: Check Kernel patches
112 needs: determine_targets
119 target: ${{fromJson(needs.determine_targets.outputs.targets)}}
120 uses: ./.github/workflows/check-kernel-patches.yml
122 target: ${{ matrix.target }}