From a80a150f79234a33a3d76e8092931b89ab12fc3e Mon Sep 17 00:00:00 2001 From: Huy Do Date: Wed, 3 May 2023 16:00:06 -0700 Subject: [PATCH] Do not cleanup MSVC and CUDA on Windows non-ephemeral runners --- windows/internal/setup.bat | 4 ---- windows/internal/vs2019_install.ps1 | 2 +- windows/internal/vs2022_install.ps1 | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/windows/internal/setup.bat b/windows/internal/setup.bat index e3cfdf56e..810d09db9 100755 --- a/windows/internal/setup.bat +++ b/windows/internal/setup.bat @@ -75,10 +75,6 @@ IF "%DEBUG%" == "" ( set LIBTORCH_PREFIX=libtorch-win-%VARIANT%-debug ) -:: remove files to save space. -rmdir /s /q "C:/Program Files/NVIDIA GPU Computing Toolkit/" -rmdir /s /q "C:/Program Files (x86)/Microsoft Visual Studio/" - 7z a -tzip "%LIBTORCH_PREFIX%-%PYTORCH_BUILD_VERSION%.zip" libtorch\* :: Cleanup raw data to save space rmdir /s /q libtorch diff --git a/windows/internal/vs2019_install.ps1 b/windows/internal/vs2019_install.ps1 index c88986dfb..d586081f9 100644 --- a/windows/internal/vs2019_install.ps1 +++ b/windows/internal/vs2019_install.ps1 @@ -51,6 +51,6 @@ if (($exitCode -ne 0) -and ($exitCode -ne 3010)) { } Start-Process "${PWD}\Collect.exe" -NoNewWindow -Wait -PassThru New-Item -Path "C:\w\build-results" -ItemType "directory" -Force - Copy-Item -Path "C:\Users\circleci\AppData\Local\Temp\vslogs.zip" -Destination "C:\w\build-results\" + Copy-Item -Path "C:\Users\${env:USERNAME}\AppData\Local\Temp\vslogs.zip" -Destination "C:\w\build-results\" exit 1 } diff --git a/windows/internal/vs2022_install.ps1 b/windows/internal/vs2022_install.ps1 index 55fba4737..c5e299ca4 100644 --- a/windows/internal/vs2022_install.ps1 +++ b/windows/internal/vs2022_install.ps1 @@ -51,6 +51,6 @@ if (($exitCode -ne 0) -and ($exitCode -ne 3010)) { } Start-Process "${PWD}\Collect.exe" -NoNewWindow -Wait -PassThru New-Item -Path "C:\w\build-results" -ItemType "directory" -Force - Copy-Item -Path "C:\Users\circleci\AppData\Local\Temp\vslogs.zip" -Destination "C:\w\build-results\" + Copy-Item -Path "C:\Users\${env:USERNAME}\AppData\Local\Temp\vslogs.zip" -Destination "C:\w\build-results\" exit 1 }