Trigger workflows more selectively #355
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm trying to make our workflow triggering smarter. For example, when we're making doc changes, we're still triggering Mac and CUDA wheels, and those jobs take a long time and we just ignore them anyway. I'm less concerned about wasting resources, and more concerned about making sure we see important signals. All workflows have a self reference. In addition to that, my reasoning on why triggering what when:
build_ffmpeg.yaml
Only triggered when the script itself is updated. The script has no dependence on our code.
cpp_tests.yaml
Triggered when anything under
src/torchcodec/*ortest/*is changed. That means Python only changes will also trigger these tests, but I think trying to differentiate at that level is going to be too subtle and error prone. Doc changes do not trigger the C++ tests.docs.yaml
Triggered when anything under
src/torchcodec/*ordocs/*is changed. Our source code has docs, and obviously we build the docs when docs files change. Notably we don't need to trigger the docs when tests change.linux_wheel.yaml, linux_cuda_wheel.yaml, macos_wheel.yaml
All are triggered when anything under
src/torchcodec/*,test/*orpackaging/*is changed. These are our main test drivers, so we want these to run when all source code, tests or packaging scripts change. Doc changes do not need to trigger wheel builds and tests.reference_resources.yaml
Only triggered when the script itself is updated. The script has no dependence on our code.