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

Change build rules to not double fire on PRs #2686

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

peterfpeterson
Copy link
Contributor

@peterfpeterson peterfpeterson commented Dec 12, 2023

Description

By reducing which pushes fire CI to only the default branch and version tags, PR builds will not get two versions of each build.

The documentation for being more specific on branches/tags for a push is here.

Refs #2378

How Has This Been Tested?

Look at builds on #2647 for comparison (36 builds). This does not have builds for push, only pull_request is present (18 builds).

Review Checklist (please remove items if they don't apply):

  • Code has been reviewed
  • Functionality has been tested
  • Windows installer (GH artifact) has been tested (installed and worked)
  • MacOSX installer (GH artifact) has been tested (installed and worked)
  • User documentation is available and complete (if required)
  • Developers documentation is available and complete (if required)
  • The introduced changes comply with SasView license (BSD 3-Clause)

By reducing which pushes fire CI to only the default branch and version
tags, PR builds will not get two versions of each build.
@krzywon
Copy link
Contributor

krzywon commented Dec 12, 2023

Thanks for the contribution, @peterfpeterson. I triggered the CI for you.

We have an outstanding issue related to this - Fixes #2378.

@peterfpeterson
Copy link
Contributor Author

Related to the issue mentioned, this change reduces what is run in the overall workflow. The individual tasks can be filtered down to run on particular triggers as well. When doing that, I recommend always including a workflow_call or workflow_dispatch on the item so they can be triggered by hand.

workflow_call:
pull_request:
push:
branches: [main]
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this trigger CI only for the pushes to 'main' branch only? Personally,I look at CI runs for any branch (without opening PR), however, this indeed may be a waste of resources

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct. If you add workflow_dispatch you can also press a button in "actions" to launch a build on any commit/branch/whatever.

Copy link
Contributor

@wpotrzebowski wpotrzebowski left a comment

Choose a reason for hiding this comment

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

I am fine with merging it as it is and then make adaptations to workflow if necessary

@butlerpd butlerpd added the Discuss At The Call Issues to be discussed at the fortnightly call label Dec 19, 2023
@butlerpd butlerpd merged commit 6c4f13e into SasView:main Dec 19, 2023
18 checks passed
@peterfpeterson peterfpeterson deleted the reduce_pr_builds branch December 19, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discuss At The Call Issues to be discussed at the fortnightly call
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants