From 8b7af6b88d08f9482b950e05dab2a5862e7d1a98 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 19:48:58 +0000 Subject: [PATCH 1/3] Initial plan From 47430accee2f11acaf2a5873c2044e5a12a2fce0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 19:51:44 +0000 Subject: [PATCH 2/3] fix: only save vcpkg cache when binary contents have changed Co-authored-by: johnpatek <31934875+johnpatek@users.noreply.github.com> Agent-Logs-Url: https://github.com/maxtek6/WebFrame/sessions/119ad140-61dd-47ae-b1a1-bf9d9daaf024 --- .github/workflows/main.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6868c4f..ebbb5c7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,10 +30,11 @@ jobs: ref: ${{ github.ref }} - name: "Restore VCPKG cache" + id: restore-test-cache uses: actions/cache/restore@v4 with: path: ${{ github.workspace }}/vcpkg-test-cache - key: vcpkg-test-cache-${{ github.run_id }} + key: vcpkg-test-cache-${{ hashFiles('WebFrame/vcpkg.json', 'WebFrame/vcpkg-configuration.json') }} restore-keys: vcpkg-test-cache - name: CMake Build @@ -44,10 +45,11 @@ jobs: make test - name: "Save VCPKG cache" + if: steps.restore-test-cache.outputs.cache-hit != 'true' uses: actions/cache/save@v4 with: path: ${{ github.workspace }}/vcpkg-test-cache - key: vcpkg-test-cache-${{ github.run_id }} + key: vcpkg-test-cache-${{ hashFiles('WebFrame/vcpkg.json', 'WebFrame/vcpkg-configuration.json') }} build: needs: test @@ -76,10 +78,11 @@ jobs: ref: ${{ github.ref }} - name: "Restore VCPKG cache" + id: restore-build-cache uses: actions/cache/restore@v5 with: path: ${{ github.workspace }}/vcpkg-${{ matrix.os }} - key: vcpkg-${{ matrix.os }}-${{ github.run_id }} + key: vcpkg-${{ matrix.os }}-${{ hashFiles('WebFrame/vcpkg.json', 'WebFrame/vcpkg-configuration.json') }} restore-keys: vcpkg-${{ matrix.os }} - name: Ubuntu setup @@ -96,7 +99,8 @@ jobs: cmake --build build - name: "Save VCPKG cache" + if: steps.restore-build-cache.outputs.cache-hit != 'true' uses: actions/cache/save@v5 with: path: ${{ github.workspace }}/vcpkg-${{ matrix.os }} - key: vcpkg-${{ matrix.os }}-${{ github.run_id }} \ No newline at end of file + key: vcpkg-${{ matrix.os }}-${{ hashFiles('WebFrame/vcpkg.json', 'WebFrame/vcpkg-configuration.json') }} \ No newline at end of file From 7a0f6bf752c227291c3813103a9ef12bd79ef699 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 20:08:54 +0000 Subject: [PATCH 3/3] fix: use jq hash of deps+vcpkg ref for precise cache keying Co-authored-by: johnpatek <31934875+johnpatek@users.noreply.github.com> Agent-Logs-Url: https://github.com/maxtek6/WebFrame/sessions/fb217989-1474-4e1b-9ac5-e89043f9f671 --- .github/workflows/main.yml | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ebbb5c7..a6ea2d7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,6 +7,9 @@ permissions: contents: write packages: write +env: + VCPKG_REF: '2026.01.16' + jobs: test: name: Unit Tests @@ -20,7 +23,7 @@ jobs: with: repository: microsoft/vcpkg path: vcpkg - ref: '2026.01.16' + ref: ${{ env.VCPKG_REF }} - name: Checkout code uses: actions/checkout@v6 @@ -29,13 +32,20 @@ jobs: path: WebFrame ref: ${{ github.ref }} + - name: Compute vcpkg cache hash + id: vcpkg-hash + shell: bash + run: | + hash=$(jq -cj '{features,dependencies}' WebFrame/vcpkg.json | cat - WebFrame/vcpkg-configuration.json | sha256sum | awk '{print $1}') + echo "value=${hash}" >> $GITHUB_OUTPUT + - name: "Restore VCPKG cache" id: restore-test-cache uses: actions/cache/restore@v4 with: path: ${{ github.workspace }}/vcpkg-test-cache - key: vcpkg-test-cache-${{ hashFiles('WebFrame/vcpkg.json', 'WebFrame/vcpkg-configuration.json') }} - restore-keys: vcpkg-test-cache + key: vcpkg-test-cache-${{ env.VCPKG_REF }}-${{ steps.vcpkg-hash.outputs.value }} + restore-keys: vcpkg-test-cache-${{ env.VCPKG_REF }} - name: CMake Build run: | @@ -49,7 +59,7 @@ jobs: uses: actions/cache/save@v4 with: path: ${{ github.workspace }}/vcpkg-test-cache - key: vcpkg-test-cache-${{ hashFiles('WebFrame/vcpkg.json', 'WebFrame/vcpkg-configuration.json') }} + key: vcpkg-test-cache-${{ env.VCPKG_REF }}-${{ steps.vcpkg-hash.outputs.value }} build: needs: test @@ -68,7 +78,7 @@ jobs: with: repository: microsoft/vcpkg path: vcpkg - ref: '2026.01.16' + ref: ${{ env.VCPKG_REF }} - name: Checkout code uses: actions/checkout@v6 @@ -77,13 +87,20 @@ jobs: path: WebFrame ref: ${{ github.ref }} + - name: Compute vcpkg cache hash + id: vcpkg-hash + shell: bash + run: | + hash=$(jq -cj '{features,dependencies}' WebFrame/vcpkg.json | cat - WebFrame/vcpkg-configuration.json | sha256sum | awk '{print $1}') + echo "value=${hash}" >> $GITHUB_OUTPUT + - name: "Restore VCPKG cache" id: restore-build-cache uses: actions/cache/restore@v5 with: path: ${{ github.workspace }}/vcpkg-${{ matrix.os }} - key: vcpkg-${{ matrix.os }}-${{ hashFiles('WebFrame/vcpkg.json', 'WebFrame/vcpkg-configuration.json') }} - restore-keys: vcpkg-${{ matrix.os }} + key: vcpkg-${{ matrix.os }}-${{ env.VCPKG_REF }}-${{ steps.vcpkg-hash.outputs.value }} + restore-keys: vcpkg-${{ matrix.os }}-${{ env.VCPKG_REF }} - name: Ubuntu setup if: matrix.os == 'ubuntu-latest' @@ -103,4 +120,4 @@ jobs: uses: actions/cache/save@v5 with: path: ${{ github.workspace }}/vcpkg-${{ matrix.os }} - key: vcpkg-${{ matrix.os }}-${{ hashFiles('WebFrame/vcpkg.json', 'WebFrame/vcpkg-configuration.json') }} \ No newline at end of file + key: vcpkg-${{ matrix.os }}-${{ env.VCPKG_REF }}-${{ steps.vcpkg-hash.outputs.value }} \ No newline at end of file