-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
gh-128446: Skip Windows CI for configure/Makefile changes #128450
base: main
Are you sure you want to change the base?
Conversation
Looks good. Can you add a bogus to-be-reverted-before-merge change to the *nix build system and verify that the Windows CI does not run? |
Modified the logic to use two conditions: First check if there ARE configure/Makefile files (grep -qE) Then check if there are NO other files (! grep -qvE) Only skip Windows CI when BOTH conditions are true (only configure-related files changed) This way, Windows CI will be skipped only when ALL changed files are configure/Makefile related, and will run if there are any other changes
Let's put this into draft while you test out the change. Mark it as ready for review when you've got it working. |
Please check here, Windows build is skipped https://github.com/python/cpython/actions/runs/12633496189?pr=128450 |
The changes that are required to skip the windows build are reverted from here e3c15ca |
@erlend-aasland done 👍 |
@@ -111,6 +116,18 @@ jobs: | |||
echo "Branch too old for CIFuzz tests; or no C files were changed" | |||
echo "run-cifuzz=false" >> "$GITHUB_OUTPUT" | |||
fi | |||
|
|||
CHANGED_FILES=$(git diff --name-only "origin/$GITHUB_BASE_REF..") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed this branch to my fork's main
and it failed:
main
Run hypothesis tests
Branch too old for CIFuzz tests; or no C files were changed
fatal: ambiguous argument 'origin/..': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Error: Process completed with exit code 128.
https://github.com/hugovk/cpython/actions/runs/12670020811/job/35308768214
Here's an older push that passed:
main
Run hypothesis tests
Branch too old for CIFuzz tests; or no C files were changed
https://github.com/hugovk/cpython/actions/runs/12382188860/job/34562372543
I think you need to check if [ "$GITHUB_BASE_REF" = "main" ]
before doing this git diff
. Compare the previous block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in d1f1d61
Hmm, one thing I noticed, if I want to run the CI on my branch in my fork before opening a PR (for example, by prefixing the branch with https://github.com/hugovk/cpython/actions/runs/12698006947 I would much prefer to still be able to test Windows on the CI on my fork because I develop on macOS and often things are different on Windows, and I'd like to make sure they're working before opening a PR. Can we retain this behaviour? |
This also skips Windows because a push to a fork isn't a PR: https://github.com/hugovk/cpython/actions/runs/13012655642 |
I think it is a good idea to change the default to |
… contains only changes to Configure or Makefile files
configure
/Makefile
changes #128446