-
Notifications
You must be signed in to change notification settings - Fork 1
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
Share the nobuild GitHub workflow via dev-tools #20
Conversation
Stubbing out workflows with replacement no-op workflows is the recommended way to skip required workflows for some file types but to require them for others. A major downside of sharing only some workflows like this is that file path inclusions / exclusions need to be synchronized across repositories which can't be done atomically. See 3rdparty/eventuals#176 and https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
@benh WDYT? I don't like how this is part is shared across repos:
For two reasons:
Reason 2 would be resolved by your suggestion in 3rdparty/eventuals#176 (comment) to share each platform's build and test workflows in dev-tools as well. A nice thing about centralizing this setup is it would be easier to make sure all of our repos have a continuous integration setup, which several (most?) repos currently lack: see discussion in 3rdparty/bazel-rules-curl#11 (comment) I'm not sure what would be involved in sharing build workflows across repos. They currently differ in what look like material ways (though maybe we can either re-implement this, or omit this run skipping?) (one vs other), but also in ways that look like bugs (this file references a "master" branch that doesn't exist). This makes me think that it's worth an effort to unify these if possible. But I don't know what blockers that might hit or how long that might take. |
Thanks for digging into this @CodingCanuck, it's a big and messy one though. In the past I have requested a unified (bazel) build action that we can use across the different (bazel) repos. I strongly belive that having a central repo with the actions and workflows is the only maintainable solution. In line with the discussion you refer to, I believe that this should address (2). In regards to your (1). Yes, it is a bit inconveneint that different repos use different branch names for the main branch, however I think it is at most 3, namely
pull_request:
branches:
- "main"
- "master"
- "reboot-main" or (if possible):
|
IIUC, to reuse the workflow you still have to have your own workflow file that calls the reused workflow, as shown here. So it seems like each of those workflow files can specify the It is interesting that the amount of code to call the reusable workflow in this case is almost the same as having the workflow copied everywhere. I suppose once we add the comments in |
Closing: we're abandoning this build-skipping approach. See 3rdparty/eventuals#309 and https://github.com/reboot-dev/respect/pull/294 and 3rdparty/stout#25 . |
Stubbing out workflows with replacement no-op workflows is the
recommended way to skip required workflows for some file types but to
require them for others.
A major downside of sharing only some workflows like this is that file
path inclusions / exclusions need to be synchronized across repositories
which can't be done atomically.
See 3rdparty/eventuals#176 and
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks