diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 6b0e74f8f55bd3..d0dafadeea7c20 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -76,14 +76,15 @@ jobs: git checkout $head_sha -- ci/build.sh + # Only Documentation/devicetree/bindings/**/.yaml (touched) and + # include/dt-bindings/**/.h (touched and only on source branch) files + # are checked-out, in the case of other changes the check may falsely + # fail. Please, when doing heavy dt bindings work, target the + # upstream mirrors + files=$(git diff --diff-filter=ACM --no-renames --name-only $base_sha..$head_sha) while read file; do - # Only Documentation/devicetree/bindings/**/.yaml and - # include/dt-bindings/**/.h files are checked-out, in the case of - # other changes the check may falsely fail. - # Please, when doing heavy dt bindings work, target the upstream - # mirrors case "$file" in *.yaml) relative_file=${file#Documentation/devicetree/bindings/} @@ -102,6 +103,18 @@ jobs: esac done <<< "$files" + files=$(comm -13 \ + <(git ls-tree -r --name-only ${{ inputs.ref_branch }} include/dt-bindings | sort) \ + <(git ls-tree -r --name-only $head_sha include/dt-bindings | sort)) + + while read file; do + case "$file" in + *.h) + git checkout $head_sha -- $file + ;; + esac + done <<< "$files" + - name: Check dt-bindings if: ${{ !cancelled() && env.fatal != 'true' }} run: | diff --git a/.github/workflows/top-level.yml b/.github/workflows/top-level.yml index 09043309800d76..8398711d05a625 100644 --- a/.github/workflows/top-level.yml +++ b/.github/workflows/top-level.yml @@ -91,8 +91,7 @@ jobs: assert_labels conditional_xlnx: if: | - (github.event_name == 'push' && startsWith(github.ref_name, 'ci/') || github.ref_name == 'main') || - (github.event_name == 'pull_request' && startsWith(github.base_ref, 'ci/') || github.ref_name == 'main') + (github.event_name == 'push' && startsWith(github.ref_name, 'ci/') || github.ref_name == 'main') runs-on: [self-hosted, v1] needs: [assert_checks] steps: @@ -206,8 +205,7 @@ jobs: assert_labels conditional_rpi: if: | - (github.event_name == 'push' && startsWith(github.ref_name, 'rpi-')) || - (github.event_name == 'pull_request' && startsWith(github.base_ref, 'rpi-')) + (github.event_name == 'push' && startsWith(github.ref_name, 'rpi-')) runs-on: [self-hosted, v1] needs: [assert_checks] steps: diff --git a/ci/build.sh b/ci/build.sh index c89af95fa3cfea..d2f0e6d41d9bef 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -396,7 +396,7 @@ compile_devicetree() { done <<< "$dtsi_files" fi - dts_files+=$(echo "$files" | grep ^arch/$ARCH/boot/dts/ | grep dts$ || true) + dts_files+=\ $(echo "$files" | grep ^arch/$ARCH/boot/dts/ | grep dts$ || true) if [[ -z "$dts_files" ]]; then echo "no dts on range, skipped" return $err