Skip to content

Commit f472113

Browse files
committed
[CI] Simplify Windows D: drive usage.
1 parent 6663c18 commit f472113

File tree

1 file changed

+4
-32
lines changed

1 file changed

+4
-32
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,8 @@ jobs:
3838
- name: Use faster temporary storage (Windows)
3939
if: runner.os == 'Windows'
4040
run: |
41-
$fast_dir = "D:\fast-dir"
42-
New-Item -ItemType Directory -Path "$fast_dir"
43-
New-Item -ItemType Directory -Path "$fast_dir\temp"
44-
New-Item -ItemType Directory -Path "$fast_dir\.m2"
45-
New-Item -ItemType Directory -Path "$fast_dir\.gradle"
46-
47-
if (Test-Path "$env:userprofile\.m2")
48-
{
49-
Remove-Item "$env:userprofile\.m2" -Recurse
50-
}
51-
New-Item -ItemType SymbolicLink -Path "$env:userprofile\.m2" -Target "$fast_dir\.m2"
52-
53-
echo "TMP=$fast_dir\temp" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
54-
echo "TEMP=$fast_dir\temp" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
55-
echo "M2_HOME=$fast_dir\.m2" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
56-
echo "GRADLE_USER_HOME=$fast_dir\.gradle" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
41+
echo "TMP=$env:RUNNER_TEMP" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
42+
echo "TEMP=$env:RUNNER_TEMP" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
5743
- name: Checkout code
5844
uses: actions/checkout@v5
5945
with:
@@ -263,22 +249,8 @@ jobs:
263249
steps:
264250
- name: Use faster temporary storage (Windows)
265251
run: |
266-
$fast_dir = "D:\fast-dir"
267-
New-Item -ItemType Directory -Path "$fast_dir"
268-
New-Item -ItemType Directory -Path "$fast_dir\temp"
269-
New-Item -ItemType Directory -Path "$fast_dir\.m2"
270-
New-Item -ItemType Directory -Path "$fast_dir\.gradle"
271-
272-
if (Test-Path "$env:userprofile\.m2")
273-
{
274-
Remove-Item "$env:userprofile\.m2" -Recurse
275-
}
276-
New-Item -ItemType SymbolicLink -Path "$env:userprofile\.m2" -Target "$fast_dir\.m2"
277-
278-
echo "TMP=$fast_dir\temp" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
279-
echo "TEMP=$fast_dir\temp" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
280-
echo "M2_HOME=$fast_dir\.m2" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
281-
echo "GRADLE_USER_HOME=$fast_dir\.gradle" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
252+
echo "TMP=$env:RUNNER_TEMP" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
253+
echo "TEMP=$env:RUNNER_TEMP" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
282254
- name: Checkout code
283255
uses: actions/checkout@v5
284256
with:

0 commit comments

Comments
 (0)