Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add concurrency groups to workflows #980

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

joshuasing
Copy link
Member

This pull request adds concurrency groups to all existing GitHub Actions workflows.

When a pull request is created, or a commit is pushed to a branch, all workflows related to that event are triggered. However, when subsequent commits are pushed to that pull request/branch, the workflow runs may be delayed until the previous workflow runs complete, due to GitHub's runner concurrency limit.

By adding concurrency groups to the workflows, we can automatically cancel all pending or running workflow runs related to previous commits, allowing workflow runs on newer commits to start faster.

This works by grouping each workflow run by the workflow name and git reference (branch/pull request). When concurrent workflow runs with the same group are queued, this will cause any previous pending or running jobs to be cancelled automatically (cancel-in-progress: true).

Related: https://docs.github.com/en/actions/using-jobs/using-concurrency

@joshuasing joshuasing added the CI label Dec 19, 2023
@botovq
Copy link
Contributor

botovq commented Dec 19, 2023 via email

@joshuasing
Copy link
Member Author

I see how this can be an improvement while stacking up commits on a PR. Is the flipside of this that if I break, say, some MinGW workflow, all other runs are cancelled or does breakage not count as cancellation? If it does count, I'm not sure this will be a quality of life improvement. If some base commit breaks some CI, I need to have a complete picture of the extent of the breakage as quickly as possible.

If a workflow run fails, all other workflows should continue.
The concurrency groups only cause existing workflow runs to be cancelled when the workflows are re-triggered with the same group (e.g. if a new commit is pushed to the branch or pull request)

@botovq botovq merged commit 419b26d into libressl:master Dec 19, 2023
35 checks passed
@botovq
Copy link
Contributor

botovq commented Dec 26, 2023

Just wanted to say thanks for this change. It's pretty great for people like me who tend to push before they think hard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants