Conversation
Implements enhanced caching strategy for GitHub Actions CI workflows with efficient cache management and commit-message-driven controls. Dual-cache system: - Main branch: uses ~/.ccache-main (read-write) - Feature branches: use ~/.ccache-current (read-write) + ~/.ccache-main as secondary_storage (read-only fallback) - Feature branches only save new compilation artifacts, inheriting everything else from main branch cache - Eliminates cache duplication across branches Cache clearing via GitHub API: - New xahau-ga-clear-cache reusable action - [ci-ga-clear-cache] - Clear all caches for this job - [ci-ga-clear-cache:ccache] - Clear only if key contains "ccache" - [ci-ga-clear-cache:conan] - Clear only if key contains "conan" - [ci-ga-clear-cache:gcc Debug] - Clear if key contains both (AND logic) - Uses gh CLI with github.token (no additional credentials) - Cache deletion happens before restore step ccache improvements: - Wrapper toolchain prevents Conan from overriding ccache settings - Single cache directory approach with proper secondary_storage config - Configuration applied AFTER cache restore (prevents stale config) - Verbose build flag: [ci-ga-cmake-verbose] Conan improvements: - Configuration applied AFTER cache restore (prevents stale profile) - Removed ineffective branch comparison logic for cache saves - Fixed cache keys to use conanfile.py (not conanfile.txt) Breaking changes: - Cache version bumped to v3 (invalidates old caches) Fixes #620 (ccache caches were empty) Fixes #618 (conan not caching on feature branches)
Consolidates cache clearing + restore logic into a single reusable action to eliminate key synthesis duplication. Changes: - New xahau-ga-cache-restore action (wraps clear + restore) - Integrates cache clearing directly into restore operation - Eliminates separate cache clearing steps - Cache keys built once in restore action (not duplicated) Usage: - ccache: two restore calls (main + current branch dual-cache) - Conan: one restore call (single cache) - Saves use actions/cache/save@v4 directly (no wrapper needed) Benefits: - DRY: cache keys no longer synthesized in multiple places - Cleaner: cache clearing automatic during restore - Simpler: one action call instead of two steps per cache
Consolidates cache clearing and restore into a single self-contained action, eliminating the need for a separate clear-cache action. Changes: - Inline cache clearing logic directly into xahau-ga-cache-restore - Delete xahau-ga-clear-cache action (no longer needed) - Add additional-clear-keys input for clearing multiple keys - Remove nd-experiment-overlayfs branch from workflow triggers Benefits: - Single action does everything (clear + restore) - Simpler architecture (one action instead of two) - Self-contained and easier to maintain
Upgrades macOS CI runner from macos-15 to macos-15-xlarge for faster builds with more CPU cores. Changes: - runs-on: macos-15-xlarge (was: macos-15) Benefits: - M2 processor with more cores - Faster compilation times - Better ccache performance
…full-matrix] The matrix-setup job was using github.event.head_commit.message which is empty for PR events. Now fetches via API using the PR head SHA.
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.
Summary
Fixes ccache and Conan caching issues in GitHub Actions CI by addressing configuration ordering bugs and improving cache management.
Fixes #620 (ccache caches were empty)
Fixes #618 (Conan not caching on feature branches)
Root Causes
-DCMAKE_C_COMPILER_LAUNCHER=ccacheflags were being overwritten when Conan's toolchain was loadedshould-save-conan-cachelogic was ineffective since cache keys don't include branch namesChanges
New Actions
[ci-ga-*]tag detectionDeleted Actions
Bug Fixes
FORCEflagcache-hit != 'true'conanfile.txt(we don't have conanfile.txt)head_commit.messagewas empty for PR events)Cache Clearing via Commit Tags
[ci-ga-clear-cache]- Clear all caches for this job[ci-ga-clear-cache:ccache]- Clear only if key contains "ccache"[ci-ga-clear-cache:conan]- Clear only if key contains "conan"Other
macos-15-xlarge(M2, more cores, fixes: "The template is not valid" )CACHE_VERSIONto 3 (invalidates old broken caches)always()tosuccess()(don't cache failed builds)