Unverified Commit b33f412c authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[ci] fix MSVC warning about builds in temp directory (#6573)

parent 9f07fbeb
......@@ -195,7 +195,6 @@ if ($env:COMPILER -ne "MSVC") {
}
} else {
$env:TMPDIR = $env:USERPROFILE # to avoid warnings about incremental builds inside a temp directory
$INSTALL_LOG_FILE_NAME = "$env:BUILD_SOURCESDIRECTORY\00install_out.txt"
Run-R-Code-Redirect-Stderr "source('build_r.R')" 1> $INSTALL_LOG_FILE_NAME ; $install_succeeded = $?
Write-Output "----- build and install logs -----"
......
......@@ -8,6 +8,13 @@ function Check-Output {
$env:CONDA_ENV = "test-env"
$env:LGB_VER = (Get-Content $env:BUILD_SOURCESDIRECTORY\VERSION.txt).trim()
# Use custom temp directory to avoid
# > warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory
# > as it could lead to issues with incremental build.
# And make sure this directory is always clean
$env:TMPDIR = "$env:USERPROFILE\tmp"
Remove-Item $env:TMPDIR -Force -Recurse -ErrorAction Ignore
[Void][System.IO.Directory]::CreateDirectory($env:TMPDIR)
if ($env:TASK -eq "r-package") {
& .\.ci\test_r_package_windows.ps1 ; Check-Output $?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment