Skip to content

Commit

Permalink
buck2/github: use drive D on Windows
Browse files Browse the repository at this point in the history
Summary:
Drive C is known to be significantly slower on Github Windows runners: actions/runner-images#8755

Use drive D for Cargo and Rustup.

* `build_debug` **hg 23m34s** -> **20m25s**
* `build_release` **28m5s** -> **22m56s**

Differential Revision: D66011457
  • Loading branch information
KapJI authored and facebook-github-bot committed Nov 15, 2024
1 parent 3d30713 commit 08e55c3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/actions/setup_windows_env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ description: Setup Windows environment for building and testing
runs:
using: composite
steps:
- name: Configure Cargo and Rustup to use drive D
run: |
New-Item -ItemType Directory -Path D:\rustup
New-Item -ItemType Directory -Path D:\cargo
New-Item -ItemType Directory -Path D:\temp
"RUSTUP_HOME=D:\rustup" | Out-File -FilePath $env:GITHUB_ENV -Append
"CARGO_HOME=D:\cargo" | Out-File -FilePath $env:GITHUB_ENV -Append
"TEMP=D:\temp" | Out-File -FilePath $env:GITHUB_ENV -Append
"TMP=D:\temp" | Out-File -FilePath $env:GITHUB_ENV -Append
"D:\cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
shell: pwsh
- name: Write Visual Studio path
run: |-
Expand Down

0 comments on commit 08e55c3

Please sign in to comment.