-
Notifications
You must be signed in to change notification settings - Fork 920
Prevent runs NVIDIA_CI in case triggered by PR in the fork #11905
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
Conversation
2925948
to
fbe476d
Compare
.github/workflows/ompi_nvidia.yaml
Outdated
needs: [deployment, build] | ||
runs-on: [self-hosted, linux, x64, nvidia] | ||
steps: | ||
- name: Running tests | ||
run: /start test | ||
clean: | ||
if: ${{ always() }} | ||
if: (github.repository == 'open-mpi/ompi') && always() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can get rid of the && always()
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, but I wasn't sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, but I wasn't sure
I am not an expert on Github actions, but a function named always()
seems to imply that it is always true, and when you've now got another condition in the expression, it feels like you don't need the always()
(i.e., you only need always()
if you have an expression with just a single condition). You might want to test this to be sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are examples of different behaviors with always() and without:
with always():
without always()
always() runs even when the job is canceled, but the condition is false w/o always()
So, clean job runs or doesn't
BTW it is the final version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. If the always()
is needed, then it is worth putting that in a comment, because that's not intuitive -- and we wouldn't want someone to remove the always()
at some point in the future because they think it's not relevant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
9b89348
to
e9691fa
Compare
Signed-off-by: Andrii Bilokur <[email protected]>
Prevent runs NVIDIA_CI in case triggered by PR in the fork ( checking repo name)
It looks like https://github.com/B-a-S/ompi/actions/runs/6087266827