Skip to content

Conversation

@lgritz
Copy link
Collaborator

@lgritz lgritz commented Jan 23, 2025

Quite often I find myself debugging code or CI specific to just one platform. It makes for much longer iteration for a huge CI job that reruns lots of tests that won't be affected by the changes I'm experimenting with. Sometime I make a commit that places if: 0 in strategic places to exclude irrelevant batches of tests. But this is a pain to add, and has to be removed again to re-enable the tests prior to turning the experiment into a proper PR.

This PR, then, adds some logic to ci.yml that lets me do the same just with special branch names, rather than needing to edit ci.yml. Any branch you push containing the substring "windows-only" will not run any Linux or MacOS CI tests. And the analogous behavior is added for "macos-only" and "linux-only".

This shouldn't affect any CI jobs in which people are not purposely using those special branch names. You should NOT use these special names for branches from which you submit PRs, since obviously we want every PR to validate on all CI combinations. But it is very helpful for topic branches on your own fork as you are developing and iterating over many CI runs but only need results from one platform.

Quite often I find myself debugging the CI for just one platform.  It
makes for much longer iteration for a huge CI job that reruns lots of
tests that won't be affected by the changes I'm experimenting with.
Sometime I make a commit that places `if: 0` in strategic places to
exclude irrelevant batches of tests. But this is a pain to add, and
has to be removed again to re-enable the tests prior to turning the
experiment into a proper PR.

This PR, then, adds a test that lets me do the same just with special
branch names, rather than editing ci.yml. Any branch you push
containing the substring "windows-only" will not run any Linux or
MacOS tests. And the analogous behavior is added for "macos-only" and
"linux-only".

This shouldn't affect any CI jobs in which people are not purposely
using those special branch names. You should NOT use these special
names for branches from which you submit PRs, since of course we want
every PR to validate on all CI combinations. But it is very helpful
for topic branches on your own fork as you are developing and
iterating over many CI runs.

Signed-off-by: Larry Gritz <[email protected]>
@EmilDohne
Copy link
Contributor

LGTM!

@lgritz lgritz merged commit d47da7b into AcademySoftwareFoundation:main Jan 26, 2025
27 checks passed
@lgritz lgritz deleted the lg-ciexclude branch January 26, 2025 20:14
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Jan 26, 2025
…ation#4604)

Quite often I find myself debugging code or CI specific to just one
platform. It makes for much longer iteration for a huge CI job that
reruns lots of tests that won't be affected by the changes I'm
experimenting with. Sometime I make a commit that places `if: 0` in
strategic places to exclude irrelevant batches of tests. But this is a
pain to add, and has to be removed again to re-enable the tests prior to
turning the experiment into a proper PR.

This PR, then, adds some logic to ci.yml that lets me do the same just
with special branch names, rather than needing to edit ci.yml. Any
branch you push containing the substring "windows-only" will not run any
Linux or MacOS CI tests. And the analogous behavior is added for
"macos-only" and "linux-only".

This shouldn't affect any CI jobs in which people are not purposely
using those special branch names. You should NOT use these special names
for branches from which you submit PRs, since obviously we want every PR
to validate on all CI combinations. But it is very helpful for topic
branches on your own fork as you are developing and iterating over many
CI runs but only need results from one platform.

Signed-off-by: Larry Gritz <[email protected]>
scott-wilson pushed a commit to scott-wilson/OpenImageIO that referenced this pull request May 18, 2025
…ation#4604)

Quite often I find myself debugging code or CI specific to just one
platform. It makes for much longer iteration for a huge CI job that
reruns lots of tests that won't be affected by the changes I'm
experimenting with. Sometime I make a commit that places `if: 0` in
strategic places to exclude irrelevant batches of tests. But this is a
pain to add, and has to be removed again to re-enable the tests prior to
turning the experiment into a proper PR.

This PR, then, adds some logic to ci.yml that lets me do the same just
with special branch names, rather than needing to edit ci.yml. Any
branch you push containing the substring "windows-only" will not run any
Linux or MacOS CI tests. And the analogous behavior is added for
"macos-only" and "linux-only".

This shouldn't affect any CI jobs in which people are not purposely
using those special branch names. You should NOT use these special names
for branches from which you submit PRs, since obviously we want every PR
to validate on all CI combinations. But it is very helpful for topic
branches on your own fork as you are developing and iterating over many
CI runs but only need results from one platform.

Signed-off-by: Larry Gritz <[email protected]>
Signed-off-by: Scott Wilson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants