Skip to content

Commit ea402e5

Browse files
committed
.github: checks: checkout target branch include files
Checkout include/dt-bindings files that don't exist on upstream next master, with the premise they are non-upstreamable files (e.g., ad*.h). Signed-off-by: Jorge Marques <jorge.marques@analog.com>
1 parent 7348748 commit ea402e5

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

.github/workflows/checks.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,15 @@ jobs:
7676
7777
git checkout $head_sha -- ci/build.sh
7878
79+
# Only Documentation/devicetree/bindings/**/.yaml (touched) and
80+
# include/dt-bindings/**/.h (touched and only on source branch) files
81+
# are checked-out, in the case of other changes the check may falsely
82+
# fail. Please, when doing heavy dt bindings work, target the
83+
# upstream mirrors
84+
7985
files=$(git diff --diff-filter=ACM --no-renames --name-only $base_sha..$head_sha)
8086
8187
while read file; do
82-
# Only Documentation/devicetree/bindings/**/.yaml and
83-
# include/dt-bindings/**/.h files are checked-out, in the case of
84-
# other changes the check may falsely fail.
85-
# Please, when doing heavy dt bindings work, target the upstream
86-
# mirrors
8788
case "$file" in
8889
*.yaml)
8990
relative_file=${file#Documentation/devicetree/bindings/}
@@ -102,6 +103,18 @@ jobs:
102103
esac
103104
done <<< "$files"
104105
106+
files=$(comm -13 \
107+
<(git ls-tree -r --name-only ${{ inputs.ref_branch }} include/dt-bindings | sort) \
108+
<(git ls-tree -r --name-only $head_sha include/dt-bindings | sort))
109+
110+
while read file; do
111+
case "$file" in
112+
*.h)
113+
git checkout $head_sha -- $file
114+
;;
115+
esac
116+
done <<< "$files"
117+
105118
- name: Check dt-bindings
106119
if: ${{ !cancelled() && env.fatal != 'true' }}
107120
run: |

0 commit comments

Comments
 (0)