-
Notifications
You must be signed in to change notification settings - Fork 790
[CI] Refactor changes detection for check-* in Build/LIT tasks #9760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Identify impacted LIT tests | ||
# Outlined into a separate reusable workflow to ease testing for new rules. | ||
|
||
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: cuda | ||
timeout-minutes: 3 | ||
outputs: | ||
filters: ${{ steps.changes.outputs.changes }} | ||
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: | ||
- *clang | ||
- *sycl-fusion | ||
- *llvm_spirv | ||
- *xptifw | ||
- *libclc | ||
- 'sycl/*' | ||
- 'sycl/!(test-e2e)/**' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,34 +18,11 @@ on: | |
type: string | ||
required: false | ||
default: "" | ||
check_llvm: | ||
check_filters: | ||
type: string | ||
description: 'Filter matches for the changed files in the PR' | ||
default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc, libdevice]' | ||
required: false | ||
default: 'true' | ||
check_clang: | ||
type: string | ||
required: false | ||
default: 'true' | ||
check_sycl: | ||
type: string | ||
required: false | ||
default: 'true' | ||
check_llvm_spirv: | ||
type: string | ||
required: false | ||
default: 'true' | ||
check_xptifw: | ||
type: string | ||
required: false | ||
default: 'true' | ||
check_libclc: | ||
type: string | ||
required: false | ||
default: 'true' | ||
check_libdevice: | ||
type: string | ||
required: false | ||
default: 'true' | ||
|
||
jobs: | ||
build: | ||
|
@@ -94,33 +71,27 @@ jobs: | |
run: | | ||
cmake --build build --target sycl-toolchain | ||
- name: check-llvm | ||
shell: bash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can keep |
||
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' && inputs.check_llvm == 'true' }} | ||
if: always() && !cancelled() && contains(inputs.check_filters, 'llvm') | ||
run: | | ||
cmake --build build --target check-llvm | ||
- name: check-clang | ||
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' && inputs.check_clang == 'true' }} | ||
shell: bash | ||
if: always() && !cancelled() && contains(inputs.check_filters, 'clang') | ||
run: | | ||
cmake --build build --target check-clang | ||
- name: check-sycl | ||
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' && inputs.check_sycl == 'true' }} | ||
shell: bash | ||
if: always() && !cancelled() && contains(inputs.check_filters, 'sycl') | ||
run: | | ||
cmake --build build --target check-sycl | ||
- name: check-llvm-spirv | ||
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' && inputs.check_llvm_spirv == 'true' }} | ||
shell: bash | ||
if: always() && !cancelled() && contains(inputs.check_filters, 'llvm_spirv') | ||
run: | | ||
cmake --build build --target check-llvm-spirv | ||
- name: check-xptifw | ||
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' && inputs.check_xptifw == 'true' }} | ||
shell: bash | ||
if: always() && !cancelled() && contains(inputs.check_filters, 'xptifw') | ||
run: | | ||
cmake --build build --target check-xptifw | ||
- name: check-libdevice | ||
if: ${{ always() && !cancelled() && steps.build.outcome == 'success' && inputs.check_libdevice == 'true' }} | ||
shell: bash | ||
if: always() && !cancelled() && contains(inputs.check_filters, 'libdevice') | ||
run: | | ||
cmake --build build --target check-libdevice | ||
- name: Install | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I understand it correctly that we leave post-commit as is because the method to detect impacted tests is different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't do such detection/filtering there at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know and my question is "why?". It looks like a low hanging fruit to speed-up CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two reasons:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What king of bugs do you expect to slip through, if there are no code changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit1 - green
Commit2 - red, regression
CommitN..M - green, because didn't touch that component, regression is still present
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit 2 - red, regression <-- this is where the bug is caught, so I don't how it can "slip through".
Are you trying to say that the gatekeeper who merged commit 2 can skip reporting this issue and failing post-commits for commit N..M expose this issue to other gatekeepers, who will report it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That or just a constant reminder that there is an issue if we always test.