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

[ci] Allow skipping builds with [skip build] #64282

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asmaloney
Copy link
Contributor

@asmaloney asmaloney commented Aug 11, 2022

When working with the XML doc files, we don't need to build everything with every PR (as discussed with @YuriSizov in #64164).

With this change, adding the text [skip build] to a commit message will skip the builds and just run the static checks. (You should see the results with the GitHub actions on this PR -- hmmm I know there are issues trying to change CI Actions with PRs - here's my actions on this commit).

This will save a lot of time working on the docs and also stop a lot of extra builds. No more waiting for a macOS instance to become available!

When working with the doc files, we don't need to build everything with every PR.
@asmaloney asmaloney requested a review from a team as a code owner August 11, 2022 16:05
@YuriSizov
Copy link
Contributor

YuriSizov commented Aug 11, 2022

I think our preferred approach would be to chain CI tasks in a way where cheapest and quickest tasks run first, and if they fail, the rest doesn't run at all. Because we have quite a few issues with CI clogging on low-capacity platforms (macOS) or on heavy builds.

Making docs-only builds makes sense, but I think we should automate it based on the files changed, not on a commit tag. We don't want contributors to skip important checks by accident or out of malicious intent.

cc @akien-mga

@asmaloney
Copy link
Contributor Author

asmaloney commented Aug 11, 2022

We don't want contributors to skip important checks by accident or out of malicious intent.

Sure, right now they can [skip ci] to skip it all though. Same problem. All PRs are reviewed, so the reviewer will see that the build has been skipped.

Adding checks for specific changes is also possible, of course, but IMHO it will add complexity to the actions and the potential maintenance for it isn't worth it for this (niche) case. Happy to be wrong if there's now an easy way to do it.

I just want to stop building so much every single PR!

Edit: Example of how we might do it if only a specific folder changes. Ick 😬
Edit 2: A third-party action maybe?

@asmaloney
Copy link
Contributor Author

I think we should automate it based on the files changed, not on a commit tag

Just to revive this since it's still an issue, maybe another possibility is to use paths-ignore (docs) in the workflows?

on:
  push:
    paths-ignore:
      - 'docs/**'

When all the path names match patterns in paths-ignore, the workflow will not run. If any path names do not match patterns in paths-ignore, even if some path names match the patterns, the workflow will run.

If we can enumerate the paths/files that should not trigger a build this might be a good solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants