From 9f026f5823056151b5bc0b324d83ffbc087fcd8f Mon Sep 17 00:00:00 2001 From: Arun Sharma Date: Sun, 24 May 2026 11:32:31 -0700 Subject: [PATCH] Fix Windows vcpkg cache reuse --- .github/workflows/build-and-deploy.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 1a739ca..f4302ca 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -3,6 +3,8 @@ name: Build and Deploy on: pull_request: push: + branches: + - main tags: - 'v*' workflow_dispatch: @@ -36,12 +38,22 @@ jobs: node-version: '20' # ── System dependencies ──────────────────────────────────────────────── + - name: Detect vcpkg version (Windows) + id: vcpkg-version + if: matrix.platform == 'win32' + shell: pwsh + run: | + $commit = git -C C:\vcpkg rev-parse HEAD + "commit=$commit" >> $env:GITHUB_OUTPUT + - name: Cache system dependencies (Windows) if: matrix.platform == 'win32' uses: actions/cache@v4 with: path: C:\vcpkg-binary-cache - key: vcpkg-binary-cache-${{ runner.os }}-arrow-23.0.1 + key: vcpkg-binary-cache-${{ runner.os }}-${{ steps.vcpkg-version.outputs.commit }}-arrow-x64-windows + restore-keys: | + vcpkg-binary-cache-${{ runner.os }}- - name: Install system dependencies (Linux) if: matrix.platform == 'linux'