forked from intel/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (114 loc) · 3.65 KB
/
sycl-windows-run-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: SYCL E2E
on:
workflow_call:
inputs:
name:
type: string
required: True
runner:
type: string
required: True
extra_lit_opts:
description: |
Extra options to be added to LIT_OPTS.
type: string
default: ''
ref:
type: string
required: False
sycl_toolchain_artifact:
type: string
default: 'sycl_windows_default'
required: False
sycl_toolchain_archive:
type: string
default: ''
required: False
env:
type: string
default: '{}'
required: False
compiler:
type: string
required: false
default: "cl"
permissions: read-all
jobs:
run:
name: ${{ inputs.name }}
runs-on: ${{ fromJSON(inputs.runner) }}
environment: WindowsCILock
env: ${{ fromJSON(inputs.env) }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
devops/actions
ref: ${{ inputs.ref || github.sha }}
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
with:
arch: amd64
- name: Setup oneAPI env
uses: ./devops/actions/setup_windows_oneapi_env
if: ${{ always() && !cancelled() && inputs.compiler == 'icx' }}
- name: Set env
run: |
git config --system core.longpaths true
git config --global core.autocrlf false
echo "C:\Program Files\Git\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Register cleanup after job is finished
uses: ./devops/actions/cleanup
- uses: ./devops/actions/cached_checkout
with:
path: llvm
ref: ${{ inputs.ref || github.sha }}
cache_path: "D:\\\\github\\\\_work\\\\repo_cache\\\\"
- name: Download compiler toolchain
uses: actions/download-artifact@v4
with:
name: ${{ inputs.sycl_toolchain_artifact }}
- name: Extract SYCL toolchain
shell: bash
run: |
mkdir install
tar -xf ${{ inputs.sycl_toolchain_archive }} -C install
rm ${{ inputs.sycl_toolchain_archive }}
- name: Setup SYCL toolchain
run: |
echo "PATH=$env:GITHUB_WORKSPACE\\install\\bin;$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- run: |
sycl-ls
- run: |
sycl-ls --verbose
- name: Configure E2E with Level Zero target
shell: cmd
run: |
mkdir build-e2e
cmake -GNinja -B build-e2e -S.\llvm\sycl\test-e2e -DSYCL_TEST_E2E_TARGETS="level_zero:gpu" -DCMAKE_CXX_COMPILER="clang++" -DLEVEL_ZERO_LIBS_DIR="D:\github\level-zero_win-sdk\lib" -DLEVEL_ZERO_INCLUDE="D:\github\level-zero_win-sdk\include" -DLLVM_LIT="..\llvm\llvm\utils\lit\lit.py"
- name: Run End-to-End tests
shell: bash
run: |
# Run E2E tests.
if [[ ${{inputs.compiler}} == 'icx' ]]; then
export LIT_FILTER_OUT="compile_on_win_with_mdd"
fi
export LIT_OPTS="-v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests ${{ inputs.extra_lit_opts }}"
cmake --build build-e2e --target check-sycl-e2e
- 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
- name: Cleanup
shell: cmd
if: always()
run: |
rmdir /q /s install
rmdir /q /s build-e2e