-
Notifications
You must be signed in to change notification settings - Fork 8
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
Build by strategy #940
Build by strategy #940
Conversation
ff65f84
to
9a2136b
Compare
@@ -30,6 +38,7 @@ jobs: | |||
container: fedora:39 | |||
steps: | |||
- name: Setup Copr config file | |||
if: github.event_name != 'workflow_dispatch' || (inputs.strategy == matrix.name) |
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.
Can this be done in a way that doesn't require repeating the condition everywhere? Can the matrix itself be made conditional?
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.
@nikic I wish it was possible but so far I haven't found a way: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#matrix-context
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.
It actually is configurable. I think one needs to pass in a payload for the matrix and remember that I have done it before. Give some time.
@nikic I've implemented a dynamic matrix and tested it in some other repo. |
|
||
jobs: | ||
job1: |
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.
job1 -> generate-matrix or something?
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.
Addressed in 25a16dd
) | ||
|
||
if [[ '${{ inputs.strategy }}' == 'big-merge' ]]; then | ||
NAMES='["big-merge"]' |
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.
Per https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow#example-adding-configurations I think just includes would be enough and we don't need to enumerate names separately?
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.
Addressed in 25a16dd
@nikic ready for another review? |
This adds a workflow option to select which build-strategy to build for (e.g. big-merge or pgo at the moment.)