From b18f2e2f4f91e51920ed7f918bea5fad46dc6b8f Mon Sep 17 00:00:00 2001 From: Yury Zialionka Date: Thu, 13 Aug 2026 19:43:18 -0600 Subject: [PATCH] revert(ci): keep Windows off the bun dependency cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Measured with the Defender exclusions active: Setup Bun ran 83-102s with cache restore vs ~86s with a fresh install — no benefit, plus a save-step cost on non-PR runs. The original reasoning stands. --- .github/actions/setup-bun/action.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-bun/action.yml b/.github/actions/setup-bun/action.yml index 4979ebd246..421bc0e5ca 100644 --- a/.github/actions/setup-bun/action.yml +++ b/.github/actions/setup-bun/action.yml @@ -40,9 +40,10 @@ runs: shell: bash run: echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT" - # Windows uses this cache again: the old 2m23s restore-vs-1m27s-install measurement # kilocode_change - # predates the Defender exclusions, which cover both the bun cache and node_modules. # kilocode_change + # Restoring the ~1 GB cache buys nothing on Windows even with Defender exclusions # kilocode_change + # (measured 83-102s Setup Bun with cache vs ~86s fresh install); keep Windows off it. # kilocode_change - name: Restore Bun dependencies + if: runner.os != 'Windows' # kilocode_change id: bun-cache uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: @@ -101,8 +102,9 @@ runs: fi shell: bash + # Do not upload a Windows cache that Windows jobs intentionally never restore. # kilocode_change - name: Save Bun dependencies - if: steps.bun-cache.outputs.cache-hit != 'true' && github.event_name != 'pull_request' && github.event_name != 'pull_request_target' # kilocode_change + if: runner.os != 'Windows' && steps.bun-cache.outputs.cache-hit != 'true' && github.event_name != 'pull_request' && github.event_name != 'pull_request_target' # kilocode_change uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: ${{ steps.cache.outputs.dir }}