svn commit: r1930901 - subversion/trunk/.github/workflows

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <176690319919.150879.10720200095006746143@svn02-us-east.apache.org>
Author: jun66j5
Date: Sun Dec 28 06:26:38 2025
New Revision: 1930901

Log:
Use actions/cache instead of removed x-gha cache feature for vcpkg built
binaries caching.

* .github/workflows/cmake.yml
  (env):
    Remove VCPKG_BINARY_SOURCES.
  (Export GitHub Actions cache environment variables):
    Removed.
  (Get vcpkg sha (Windows, vcpkg),
   Restore vcpkg archives (Windows, vcpkg)):
    Added.
  (Install dependencies (Windows, vcpkg)):
    Add VCPKG_DEFAULT_BINARY_CACHE environment and create `vcpkg-archives`
    directory if missing.
  (Save vcpkg archives (Windows, vcpkg)):
    Added.

Modified:
   subversion/trunk/.github/workflows/cmake.yml

Modified: subversion/trunk/.github/workflows/cmake.yml
==============================================================================
--- subversion/trunk/.github/workflows/cmake.yml	Sun Dec 28 02:48:51 2025	(r1930900)
+++ subversion/trunk/.github/workflows/cmake.yml	Sun Dec 28 06:26:38 2025	(r1930901)
@@ -93,7 +93,6 @@ jobs:
     name: ${{ matrix.name }}
 
     env:
-      VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
       CMAKE_GENERATOR: ${{ matrix.cmake_generator }}
 
     steps:
@@ -106,22 +105,42 @@ jobs:
 
           ls env: | foreach { "$($_.Name)=$($_.Value)" >> $env:GITHUB_ENV }
 
-      - name: Export GitHub Actions cache environment variables
+      - name: Get vcpkg sha (Windows, vcpkg)
         if: runner.os == 'Windows'
-        uses: actions/github-script@v7
+        id: vcpkg-sha
+        run: |
+          cd C:\vcpkg
+          $sha = git rev-parse HEAD
+          echo "sha=$sha" >> $env:GITHUB_OUTPUT
+
+      - name: Restore vcpkg archives (Windows, vcpkg)
+        if: runner.os == 'Windows'
+        uses: actions/cache/restore@v4
         with:
-          script: |
-            core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
-            core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
+          path: vcpkg-archives
+          key: vcpkg/${{ runner.os }}/${{ matrix.vcpkg_triplet }}/${{ steps.vcpkg-sha.outputs.sha }}
+          restore-keys: vcpkg/${{ runner.os }}/${{ matrix.vcpkg_triplet }}/
 
       - name: Install dependencies (Windows, vcpkg)
         if: runner.os == 'Windows'
+        env:
+          VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}\vcpkg-archives
         run: |
+          if (-not (Test-Path $env:VCPKG_DEFAULT_BINARY_CACHE)) {
+            New-Item $env:VCPKG_DEFAULT_BINARY_CACHE -ItemType Directory | Out-Null
+          }
           C:\vcpkg\vcpkg.exe install --triplet ${{ matrix.vcpkg_triplet }} `
             apr apr-util serf expat zlib sqlite3
 
           "CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake" >> $env:GITHUB_ENV
 
+      - name: Save vcpkg archives (Windows, vcpkg)
+        if: runner.os == 'Windows'
+        uses: actions/cache/save@v4
+        with:
+          path: vcpkg-archives
+          key: vcpkg/${{ runner.os }}/${{ matrix.vcpkg_triplet }}/${{ steps.vcpkg-sha.outputs.sha }}
+
       - name: Install dependencies (Linux, apt-get)
         if: runner.os == 'Linux'
         run: >
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.