Merge topic 'ci-windows-tmpdir'

f51d809b44 ci: Place temporary files inside job directory on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9272
This commit is contained in:
Brad King
2024-02-22 13:30:50 +00:00
committed by Kitware Robot
2 changed files with 9 additions and 0 deletions
+1
View File
@@ -18,6 +18,7 @@
/sccache*
/swift
/ticlang
/tmp
/unstable-jom*
/watcom
/wix*
+8
View File
@@ -1,4 +1,12 @@
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().MainModule.FileName
# Place temporary files inside job directory.
$tmp = New-Item -Force -ItemType Directory -Path "$pwd\.gitlab\tmp"
$tmp = (New-Object -ComObject Scripting.FileSystemObject).GetFolder("$tmp").ShortPath
Set-Item -Force -Path "env:TEMP" -Value "$tmp"
Set-Item -Force -Path "env:TMP" -Value "$tmp"
$tmp = $null
if (Test-Path -Path ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1" -PathType Leaf) {
. ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1"
}