|
35 | 35 | java: [ '17', '21', '25' ] |
36 | 36 | os: [ 'ubuntu-24.04', 'windows-latest', 'macos-15' ] |
37 | 37 | steps: |
| 38 | + - name: Use faster temporary storage (Windows) |
| 39 | + if: runner.os == 'Windows' |
| 40 | + 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 |
38 | 57 | - name: Checkout code |
39 | 58 | uses: actions/checkout@v5 |
40 | 59 | with: |
@@ -242,6 +261,24 @@ jobs: |
242 | 261 | CC: cl |
243 | 262 | CXX: cl |
244 | 263 | steps: |
| 264 | + - name: Use faster temporary storage (Windows) |
| 265 | + 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 |
245 | 282 | - name: Checkout code |
246 | 283 | uses: actions/checkout@v5 |
247 | 284 | with: |
|
0 commit comments