mgeisler / textwrap

An efficient and powerful Rust library for word wrapping text.
MIT License
446 stars 44 forks source link

Add CIFuzz Github action #498

Closed DavidKorczynski closed 1 year ago

DavidKorczynski commented 1 year ago

Add CIFuzz workflow action to have fuzzers build and run on each PR. This is a service offered by OSS-Fuzz where Textwrap already runs. In the current PR the fuzzers gets build on a pull request and will run for 300 seconds.

I noticed the CI already builds and runs the fuzzers -- the benefit of CIFuzz it has a set of features that are useful e.g. only highlighting issues only if they are introduced by the given PR, using of OSS-Fuzz code corpus and more. Let me know what you think!

Signed-off-by: David Korczynski david@adalogics.com

mgeisler commented 1 year ago

Hey @DavidKorczynski, this sounds great! Do I understand correctly that this will run all of our fuzz targets? How do I enable new targets in the future?

DavidKorczynski commented 1 year ago

How do I enable new targets in the future?

The action relies on the build.sh script here: https://github.com/google/oss-fuzz/blob/master/projects/textwrap/build.sh

You can modify this script whenever you want! Do a PR on oss-fuzz and we'll merge it in. Another option is to make https://github.com/google/oss-fuzz/blob/master/projects/textwrap/build.sh call a script inside of this repo (it clones this repo anyways from the Dockerfile https://github.com/google/oss-fuzz/blob/master/projects/textwrap/Dockerfile), and, thus you can easily extend which fuzzers should be build

mgeisler commented 1 year ago

You can modify this script whenever you want! Do a PR on oss-fuzz and we'll merge it in.

Nice, thanks for explaining! I think this looks nice, so let's merge it. We can then remove the "Required" flag for the old GitHub actions and thus clean this up a bit.