-
Notifications
You must be signed in to change notification settings - Fork 415
[CI] Changed the Workflow Triggers #2589
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,24 @@ | ||
name: Test | ||
|
||
on: | ||
# We want to run the CI when anything is pushed to master. | ||
# Since master is a protected branch this only happens when a PR is merged. | ||
# This is a double check in case the PR was stale and had some issues. | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' # daily | ||
|
||
# We want to cancel previous runs for a given PR or branch / ref if another CI | ||
# run is requested. | ||
# See: https://docs.github.com/en/actions/using-jobs/using-concurrency | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @AlexandreSinger This cancels previous CI runs for the master branch. I think we should avoid canceling these runs on master because we don't push to master as often, and multiple pushes are usually from multiple PRs merged in a short time. If something goes wrong, having CI results for each push to the master branch helps us pinpoint issues more easily. What do you think about this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually did this on purpose since it is a common scenario that we would merge 3-4 PRs at one time. This causes a storm of traffic on the CI when this occurs which can cause problems. Above this section, I specifically allowed the main branch to trigger the CI on push since, I agree, that the main branch should test on merge. I personally just find running the CI on every PR merge a bit much. If we decide to allow the CI to trigger on every push to main (and run concurrently), this resource discusses how to do that: https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-on-specific-branches Its very simple to do; but I am just trying to prevent too much traffic from hitting the CI when things get merged in. We can discuss in the group meeting. |
||
|
||
env: | ||
# default compiler for all non-compatibility tests | ||
MATRIX_EVAL: "CC=gcc-11 && CXX=g++-11" | ||
|
Uh oh!
There was an error while loading. Please reload this page.