From f8f0f5ac2f477fef70bd47f9816648505743cff2 Mon Sep 17 00:00:00 2001 From: Richard Si Date: Sun, 29 Dec 2024 13:13:42 -0500 Subject: [PATCH] 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. --- .github/workflows/ci.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a946a3d3e36..40e7adb32dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -185,19 +185,20 @@ jobs: - { number: 2, pytest-filter: "test_install" } steps: + # The D: drive is significantly faster than the system C: drive. + # https://github.com/actions/runner-images/issues/8755 + - name: Set TEMP to D:/Temp + run: | + mkdir "D:\\Temp" + echo "TEMP=D:\\Temp" >> $env:GITHUB_ENV + - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} allow-prereleases: true - # We use C:\Temp (which is already available on the worker) - # as a temporary directory for all of the tests because the - # default value (under the user dir) is more deeply nested - # and causes tests to fail with "path too long" errors. - run: pip install nox - env: - TEMP: "C:\\Temp" # Main check - name: Run unit tests (group 1) @@ -206,16 +207,12 @@ jobs: nox -s test-${{ matrix.python }} -- tests/unit --verbose --numprocesses auto --showlocals - env: - TEMP: "C:\\Temp" - name: Run integration tests (group ${{ matrix.group.number }}) run: >- nox -s test-${{ matrix.python }} --no-install -- tests/functional -k "${{ matrix.group.pytest-filter }}" --verbose --numprocesses auto --showlocals - env: - TEMP: "C:\\Temp" tests-zipapp: name: tests / zipapp