-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Merge all things in one workflow file, reducing duplication of CI code #17355
Conversation
This reverts commit bdf400c.
To be honest, I don't like this approach. While it reduces some code duplication the resulting file is massive and hard to navigate. Currently CI configuration neatly split allowing easier understanding and improvements. |
You are right. I'm not very convinced by this either, though I've read that's the way github workflows are supposed to work right now :( But yeah, I agree it does not look ideal. The fact is that I would like to have things dependent on one another and this seems the only way. To summarize, this is what I'm trying to achieve:
I want to first see how this works, we can then choose what to do. I won't push too hard for this, I understand it has some pros and cons. |
BTW, this approach should allow us to easily perform things like #16535 without having duplicate yaml code around. Of course, it would be ideal if we could split the big yaml in smaller ones and "include" them in one file, but this is still not possible in github ci :( |
looks ok, but why there are some cancelled jobs? |
They are not cancelled, they are skipped. IMO github should just not show those skipped jobs at all in the list, but apparently it is not possible at the moment... :( |
@thestr4ng3r @trufae are you ok with this change? Please take a look, otherwise lets merge it. |
Ok, conflicts solved. In particular, this would have been useful for recent PRs done by @trufae related to sdk.sh, ios, static fixes. |
As an example, you can see #17525 and https://github.com/radareorg/radare2/actions/runs/225017795 . The PR was named |
…f CI code (radareorg#17355)" This reverts commit dfde84d.
…f CI code (radareorg#17355)" This reverts commit dfde84d.
Reasons for this change
Whenever we want to test some new configuration, we may want to test it both on PRs and/or on the master branch. Moreover, some configurations may be tested only on releases. However, we also want to test some particular things on PRs with particular names. For example, the iOS package is built only on release, but if you are doing some changes related to that, you may want to test the iOS package built also in PR. The same is true for ASAN, static, osx, etc.
At the same time, when doing a release we want to ensure that all "regular" checks are performed and are green and after that performs additional operations (e.g. built iOS package, build windows installer, etc.)
Current state
Right now the only solution was to create multiple workflow files and duplicate the code needed to do the tests in both files. This may result in a lot of duplicated "devops" code, having the risk of testing things differently when on PR and when doing releases or commits on master branch.
Solution proposed in this PR
By merging everything in one single file we can avoid the duplication of the "devops" code and just choose when to run some particular jobs based on the kind of triggering event (e.g. some jobs may be run only on schedule, others only when doing a release, etc.). At the same time, it allows to create dependencies between jobs (e.g. the create-release can only run if all the various build and tests jobs on various configurations pass).
Possible issues of this PR