Skip to content

Commit dee48f6

Browse files
committed
test
Signed-off-by: Sarnie, Nick <[email protected]>
1 parent 97c2ae0 commit dee48f6

File tree

3 files changed

+39
-52
lines changed

3 files changed

+39
-52
lines changed

.github/workflows/sycl-windows-build.yml

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -77,29 +77,8 @@ jobs:
7777
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
7878
with:
7979
arch: amd64
80-
- name: oneAPI setup
81-
if: ${{ always() && !cancelled() && inputs.compiler == 'icx' }}
82-
run: |
83-
$batchFilePath = "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
84-
85-
$githubEnvFilePath = $env:GITHUB_ENV
86-
87-
$envBefore = Get-ChildItem Env: | ForEach-Object { "$($_.Name)=$($_.Value)" }
88-
89-
$envVars = & cmd.exe /c "call `"$batchFilePath`" && set" | Out-String
90-
91-
$envAfter = $envVars -split "`r`n" | Where-Object { $_ -match "^(.*?)=(.*)$" }
92-
93-
foreach ($envVar in $envAfter) {
94-
if ($envVar -match "^(.*?)=(.*)$") {
95-
$name = $matches[1]
96-
$value = $matches[2]
97-
$envBeforeVar = $envBefore | Where-Object { $_ -like "$name=*" }
98-
if (-not $envBeforeVar -or $envBeforeVar -ne "$name=$value") {
99-
Add-Content -Path $githubEnvFilePath -Value "$name=$value"
100-
}
101-
}
102-
}
80+
- uses: ./.github/workflows/sycl-windows-setup-oneapi-env.yaml
81+
if: ${{ always() && !cancelled() && inputs.compiler == 'icx' }}
10382
- name: Set env
10483
run: |
10584
git config --system core.longpaths true
@@ -143,10 +122,9 @@ jobs:
143122
shell: bash
144123
run: |
145124
if [[ ${{inputs.compiler}} == 'icx' ]]; then
146-
env LIT_FILTER="SYCL" cmake --build build --target check-llvm
147-
else
148-
cmake --build build --target check-llvm
125+
export LIT_FILTER="SYCL"
149126
fi
127+
cmake --build build --target check-llvm
150128
- name: check-clang
151129
if: always() && !cancelled() && contains(inputs.changes, 'clang')
152130
run: |
@@ -156,10 +134,9 @@ jobs:
156134
shell: bash
157135
run: |
158136
if [[ ${{inputs.compiler}} == 'icx' ]]; then
159-
env LIT_FILTER_OUT="host_tanpi_double_accuracy" cmake --build build --target check-sycl
160-
else
161-
cmake --build build --target check-sycl
137+
export LIT_FILTER_OUT="host_tanpi_double_accuracy"
162138
fi
139+
cmake --build build --target check-sycl
163140
- name: check-sycl-unittests
164141
if: always() && !cancelled() && contains(inputs.changes, 'sycl')
165142
run: |

.github/workflows/sycl-windows-run-tests.yml

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -50,29 +50,8 @@ jobs:
5050
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
5151
with:
5252
arch: amd64
53-
- name: oneAPI setup
54-
if: ${{ always() && !cancelled() && inputs.compiler == 'icx' }}
55-
run: |
56-
$batchFilePath = "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
57-
58-
$githubEnvFilePath = $env:GITHUB_ENV
59-
60-
$envBefore = Get-ChildItem Env: | ForEach-Object { "$($_.Name)=$($_.Value)" }
61-
62-
$envVars = & cmd.exe /c "call `"$batchFilePath`" && set" | Out-String
63-
64-
$envAfter = $envVars -split "`r`n" | Where-Object { $_ -match "^(.*?)=(.*)$" }
65-
66-
foreach ($envVar in $envAfter) {
67-
if ($envVar -match "^(.*?)=(.*)$") {
68-
$name = $matches[1]
69-
$value = $matches[2]
70-
$envBeforeVar = $envBefore | Where-Object { $_ -like "$name=*" }
71-
if (-not $envBeforeVar -or $envBeforeVar -ne "$name=$value") {
72-
Add-Content -Path $githubEnvFilePath -Value "$name=$value"
73-
}
74-
}
75-
}
53+
- uses: ./.github/workflows/sycl-windows-setup-oneapi-env.yaml
54+
if: ${{ always() && !cancelled() && inputs.compiler == 'icx' }}
7655
- name: Set env
7756
run: |
7857
git config --system core.longpaths true
@@ -112,6 +91,9 @@ jobs:
11291
shell: bash
11392
run: |
11493
# Run E2E tests.
94+
if [[ ${{inputs.compiler}} == 'icx']]; then
95+
export LIT_FILTER_OUT="compile_on_win_with_mdd"
96+
fi
11597
export LIT_OPTS="-v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests ${{ inputs.extra_lit_opts }}"
11698
cmake --build build-e2e --target check-sycl-e2e
11799
- name: Detect hung tests
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: SYCL Windows setup oneAPI env
2+
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Setup oneAPI env
7+
shell: powershell
8+
run: |
9+
batchFilePath = "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
10+
11+
$githubEnvFilePath = $env:GITHUB_ENV
12+
13+
$envBefore = Get-ChildItem Env: | ForEach-Object { "$($_.Name)=$($_.Value)" }
14+
15+
$envVars = & cmd.exe /c "call `"$batchFilePath`" && set" | Out-String
16+
17+
$envAfter = $envVars -split "`r`n" | Where-Object { $_ -match "^(.*?)=(.*)$" }
18+
19+
foreach ($envVar in $envAfter) {
20+
if ($envVar -match "^(.*?)=(.*)$") {
21+
$name = $matches[1]
22+
$value = $matches[2]
23+
$envBeforeVar = $envBefore | Where-Object { $_ -like "$name=*" }
24+
if (-not $envBeforeVar -or $envBeforeVar -ne "$name=$value") {
25+
Add-Content -Path $githubEnvFilePath -Value "$name=$value"
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)