Skip to content

Commit 59fc837

Browse files
[CI] Treat PRs touching 500+ files as changing everything (intel#10438)
Github APIs used by dorny/paths-filter limit the list of changed files so we can't reliable detect the changes when many files are changed. As such, treat those as changing everything. Note that 500 is much less than GH's limit which is around 3000.
1 parent 0697e68 commit 59fc837

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/sycl_detect_changes.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: [Linux, build]
1616
timeout-minutes: 3
1717
outputs:
18-
filters: ${{ steps.changes.outputs.changes }}
18+
filters: ${{ steps.result.outputs.result }}
1919
steps:
2020
- name: Check file changes
2121
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
@@ -59,3 +59,18 @@ jobs:
5959
- *drivers_and_configs
6060
# Temporary, until plugins are enabled in nightly image.
6161
- sycl/**
62+
63+
- name: Set output
64+
id: result
65+
uses: actions/github-script@v6
66+
with:
67+
script: |
68+
console.log("Number of files changed:");
69+
console.log(context.payload.pull_request.changed_files);
70+
if (context.payload.pull_request.changed_files < 500) {
71+
return '${{ steps.changes.outputs.changes }}';
72+
}
73+
// Treat everything as changed for huge PRs.
74+
return ["llvm", "llvm_spirv", "clang", "sycl_fusion", "xptifw", "libclc", "sycl", "ci", "drivers_and_configs", "test_build"];
75+
76+
- run: echo '${{ steps.result.outputs.result }}'

0 commit comments

Comments
 (0)