forked from intel/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (65 loc) · 2.11 KB
/
sycl_detect_changes.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Identify changed files
on:
workflow_call:
outputs:
filters:
description: Matched filters
value: ${{ jobs.need_check.outputs.filters }}
jobs:
need_check:
name: Decide which tests could be affected by the changes
# Github's ubuntu-* runners are slow to allocate. Use our CUDA runner since
# we don't use it for anything right now.
runs-on: [Linux, build]
timeout-minutes: 3
outputs:
filters: ${{ steps.result.outputs.result }}
steps:
- name: Check file changes
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
id: changes
with:
filters: |
llvm: &llvm
- 'llvm/**'
llvm_spirv: &llvm_spirv
- *llvm
- 'llvm-spirv/**'
clang: &clang
- *llvm
- 'clang/**'
sycl_fusion: &sycl-fusion
- *llvm
- 'sycl-fusion/**'
xptifw: &xptifw
- 'xptifw/**'
libclc: &libclc
- *llvm_spirv
- *clang
- 'libclc/**'
sycl: &sycl
- *clang
- *sycl-fusion
- *llvm_spirv
- *xptifw
- *libclc
- 'sycl/*'
- 'sycl/!(test-e2e|doc)/**'
ci:
- .github/workflows/**
# devops/* contains config files, including drivers versions.
# Allow them to be tested in pre-commit.
- devops/*/**
- name: Set output
id: result
uses: actions/github-script@v6
with:
script: |
console.log("Number of files changed:");
console.log(context.payload.pull_request.changed_files);
if (context.payload.pull_request.changed_files < 500) {
return '${{ steps.changes.outputs.changes }}';
}
// Treat everything as changed for huge PRs.
return ["llvm", "llvm_spirv", "clang", "sycl_fusion", "xptifw", "libclc", "sycl", "ci"];
- run: echo '${{ steps.result.outputs.result }}'