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

Use 'concurrency' in GitHub workflows #3610

Merged
merged 1 commit into from
Jul 28, 2022

Conversation

falbrechtskirchinger
Copy link
Contributor

Use concurrency in GitHub workflows to cancel in-progress or pending runs for the same ref.

This automatically cancels builds if a newer commit is pushed to a branch or pull request.

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


Similar settings exist for AppVeyor and Drone CI but cannot be enabled from the configuration file.

AppVeyor

AppVeyor calls this feature Rolling builds. It can be enabled in the general project settings:
appveyor_rolling_builds

Drone CI

Drone CI has 3 CLI settings that control this functionality:

drone repo update nlohmann/json --auto-cancel-pull-requests=true --auto-cancel-pushes=true --auto-cancel-running=true

https://docs.drone.io/cli/repo/drone-repo-update/

Use concurrency in GitHub workflows to cancel in-progress or pending
runs for the same ref.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling f33192c on falbrechtskirchinger:ci-concurrency into 2d48a4d on nlohmann:develop.

@falbrechtskirchinger
Copy link
Contributor Author

And this is what happens when workflow jobs are running or pending and new jobs with the same concurrency group are queued up:

concurrency_canceled

Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nlohmann
Copy link
Owner

  • Configured AppVeyor
  • Configured Drone CI

@nlohmann nlohmann self-assigned this Jul 28, 2022
@nlohmann nlohmann added this to the Release 3.11.0 milestone Jul 28, 2022
@nlohmann nlohmann merged commit 298e4a9 into nlohmann:develop Jul 28, 2022
@falbrechtskirchinger falbrechtskirchinger deleted the ci-concurrency branch July 28, 2022 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants