ci: build and run minimal fuzzers in GitHub CI
commitc4a9cf1df38439ff40b8d64d8982a9cdcd345396
authorJosh Steadmon <steadmon@google.com>
Fri, 19 Jan 2024 21:38:13 +0000 (19 13:38 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Jan 2024 22:29:25 +0000 (19 14:29 -0800)
tree61db9e4b1f2435ca9e39037a8b2752df07dd5f4a
parent8b9a42bf48abcead132b87834d19199a1b08373c
ci: build and run minimal fuzzers in GitHub CI

To prevent bitrot, we would like to regularly exercise the fuzz tests in
order to make sure they still link & run properly. We already compile
the fuzz test objects as part of the default `make` target, but we do
not link the executables due to the fuzz tests needing specific
compilers and compiler features. This has lead to frequent build
breakages for the fuzz tests.

To remedy this, we can add a CI step to actually link the fuzz
executables, and run them (with finite input rather than the default
infinite random input mode) to verify that they execute properly.

Since the main use of the fuzz tests is via OSS-Fuzz [1], and OSS-Fuzz
only runs tests on Linux [2], we only set up a CI test for the fuzzers
on Linux.

[1] https://github.com/google/oss-fuzz
[2] https://google.github.io/oss-fuzz/further-reading/fuzzer-environment/

Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.github/workflows/main.yml
Makefile
ci/run-build-and-minimal-fuzzers.sh [new file with mode: 0755]