Skip to content

Commit f8f0f5a

Browse files
authored
ci: use much faster D: drive for TEMP on Windows (#13129)
This is apparently an inherent limitation of Azure (which powers GHA) which uses a slow C: drive for the OS (read-optimized) and a fast D: drive for working space. A Dev Drive/ReFS volume was considered, but after a fair bit of testing, it offered a smaller improvement in Windows CI times than simply moving TEMP to the D: drive.
1 parent dd6c4ad commit f8f0f5a

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -185,19 +185,20 @@ jobs:
185185
- { number: 2, pytest-filter: "test_install" }
186186

187187
steps:
188+
# The D: drive is significantly faster than the system C: drive.
189+
# https://github.com/actions/runner-images/issues/8755
190+
- name: Set TEMP to D:/Temp
191+
run: |
192+
mkdir "D:\\Temp"
193+
echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV
194+
188195
- uses: actions/checkout@v4
189196
- uses: actions/setup-python@v5
190197
with:
191198
python-version: ${{ matrix.python }}
192199
allow-prereleases: true
193200

194-
# We use C:\Temp (which is already available on the worker)
195-
# as a temporary directory for all of the tests because the
196-
# default value (under the user dir) is more deeply nested
197-
# and causes tests to fail with "path too long" errors.
198201
- run: pip install nox
199-
env:
200-
TEMP: "C:\\Temp"
201202

202203
# Main check
203204
- name: Run unit tests (group 1)
@@ -206,16 +207,12 @@ jobs:
206207
nox -s test-${{ matrix.python }} --
207208
tests/unit
208209
--verbose --numprocesses auto --showlocals
209-
env:
210-
TEMP: "C:\\Temp"
211210
212211
- name: Run integration tests (group ${{ matrix.group.number }})
213212
run: >-
214213
nox -s test-${{ matrix.python }} --no-install --
215214
tests/functional -k "${{ matrix.group.pytest-filter }}"
216215
--verbose --numprocesses auto --showlocals
217-
env:
218-
TEMP: "C:\\Temp"
219216
220217
tests-zipapp:
221218
name: tests / zipapp

0 commit comments

Comments
 (0)