Skip to content

Commit abc297a

Browse files
committed
Use faster drive for tempfiles on CI Windows x64
1 parent 5eff1cf commit abc297a

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ jobs:
3535
shell: bash # Use `bash` even in the Windows job.
3636

3737
steps:
38+
- name: Put temporary files on a faster drive
39+
if: startsWith(matrix.os, 'windows') && !endsWith(matrix.os, '-arm')
40+
env:
41+
NEW_TEMP: 'D:\a\_temp'
42+
run: |
43+
Get-Item -Path $Env:NEW_TEMP -ErrorAction Stop # It should already exist.
44+
Add-Content -Value "TEMP=$Env:NEW_TEMP" -Path $Env:GITHUB_ENV
45+
Add-Content -Value "TMP=$Env:NEW_TEMP" -Path $Env:GITHUB_ENV
3846
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3947
with:
4048
persist-credentials: false
@@ -254,6 +262,14 @@ jobs:
254262
runs-on: ${{ matrix.os }}
255263

256264
steps:
265+
- name: Put temporary files on a faster drive
266+
if: startsWith(matrix.os, 'windows') && !endsWith(matrix.os, '-arm')
267+
env:
268+
NEW_TEMP: 'D:\a\_temp'
269+
run: |
270+
Get-Item -Path $Env:NEW_TEMP -ErrorAction Stop # It should already exist.
271+
Add-Content -Value "TEMP=$Env:NEW_TEMP" -Path $Env:GITHUB_ENV
272+
Add-Content -Value "TMP=$Env:NEW_TEMP" -Path $Env:GITHUB_ENV
257273
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
258274
with:
259275
persist-credentials: false
@@ -323,6 +339,14 @@ jobs:
323339
runs-on: ${{ matrix.os }}
324340

325341
steps:
342+
- name: Put temporary files on a faster drive
343+
if: startsWith(matrix.os, 'windows') && !endsWith(matrix.os, '-arm')
344+
env:
345+
NEW_TEMP: 'D:\a\_temp'
346+
run: |
347+
Get-Item -Path $Env:NEW_TEMP -ErrorAction Stop # It should already exist.
348+
Add-Content -Value "TEMP=$Env:NEW_TEMP" -Path $Env:GITHUB_ENV
349+
Add-Content -Value "TMP=$Env:NEW_TEMP" -Path $Env:GITHUB_ENV
326350
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
327351
with:
328352
persist-credentials: false
@@ -438,6 +462,14 @@ jobs:
438462
TARGET: i686-pc-windows-msvc
439463

440464
steps:
465+
- name: Put temporary files on a faster drive
466+
if: startsWith(matrix.os, 'windows') && !endsWith(matrix.os, '-arm')
467+
env:
468+
NEW_TEMP: 'D:\a\_temp'
469+
run: |
470+
Get-Item -Path $Env:NEW_TEMP -ErrorAction Stop # It should already exist.
471+
Add-Content -Value "TEMP=$Env:NEW_TEMP" -Path $Env:GITHUB_ENV
472+
Add-Content -Value "TMP=$Env:NEW_TEMP" -Path $Env:GITHUB_ENV
441473
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
442474
with:
443475
persist-credentials: false

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,15 @@ jobs:
234234
PROFILE: release-github
235235

236236
steps:
237+
- name: Put temporary files on a faster drive
238+
if: startsWith(matrix.os, 'windows') && !endsWith(matrix.os, '-arm')
239+
env:
240+
NEW_TEMP: 'D:\a\_temp'
241+
run: |
242+
Get-Item -Path $Env:NEW_TEMP -ErrorAction Stop # It should already exist.
243+
Add-Content -Value "TEMP=$Env:NEW_TEMP" -Path $Env:GITHUB_ENV
244+
Add-Content -Value "TMP=$Env:NEW_TEMP" -Path $Env:GITHUB_ENV
245+
237246
- name: Checkout repository
238247
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
239248
with:

0 commit comments

Comments
 (0)