Skip to content

Commit 8e0cc4b

Browse files
[CI][14/N] Try to enable everything together for updated pre-commit
Only use commit status because check run can't be assigned into a proper check suite (linux/windows pre-commit task). See https://github.com/orgs/community/discussions/24616 for details of the issue.
1 parent 35c2e2d commit 8e0cc4b

File tree

3 files changed

+52
-40
lines changed

3 files changed

+52
-40
lines changed

.github/workflows/sycl_detect_changes.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252
# devops/* contains config files, including drivers versions.
5353
# Allow them to be tested in pre-commit.
5454
- devops/*/**
55+
drivers:
56+
- devops/dependencies.json
5557
5658
- name: Set output
5759
id: result

.github/workflows/sycl_exp_precommit.yml

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,45 @@ on:
88
- '.github/workflows/**'
99

1010
jobs:
11-
# fake:
12-
# runs-on: [Linux]
13-
# steps:
14-
# - run: echo "Build done"
11+
detect_changes:
12+
uses: ./.github/workflows/sycl_detect_changes.yml
13+
14+
lint:
15+
needs: [detect_changes]
16+
if: |
17+
github.event.pull_request.head.repo.full_name == 'intel/llvm'
18+
runs-on: [Linux, build]
19+
container:
20+
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:no-drivers
21+
options: -u 1001:1001
22+
steps:
23+
- uses: actions/checkout@v3
24+
with:
25+
sparse-checkout: |
26+
devops/actions/cached_checkout
27+
devops/actions/clang-format
28+
devops/actions/cleanup
29+
- name: Register cleanup after job is finished
30+
uses: ./devops/actions/cleanup
31+
- name: 'PR commits + 2'
32+
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 2 ))" >> "${GITHUB_ENV}"
33+
- uses: ./devops/actions/cached_checkout
34+
with:
35+
path: src
36+
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
37+
ref: ${{ github.event.pull_request.head.sha }}
38+
merge_ref: ''
39+
cache_path: "/__w/repo_cache/"
40+
- name: Run clang-format
41+
uses: ./devops/actions/clang-format
42+
with:
43+
path: src
1544

1645
build:
46+
needs: [lint]
47+
if: |
48+
always()
49+
&& (success() || contains(github.event.pull_request.labels.*.name, 'ignore-lint'))
1750
uses: ./.github/workflows/sycl_linux_build.yml
1851
with:
1952
build_ref: ${{ github.sha }}
@@ -24,7 +57,7 @@ jobs:
2457
changes: '[]'
2558

2659
test:
27-
needs: [build]
60+
needs: [build, detect_changes]
2861
strategy:
2962
fail-fast: false
3063
matrix:
@@ -34,6 +67,17 @@ jobs:
3467
image: ghcr.io/intel/llvm/ubuntu2204_build:latest
3568
image_options: -u 1001
3669
target_devices: ext_intel_esimd_emulator:gpu
70+
- name: AMD/HIP
71+
runner: '["Linux", "amdgpu"]'
72+
image: ghcr.io/intel/llvm/ubuntu2204_build:latest
73+
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd
74+
target_devices: ext_oneapi_hip:gpu
75+
- name: Intel
76+
runner: '["Linux", "gen12"]'
77+
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
78+
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
79+
target_devices: ext_oneapi_level_zero:gpu;opencl:gpu;opencl:cpu
80+
reset_gpu: ${{ contains(needs.detect_changes.outputs.filters, 'drivers') }}
3781
uses: ./.github/workflows/sycl_linux_run_tests.yml
3882
with:
3983
name: ${{ matrix.name }}

.github/workflows/sycl_precommit_aws.yml

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,14 @@ on:
99
jobs:
1010
create-check:
1111
runs-on: [Linux, build]
12-
outputs:
13-
id: ${{ steps.create_check.outputs.result }}
1412
steps:
1513
- uses: actions/github-script@v6
16-
id: create_check
1714
with:
1815
script: |
1916
const sha = context.payload.workflow_run.head_sha
2017
const run_id = '${{ github.run_id }}'
2118
const this_run_url = 'https://github.com/' + context.repo.owner + '/' + context.repo.repo + '/actions/runs/' + run_id
2219
23-
// TODO: Decide what we want to keep.
24-
2520
// Create commit status.
2621
await github.request('POST /repos/{owner}/{repo}/statuses/{sha}', {
2722
owner: context.repo.owner,
@@ -33,22 +28,6 @@ jobs:
3328
context: 'SYCL E2E on AWS CUDA',
3429
})
3530
36-
// Create check run.
37-
const result = await github.request('POST /repos/{owner}/{repo}/check-runs', {
38-
owner: context.repo.owner,
39-
repo: context.repo.repo,
40-
name: 'e2e-aws-cuda',
41-
head_sha: sha,
42-
details_url: this_run_url,
43-
status: 'in_progress',
44-
output: {
45-
title: 'SYCL E2E on AWS CUDA',
46-
summary: 'URL: ' + this_run_url
47-
}
48-
})
49-
console.log(result)
50-
return result.data.id
51-
5231
aws-start:
5332
runs-on: ubuntu-20.04
5433
environment: aws
@@ -75,8 +54,7 @@ jobs:
7554
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN
7655
target_devices: ext_oneapi_cuda:gpu
7756
ref: ${{ github.sha }}
78-
merge_ref: ${{ github.event.pull_request.base.sha }}
79-
env: '{"LIT_FILTER":"Basic/accessor"}'
57+
merge_ref: ''
8058

8159
sycl_toolchain_artifact: sycl_linux_default
8260
sycl_toolchain_archive: llvm_sycl.tar.zst
@@ -94,8 +72,6 @@ jobs:
9472
const run_id = '${{ github.run_id }}'
9573
const this_run_url = 'https://github.com/' + context.repo.owner + '/' + context.repo.repo + '/actions/runs/' + run_id
9674
97-
// TODO: Decide what we want to keep.
98-
9975
// Update commit status.
10076
await github.request('POST /repos/{owner}/{repo}/statuses/{sha}', {
10177
owner: context.repo.owner,
@@ -107,16 +83,6 @@ jobs:
10783
context: 'SYCL E2E on AWS CUDA',
10884
})
10985
110-
// Update check run.
111-
const result = await github.request('PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}', {
112-
owner: context.repo.owner,
113-
repo: context.repo.repo,
114-
check_run_id: '${{ needs.create-check.outputs.id }}',
115-
status: 'completed',
116-
conclusion: '${{ needs.e2e-cuda.result }}'
117-
})
118-
console.log(result)
119-
12086
aws-stop:
12187
needs: [aws-start, e2e-cuda]
12288
if: always()

0 commit comments

Comments
 (0)