File tree Expand file tree Collapse file tree
.github/actions/setup-sycl-toolchain Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9999 if : ${{ runner.os == 'Windows' }}
100100 shell : pwsh
101101 run : |
102+ function Get-ShortPath($Path) {
103+ $resolvedPath = (Resolve-Path $Path).Path
104+ $shortPath = & $env:ComSpec /d /c "for %I in (`"$resolvedPath`") do @echo %~sI"
105+ if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace($shortPath)) {
106+ throw "Failed to resolve short path for $resolvedPath"
107+ }
108+ return $shortPath.Trim()
109+ }
110+
102111 $clangCl = Get-Command clang-cl.exe -ErrorAction SilentlyContinue
103112 if (-not $clangCl -and $env:ProgramFiles) {
104113 $programFilesClang = Join-Path $env:ProgramFiles 'LLVM/bin/clang-cl.exe'
@@ -126,10 +135,11 @@ runs:
126135 if (-not (Test-Path $clangCxxPath)) {
127136 throw "clang++.exe was not found next to $clangClPath. Install the Visual Studio LLVM/Clang toolset on the Windows runner."
128137 }
138+ $clangCxxShortPath = Get-ShortPath $clangCxxPath
129139
130140 "ITLABAI_CC=$clangClPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
131141 "ITLABAI_CXX=$clangClPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
132- "ITLABAI_ACPP_CPU_CXX=$clangCxxPath " | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
142+ "ITLABAI_ACPP_CPU_CXX=$clangCxxShortPath " | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
133143 "$clangBin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
134144
135145 - name : Configure Windows toolchain environment
You can’t perform that action at this time.
0 commit comments