From a79600db93820fdeec60400592e8f5a5bd1c9d85 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 16 Aug 2025 21:30:19 +0900 Subject: [PATCH 1/2] CI: windows: Use possibly faster device for TMP/TEMP --- .github/workflows/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 9137e5298a9b1b..e853471b05a997 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -113,8 +113,8 @@ jobs: -arch=${{ matrix.target || 'amd64' }} ^ ${{ matrix.vcvars && '-vcvars_ver=' || '' }}${{ matrix.vcvars }} nmake -f nul - set TMP=%USERPROFILE%\AppData\Local\Temp - set TEMP=%USERPROFILE%\AppData\Local\Temp + set TMP=%RUNNER_TEMP% + set TEMP=%RUNNER_TEMP% set MAKEFLAGS=l set /a TEST_JOBS=(15 * %NUMBER_OF_PROCESSORS% / 10) > nul set RUBY_OPT_DIR=%GITHUB_WORKSPACE:\=/%/src/vcpkg_installed/%VCPKG_DEFAULT_TRIPLET% From 4d0836d928839ff13580f5e5b74a40b3914d9f59 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 16 Aug 2025 21:38:03 +0900 Subject: [PATCH 2/2] CI: windows: Skip rebuilding vcpkg packages when cache restored --- .github/workflows/windows.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e853471b05a997..0b7bf25d95ff0b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -85,6 +85,7 @@ jobs: shell: pwsh - name: Restore vcpkg artifact + id: restore-vcpkg uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: path: src\vcpkg_installed @@ -94,13 +95,14 @@ jobs: run: | vcpkg install --vcpkg-root=%USERPROFILE%\scoop\apps\vcpkg\current working-directory: src + if: ${{ ! steps.restore-vcpkg.outputs.cache-hit }} - name: Save vcpkg artifact uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: path: src\vcpkg_installed key: windows-${{ matrix.os }}-vcpkg-${{ hashFiles('src/vcpkg.json') }} - if: ${{ github.ref_name == 'master' || startsWith(github.ref_name, 'ruby_') }} + if: ${{ ! steps.restore-vcpkg.outputs.cache-hit && (github.ref_name == 'master' || startsWith(github.ref_name, 'ruby_')) }} - name: setup env # Available Ruby versions: https://github.com/actions/runner-images/blob/main/images/windows/Windows2019-Readme.md#ruby