Repository navigation
Conversation
Restore libs/download from Actions cache using one key per platform/arch: apothecary-<tag>-<platform>-<arch>-<gcc>-<sha16 of asset digests>. download_libs.sh already skips curl when the local archive size matches, so a hit avoids re-fetching the same latest packages on every job. Exact key only (no restore-keys prefix). Linux gcc 14 remaps to the published gcc10 archives. VS ARM64 keys include the x64 + arm64ec zips that download_libs.sh also installs. Measure restore vs GitHub release curl before treating this as a win: .github/workflows/measure-apothecary-cache.yml (linux ~7 MB, osx ~88 MB). Restore from Actions cache is sometimes slower than curl.
danoli3
marked this pull request as draft
November 5, 2026 06:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cache apothecary tarballs by digest
Every OF job re-downloads the same
latestpackages fromopenframeworks/apothecary.download_libs.shalready skips curl whenlibs/downloadhas the right size. This restores that directory from Actions cache.Measure first. Restore from Actions cache is sometimes slower than curl from GitHub releases. The dedicated workflow times both; do not treat this as a wall-clock win until those numbers land.
Key
One key per platform/arch slice:
Exact match only (no
restore-keysprefix). Empty key (missing digests / API failure) skips cache and falls through to curl.Live
latestexamples:82114ff8701fbc0ad086b7c2d20ab86e0a0072518d4c02f947acf6a0fc730c1aLinux gcc 14 remaps to the published gcc10 archives, same as
download_libs.sh. linuxaarch64andarm64stay distinct. VS ARM64 keys include the x64 + arm64ec zips thatdownload_libs.shalso installs (~1.3 GB).Change
scripts/ci/apothecary_cache_key.sh— digest lookup (fixture viaAPOTHECARY_RELEASE_JSON).github/actions/cache-apothecary—actions/cache@v6.1.0onlibs/downloaddownload_libs/of update libsinof.yml,linux-lib-paths.yml,nightly.yml,manual-release.yml,manual-web-examples.yml.github/workflows/measure-apothecary-cache.yml— seed, then time restore vs curl for linux ~7 MB (ubuntu-24.04) and osx ~88 MB (xcode-27). Summary table in the job summary.validate-library-downloads.ymlCache budget
Repo cap is ~10 GB and already holds ccache/sccache. These are compressed tarballs, not extracted trees. VS 2022+2026 × x64/ARM64/ARM64EC is the heavy slice. LRU eviction if we go over.
Fork PRs often cannot save caches (read-only token). First run of this PR may still curl; a master run after merge seeds the keys for later PRs. Look at Measure apothecary cache for restore vs curl times.
Test
bash scripts/ci/tests/test-apothecary-cache-key.sh(fixture: gcc 14 remap, x64 alias, VS ARM64 extra zips, emscripten default 32, empty key when no digests)bash -non the new scriptsopenframeworks/apothecarylatest