ci/cl: improved caching, concurrency and trigger control#1178
Merged
Conversation
mehah
approved these changes
May 27, 2025
mehah
approved these changes
May 28, 2025
16b8098 to
120ee03
Compare
0bfc872 to
e83303e
Compare
|
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.



Description
This PR introduces several improvements to the GitHub Actions workflows for better performance, efficiency, and control:
✅ Caching Enhancements
Vcpkg caches now include the builtin-baseline commit ID in the key to avoid unnecessary rebuilds on version updates.
Added proper fallback restore-keys to reduce cold cache hits.
Applied scoped cache keys per OS/build-type for ccache, vcpkg_installed, and CMake build directories.
Concurrency Optimization
Added concurrency.group configuration to prevent redundant workflow runs on the same branch.
Ensures that only the most recent commit per branch is built, reducing resource usage.
Workflow Trigger Improvements
Workflows are now scoped to run only when changes occur in src/ or their respective .yml workflow files, preventing unnecessary builds.
Example: build-emscripten.yml only runs if src/** or .github/workflows/build-emscripten.yml changes.
Docker Workflow Optimizations
Integrated GitHub Actions cache for Docker layers using cache-from and cache-to with type=gha.
Cancel-previous-run job added with updated version handling.
Cleanup
Fixed cancel-runs job version issue (styfle/cancel-workflow-action was incorrectly referenced).
Ensured all workflows use actions/checkout@v4 and consistent cache setup.