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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RL8abRmgFXkVASHkkqiJbE
This commit is contained in:
@@ -69,6 +69,19 @@ jobs:
|
|||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: .gitea/scripts/macos-deps.sh
|
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
|
- name: Configure, build, test, verify
|
||||||
run: .gitea/scripts/macos-build.sh
|
run: .gitea/scripts/macos-build.sh
|
||||||
|
|
||||||
@@ -92,6 +105,16 @@ jobs:
|
|||||||
# preinstalled tooling (cmake included) can be assumed present.
|
# preinstalled tooling (cmake included) can be assumed present.
|
||||||
uses: lukka/get-cmake@latest
|
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
|
- name: Configure, build, test, verify
|
||||||
# Windows PowerShell (powershell.exe), not PowerShell Core (pwsh) --
|
# Windows PowerShell (powershell.exe), not PowerShell Core (pwsh) --
|
||||||
# this self-hosted runner does not have pwsh installed, only the
|
# this self-hosted runner does not have pwsh installed, only the
|
||||||
|
|||||||
Reference in New Issue
Block a user