Skip to content

Commit c0ebe4f

Browse files
authored
[CI] Skip lint job when disable-lint is set (#11842)
When we add `ignore-lint` label, CI will still run lint and show a failure despite we will ignore it and continue to do further tests. Since we don't care about lint result, we should ignore running it to avoid wasting machine resource or causing confusion about check results.
1 parent e5dd111 commit c0ebe4f

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/workflows/sycl_linux_precommit.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727

2828
lint:
2929
runs-on: [Linux, build]
30+
if: ${{ always() && !contains(github.event.pull_request.labels.*.name, 'disable-lint') }}
3031
container:
3132
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:no-drivers
3233
options: -u 1001:1001
@@ -57,7 +58,7 @@ jobs:
5758
needs: [lint, detect_changes]
5859
if: |
5960
always()
60-
&& (success() || contains(github.event.pull_request.labels.*.name, 'ignore-lint'))
61+
&& (success() || needs.lint.result == 'skipped')
6162
uses: ./.github/workflows/sycl_linux_build.yml
6263
with:
6364
build_ref: ${{ github.sha }}

.github/workflows/sycl_post_commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
build-win:
6767
if: |
6868
always()
69-
&& (success() || contains(github.event.pull_request.labels.*.name, 'ignore-lint'))
69+
&& success()
7070
&& github.repository == 'intel/llvm'
7171
uses: ./.github/workflows/sycl_windows_build.yml
7272

.github/workflows/sycl_windows_precommit.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929

3030
lint:
3131
runs-on: [Linux, build]
32+
if: ${{ always() && !contains(github.event.pull_request.labels.*.name, 'disable-lint') }}
3233
container:
3334
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:no-drivers
3435
options: -u 1001:1001
@@ -60,7 +61,7 @@ jobs:
6061
needs: [lint, detect_changes]
6162
if: |
6263
always()
63-
&& (success() || contains(github.event.pull_request.labels.*.name, 'ignore-lint'))
64+
&& (success() || needs.lint.result == 'skipped')
6465
&& github.repository == 'intel/llvm'
6566
uses: ./.github/workflows/sycl_windows_build.yml
6667
with:

0 commit comments

Comments
 (0)