Skip to content

Commit

Permalink
[CI] Add more Windows hung test checks
Browse files Browse the repository at this point in the history
Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
  • Loading branch information
sarnex committed Jan 31, 2025
1 parent 0a81741 commit 781cfed
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/sycl-windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ jobs:
with:
sparse-checkout: |
devops/actions
ref: ${{ inputs.ref || github.sha }}
ref: ${{ inputs.ref || github.sha }}
- name: Detect hung tests
shell: powershell
if: always()
uses: ./devops/actions/detect_hung_tests
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
with:
arch: amd64
Expand Down Expand Up @@ -182,3 +186,7 @@ jobs:
name: sycl_windows_default
path: ${{ inputs.artifact_archive_name }}
retention-days: ${{ inputs.retention-days }}
- name: Detect hung tests
shell: powershell
if: always()
uses: ./devops/actions/detect_hung_tests
14 changes: 5 additions & 9 deletions .github/workflows/sycl-windows-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ jobs:
sparse-checkout: |
devops/actions
ref: ${{ inputs.ref || github.sha }}
- name: Detect hung tests
shell: powershell
if: always()
uses: ./devops/actions/detect_hung_tests
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
with:
arch: amd64
Expand Down Expand Up @@ -104,15 +108,7 @@ jobs:
- name: Detect hung tests
shell: powershell
if: always()
run: |
$exitCode = 0
$hungTests = Get-Process | Where-Object { ($_.Path -match "llvm\\install") -or ($_.Path -match "llvm\\build-e2e") }
$hungTests | Foreach-Object {
$exitCode = 1
echo "Test $($_.Path) hung!"
Stop-Process -Force $_
}
exit $exitCode
uses: ./devops/actions/detect_hung_tests
- name: Cleanup
shell: cmd
if: always()
Expand Down
16 changes: 16 additions & 0 deletions devops/actions/detect_hung_tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Detect hung tests

runs:
using: "composite"
steps:
- name: Detect hung tests
shell: powershell
run: |
$exitCode = 0
$hungTests = Get-Process | Where-Object { ($_.Path -match "llvm\\install") -or ($_.Path -match "llvm\\build-e2e") }
$hungTests | Foreach-Object {
$exitCode = 1
echo "Test $($_.Path) hung!"
Stop-Process -Force $_
}
exit $exitCode

0 comments on commit 781cfed

Please sign in to comment.