File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -82,11 +82,15 @@ jobs:
82
82
# CPython, so CIFuzz should be run only for code that is likely to be
83
83
# merged into the main branch; compatibility with older branches may
84
84
# be broken.
85
- if [ "$GITHUB_BASE_REF" = "main" ]; then
85
+ FUZZ_RELEVANT_FILES='(\.c$|\.h$|\.cpp$|^configure$|^\.github/workflows/build\.yml$|^Modules/_xxtestfuzz)'
86
+ if [ "$GITHUB_BASE_REF" = "main" ] && [ "$(git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qE $FUZZ_RELEVANT_FILES; echo $?)" ]; then
86
87
# The tests are pretty slow so they are executed only for PRs
87
88
# changing relevant files.
88
- FUZZ_RELEVANT_FILES='(\.c$|\.h$|\.cpp$|^configure$|^\.github/workflows/build\.yml$|^Modules/_xxtestfuzz)'
89
- git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE $FUZZ_RELEVANT_FILES && echo "run_cifuzz=true" >> $GITHUB_OUTPUT || true
89
+ echo "Run CIFuzz tests"
90
+ echo "run_cifuzz=true" >> $GITHUB_OUTPUT
91
+ else
92
+ echo "Branch too old for CIFuzz tests; or no C files were changed"
93
+ echo "run_cifuzz=false" >> $GITHUB_OUTPUT
90
94
fi
91
95
- name : Compute hash for config cache key
92
96
id : config_hash
You can’t perform that action at this time.
0 commit comments