From 1a8255230f8c84f10d306c6ec8a9b38f8c566a3c Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Mon, 7 Sep 2026 05:19:16 -0700 Subject: [PATCH] ci: cache the OBS SDK bootstrap deps across runs cmake/{windows,macos}/buildspec.cmake download the pinned obs-deps bundle + obs-studio source into .deps/, with its own idempotent skip-if-present logic keyed on SHA256 marker files. That logic never gets a chance to fire because .deps/ lives inside the checkout and a fresh `actions/checkout` wipes it on every single push -- this is what has made every CI iteration tonight re-pay the several-minute cold download instead of only paying it once. Add an actions/cache step for .deps/ in both jobs, keyed on the files that actually pin dependency versions (buildspec.json + buildspec_common.cmake + the platform buildspec.cmake), so a version bump still invalidates the cache correctly. No runner-side config change needed -- the act_runner instance already has its built-in cache server on by default (cache.enabled: true, confirmed via `gitea-runner.exe generate-config` on winvm-builder). Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01RL8abRmgFXkVASHkkqiJbE --- .gitea/workflows/build.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 96643ba..c634868 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -69,6 +69,19 @@ jobs: - name: Install build dependencies run: .gitea/scripts/macos-deps.sh + - name: Cache OBS SDK bootstrap deps + # cmake/macos/buildspec.cmake downloads the pinned obs-deps bundle + + # obs-studio source into .deps/ and already skips re-downloading via + # SHA256 marker files -- but .deps/ lives inside the checkout, so a + # fresh `actions/checkout` above wipes it every run regardless. This + # cache step is what actually makes that existing skip-logic apply + # across runs. The runner's built-in cache server is on by default + # (cache.enabled: true), so this needs no runner-side config. + uses: actions/cache@v4 + with: + path: .deps + key: obs-deps-${{ runner.os }}-${{ hashFiles('cmake/macos/buildspec.cmake', 'cmake/common/buildspec_common.cmake', 'buildspec.json') }} + - name: Configure, build, test, verify run: .gitea/scripts/macos-build.sh @@ -92,6 +105,16 @@ jobs: # preinstalled tooling (cmake included) can be assumed present. uses: lukka/get-cmake@latest + - name: Cache OBS SDK bootstrap deps + # See the matching step in the macOS job above for why this is + # needed: cmake/windows/buildspec.cmake's own download logic is + # already idempotent, it just never gets the chance because .deps/ + # lives inside the checkout and is wiped by every fresh clone. + uses: actions/cache@v4 + with: + path: .deps + key: obs-deps-${{ runner.os }}-${{ hashFiles('cmake/windows/buildspec.cmake', 'cmake/common/buildspec_common.cmake', 'buildspec.json') }} + - name: Configure, build, test, verify # Windows PowerShell (powershell.exe), not PowerShell Core (pwsh) -- # this self-hosted runner does not have pwsh installed, only the