mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-08-11 12:51:24 +00:00
Run CIFuzz only for pull requests that touch the fuzzed code (#2521)
The fuzzers build httplib.h and the targets under test/fuzzing, so a pull request that touches neither has nothing for CIFuzz to exercise. Fuzzing is by far the longest job in CI: 600 seconds of fuzzing on top of building the OSS-Fuzz image, which came to 12m20s on a recent run while every other job finished within 5m7s. Filter the trigger by path rather than shortening fuzz-seconds. OSS-Fuzz recommends 600 seconds as a minimum, and the budget is divided among all of the project's fuzz targets, so with five targets a shorter run would leave each one well under two minutes. Skipping the job for documentation-only changes cuts the wait without giving up any fuzzing on the pull requests that do reach the parsers.
This commit is contained in:
12
.github/workflows/cifuzz.yaml
vendored
12
.github/workflows/cifuzz.yaml
vendored
@@ -1,6 +1,16 @@
|
||||
name: CIFuzz
|
||||
|
||||
on: [pull_request]
|
||||
# The fuzzers only build httplib.h and the targets under test/fuzzing, so a
|
||||
# pull request that touches neither has nothing for CIFuzz to exercise. Fuzzing
|
||||
# is by far the longest job in CI (10 minutes of fuzzing on top of building the
|
||||
# OSS-Fuzz image), and skipping it for documentation-only changes keeps the
|
||||
# full 600 seconds for the pull requests that do reach the parsers.
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'httplib.h'
|
||||
- 'test/fuzzing/**'
|
||||
- '.github/workflows/cifuzz.yaml'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
||||
|
||||
Reference in New Issue
Block a user