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: apply concurrency limit for github workflows #6243

Conversation

mscheong01
Copy link
Collaborator

@mscheong01 mscheong01 commented Mar 22, 2024

Right now, if we push multiple commits, all our CI workflows pile up in the queue, causing a bit of a jam. We can cut down on this by setting up a concurrency limit. This way, any new workflow that hits the same branch will cancel the previous ones still in queue. But, if we don't want this to happen with our master branch workflows, we can make an exception. Here's how we could set it up:

concurrency: 
  group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.inputs.sha }}
  cancel-in-progress: true

This setup checks if the workflow is targeting the master branch. If it is, it assigns a unique group name to avoid cancellation. Otherwise, it groups workflows by their name and the branch they're targeting, cancelling any in-progress ones when a new one starts. Let me know if this adjustment is required.

more info: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency

@phymbert
Copy link
Collaborator

@ggerganov This is a must have, it's almost impossible to merge something during EMEA business hours 😅

@ggerganov ggerganov merged commit ee804f6 into ggerganov:master Mar 22, 2024
25 checks passed
hodlen pushed a commit to hodlen/llama.cpp that referenced this pull request Apr 1, 2024
hodlen pushed a commit to hodlen/llama.cpp that referenced this pull request Apr 3, 2024
@phymbert
Copy link
Collaborator

phymbert commented Apr 4, 2024

Hi @mscheong01 @ggerganov, since we introduced this change, master builds are also cancelled every time we merge. I think we need to introduce an exception for the master branch. I believe every commit here should have a complete CI check.

@mscheong01 Can you please have a look ?

@mscheong01
Copy link
Collaborator Author

mscheong01 commented Apr 4, 2024

@phymbert
using this setting instead of the current one will exempt the master branch workflows from being cancelled:

concurrency: 
  group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.inputs.sha }}
  cancel-in-progress: true

I'll get this tested on my fork tomorrow just in case and open a PR.

@phymbert
Copy link
Collaborator

phymbert commented Apr 4, 2024

Thanks, would you please mind to open a PR ?

@mscheong01
Copy link
Collaborator Author

@phymbert I've tested this on my fork and opened a new PR #6486 😄

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.

None yet

3 participants