8000 gh-107652: Set up CIFuzz to run fuzz targets continuously by illia-v · Pull Request #107653 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-107652: Set up CIFuzz to run fuzz targets continuously #107653

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

Merged
merged 8 commits into from
Oct 9, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change the condition for running CIFuzz
  • Loading branch information
illia-v committed Aug 6, 2023
commit ccae802cbecb7295b45f0d7e9f2b440c4461bb26
18 changes: 13 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
run-docs: ${{ steps.docs-changes.outputs.run-docs || false }}
run_tests: ${{ steps.check.outputs.run_tests }}
run_hypothesis: ${{ steps.check.outputs.run_hypothesis }}
run_cifuzz: ${{ steps.check.outputs.run_cifuzz }}
config_hash: ${{ steps.config_hash.outputs.hash }}
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -76,6 +77,17 @@ jobs:
echo "Run hypothesis tests"
echo "run_hypothesis=true" >> $GITHUB_OUTPUT
fi

# oss-fuzz maintains a configuration for fuzzing the main branch of
# 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
# 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
fi
- name: Compute hash for config cache key
id: config_hash
run: |
Expand Down Expand Up @@ -526,11 +538,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
needs: check_source
# oss-fuzz maintains a configuration for fuzzing the main branch of
# CPython, so the tests should be run only for code that has been or is
# likely to be merged into the main branch.
# Compatibility with older branches may be broken.
if: (github.ref_name == 'main' || github.base_ref == 'main') && needs.check_source.outputs.run_t 4B59 ests == 'true'
if: needs.check_source.outputs.run_cifuzz == 'true'
permissions:
security-events: write
strategy:
Expand Down
0