1
1
name : SYCL Pre Commit on Linux
2
2
3
3
on :
4
- pull_request_target :
4
+ # We rely on "Fork pull request workflows from outside collaborators" -
5
+ # "Require approval for all outside collaborators" at
6
+ # https://github.com/intel/llvm/settings/actions for security.
7
+ pull_request :
5
8
branches :
6
9
- sycl
7
10
- sycl-devops-pr/**
8
- - llvmspirv_pulldown
9
11
# Do not run builds if changes are only in the following locations
10
12
paths-ignore :
11
13
- ' .github/ISSUE_TEMPLATE/**'
15
17
- ' clang/docs/**'
16
18
- ' **.md'
17
19
- ' **.rst'
18
- # Changes in CI won't have any effect with pull_request_target
19
- - ' .github/workflows'
20
- # For CI-related files we explicitly skip all the jobs below even if there
21
- # were other (non-ignored) files modified in this PR.
22
- - ' devops/*/**'
23
-
24
- permissions :
25
- contents : read
26
20
27
21
jobs :
28
22
detect_changes :
29
23
uses : ./.github/workflows/sycl_detect_changes.yml
30
24
31
25
lint :
32
- needs : [detect_changes]
33
- if : |
34
- github.event.pull_request.head.repo.full_name == 'intel/llvm' ||
35
- !contains(needs.detect_changes.outputs.filters, 'ci')
36
26
runs-on : [Linux, build]
37
27
container :
38
28
image : ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:no-drivers
39
29
options : -u 1001:1001
40
30
steps :
41
31
- uses : actions/checkout@v3
42
32
with :
43
- ref : ${{ github.base_ref }}
44
33
sparse-checkout : |
45
34
devops/actions/cached_checkout
46
35
devops/actions/clang-format
@@ -61,36 +50,55 @@ jobs:
61
50
with :
62
51
path : src
63
52
64
- # This job generates matrix of tests for SYCL End-to-End tests
65
- test_matrix :
66
- needs : [detect_changes]
67
- if : |
68
- github.event.pull_request.head.repo.full_name == 'intel/llvm' ||
69
- !contains(needs.detect_changes.outputs.filters, 'ci')
70
- name : Generate Test Matrix
71
- uses : ./.github/workflows/sycl_gen_test_matrix.yml
72
- with :
73
- ref : ${{ github.event.pull_request.head.sha }}
74
- lts_config : " hip_amdgpu;lin_intel;esimd_emu;cuda_aws"
75
-
76
- linux_default :
77
- name : Linux
78
- # Only build and test patches, that have passed all linter checks, because
79
- # the next commit is likely to be a follow-up on that job.
80
- needs : [lint, test_matrix, detect_changes]
53
+ build :
54
+ needs : [lint, detect_changes]
81
55
if : |
82
56
always()
83
57
&& (success() || contains(github.event.pull_request.labels.*.name, 'ignore-lint'))
84
- && (github.event.pull_request.head.repo.full_name == 'intel/llvm'
85
- || !contains(needs.detect_changes.outputs.filters, 'ci'))
86
- uses : ./.github/workflows/sycl_linux_build_and_test.yml
87
- secrets : inherit
58
+ uses : ./.github/workflows/sycl_linux_build.yml
88
59
with :
89
- build_ref : ${{ github.event.pull_request.head. sha }}
90
- merge_ref : ${{ github.event.pull_request.base.sha }}
60
+ build_ref : ${{ github.sha }}
61
+ merge_ref : ' '
91
62
build_cache_root : " /__w/"
92
63
build_artifact_suffix : " default"
93
64
build_cache_suffix : " default"
94
- lts_matrix : ${{ needs.test_matrix.outputs.lts_lx_matrix }}
95
- lts_aws_matrix : ${{ needs.test_matrix.outputs.lts_aws_matrix }}
96
65
changes : ${{ needs.detect_changes.outputs.filters }}
66
+
67
+ test :
68
+ needs : [build, detect_changes]
69
+ strategy :
70
+ fail-fast : false
71
+ matrix :
72
+ include :
73
+ - name : ESIMD Emu
74
+ runner : ' ["Linux", "x86-cpu"]'
75
+ image : ghcr.io/intel/llvm/ubuntu2204_build:latest
76
+ image_options : -u 1001
77
+ target_devices : ext_intel_esimd_emulator:gpu
78
+ - name : AMD/HIP
79
+ runner : ' ["Linux", "amdgpu"]'
80
+ image : ghcr.io/intel/llvm/ubuntu2204_build:latest
81
+ image_options : -u 1001 --device=/dev/dri --device=/dev/kfd
82
+ target_devices : ext_oneapi_hip:gpu
83
+ - name : Intel
84
+ runner : ' ["Linux", "gen12"]'
85
+ image : ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
86
+ image_options : -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
87
+ target_devices : ext_oneapi_level_zero:gpu;opencl:gpu;opencl:cpu
88
+ reset_gpu : ${{ contains(needs.detect_changes.outputs.filters, 'drivers') }}
89
+ uses : ./.github/workflows/sycl_linux_run_tests.yml
90
+ with :
91
+ name : ${{ matrix.name }}
92
+ runner : ${{ matrix. runner }}
93
+ image : ${{ matrix.image }}
94
+ image_options : ${{ matrix.image_options }}
95
+ target_devices : ${{ matrix.target_devices }}
96
+ reset_gpu : ${{ matrix.reset_gpu }}
97
+
98
+ ref : ${{ github.sha }}
99
+ merge_ref : ' '
100
+
101
+ sycl_toolchain_artifact : sycl_linux_default
102
+ sycl_toolchain_archive : ${{ needs.build.outputs.artifact_archive_name }}
103
+ sycl_toolchain_decompress_command : ${{ needs.build.outputs.artifact_decompress_command }}
104
+
0 commit comments