summaryrefslogtreecommitdiffstats
path: root/.gitlab
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-02-19 21:48:00 (GMT)
committerBrad King <brad.king@kitware.com>2024-02-20 11:36:22 (GMT)
commitf51d809b4437471c5848555ff42880c1308865c4 (patch)
tree817166a485a154d8262bb9acb4fc94701f0b18f3 /.gitlab
parent14b0ebd4ca33b833ae0351f8383fd631c763aa3e (diff)
downloadCMake-f51d809b4437471c5848555ff42880c1308865c4.zip
CMake-f51d809b4437471c5848555ff42880c1308865c4.tar.gz
CMake-f51d809b4437471c5848555ff42880c1308865c4.tar.bz2
ci: Place temporary files inside job directory on Windows
Diffstat (limited to '.gitlab')
-rw-r--r--.gitlab/.gitignore1
-rwxr-xr-x.gitlab/ci/env.ps18
2 files changed, 9 insertions, 0 deletions
diff --git a/.gitlab/.gitignore b/.gitlab/.gitignore
index 83e21d5..4afdad3 100644
--- a/.gitlab/.gitignore
+++ b/.gitlab/.gitignore
@@ -18,6 +18,7 @@
/sccache*
/swift
/ticlang
+/tmp
/unstable-jom*
/watcom
/wix*
diff --git a/.gitlab/ci/env.ps1 b/.gitlab/ci/env.ps1
index 72a8cb8..754521b 100755
--- a/.gitlab/ci/env.ps1
+++ b/.gitlab/ci/env.ps1
@@ -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"
}