Skip to content

Commit

Permalink
buck2/oss: use custom %TEMP% in CircleCI on Windows (#371)
Browse files Browse the repository at this point in the history
Summary:
This helps to eliminate flakiness of doctests on Windows. Sometime they fail with:
```
error: couldn't create a temp dir: The system cannot find the path specified. (os error 3) at path "C:\\Users\\CIRCLE~1.PAC\\AppData\\Local\\Temp\\rustdoctest86bH8a\\rmetawkIVXG"
```

Probably something in CircleCI runner messes with default TEMP dir, causing rustc to fail with this error.

Tested on 15 reruns of CircleCI job, they all succeeded, so I'm pretty confident this helps, although not sure exactly why. Before that, at least few out of 5 were failing.

Pull Request resolved: #371

Reviewed By: ndmitchell

Differential Revision: D47917932

fbshipit-source-id: 5d857e2f947e316e61f65764bb1f70b41bf275b8
  • Loading branch information
KapJI authored and facebook-github-bot committed Aug 1, 2023
1 parent fdcc7f3 commit 7275c04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ commands:
$vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.VisualStudio.Component.VC.Llvm.Clang -property installationPath
$llvmPath = Join-Path $vsPath "VC\Tools\Llvm\x64\bin"
$env:PATH = "$env:USERPROFILE\.cargo\bin;$llvmPath;" + $env:PATH
$env:TEMP = "$env:USERPROFILE\temp"
$env:TMP = $env:TEMP
'@
Add-Content "$PsHome\profile.ps1" $psProfileContent
New-Item -ItemType Directory -Path "$env:USERPROFILE\temp"
- print_versions

setup_reindeer:
Expand Down

0 comments on commit 7275c04

Please sign in to comment.