Skip to content

ci/cl: improved caching, concurrency and trigger control#1178

Merged
dudantas merged 1 commit intomainfrom
dudantas/fix-gha-workflows
Jun 10, 2025
Merged

ci/cl: improved caching, concurrency and trigger control#1178
dudantas merged 1 commit intomainfrom
dudantas/fix-gha-workflows

Conversation

@dudantas
Copy link
Copy Markdown
Member

@dudantas dudantas commented May 27, 2025

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.

@dudantas dudantas changed the title fix: gha ubuntu workflow fix: gha workflows May 27, 2025
@dudantas dudantas changed the title fix: gha workflows ci/cl: improved caching, concurrency and trigger control May 27, 2025
@dudantas dudantas force-pushed the dudantas/fix-gha-workflows branch 2 times, most recently from 16b8098 to 120ee03 Compare May 31, 2025 04:06
@dudantas dudantas force-pushed the dudantas/fix-gha-workflows branch from 0bfc872 to e83303e Compare June 10, 2025 14:57
@sonarqubecloud
Copy link
Copy Markdown

@dudantas dudantas merged commit 85730e3 into main Jun 10, 2025
13 checks passed
@mehah mehah deleted the dudantas/fix-gha-workflows branch June 10, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants