summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2023-10-10 06:44:57 (GMT)
committerGitHub <noreply@github.com>2023-10-10 06:44:57 (GMT)
commitdef7ea5cec41e8d3112641bb4af7572c0ac4f380 (patch)
tree221b515d4f6ffa156619f76f4f37314bb9aba3fb /.github
parent67e8d416cc5e14c181e4f883ffb4d87f2a647ae1 (diff)
downloadcpython-def7ea5cec41e8d3112641bb4af7572c0ac4f380.zip
cpython-def7ea5cec41e8d3112641bb4af7572c0ac4f380.tar.gz
cpython-def7ea5cec41e8d3112641bb4af7572c0ac4f380.tar.bz2
Fix CIFuzz build (#110576)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml10
1 files changed, 7 insertions, 3 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 277042d..848d13f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -82,11 +82,15 @@ jobs:
# CPython, so CIFuzz should be run only for code that is likely to be
# merged into the main branch; compatibility with older branches may
# be broken.
- if [ "$GITHUB_BASE_REF" = "main" ]; then
+ FUZZ_RELEVANT_FILES='(\.c$|\.h$|\.cpp$|^configure$|^\.github/workflows/build\.yml$|^Modules/_xxtestfuzz)'
+ if [ "$GITHUB_BASE_REF" = "main" ] && [ "$(git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qE $FUZZ_RELEVANT_FILES; echo $?)" ]; then
# The tests are pretty slow so they are executed only for PRs
# changing relevant files.
- FUZZ_RELEVANT_FILES='(\.c$|\.h$|\.cpp$|^configure$|^\.github/workflows/build\.yml$|^Modules/_xxtestfuzz)'
- git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE $FUZZ_RELEVANT_FILES && echo "run_cifuzz=true" >> $GITHUB_OUTPUT || true
+ echo "Run CIFuzz tests"
+ echo "run_cifuzz=true" >> $GITHUB_OUTPUT
+ else
+ echo "Branch too old for CIFuzz tests; or no C files were changed"
+ echo "run_cifuzz=false" >> $GITHUB_OUTPUT
fi
- name: Compute hash for config cache key
id: config_hash