Skip to content

fix(ci): wire fuzz subdirectory into the build graph#713

Merged
kcenon merged 1 commit into
developfrom
fix/ci-fuzz-wiring
Jun 23, 2026
Merged

fix(ci): wire fuzz subdirectory into the build graph#713
kcenon merged 1 commit into
developfrom
fix/ci-fuzz-wiring

Conversation

@kcenon

@kcenon kcenon commented Jun 23, 2026

Copy link
Copy Markdown
Owner

What

Wire the fuzz/ subdirectory into the build graph so the Fuzzing
workflow can build result_error_fuzzer, and fix two stale CMake option
spellings in the workflow.

Change type: fix(ci) — build wiring + workflow config.

Why

The Fuzzing scheduled workflow failed on its first (and only) run
(2026-06-22) at the Build step with ninja: error: unknown target 'result_error_fuzzer'.

Root cause: the fuzz infrastructure (fuzz/CMakeLists.txt, fuzzing.yml)
landed in the v1.0.0 release (#696) without root build wiring. The root
CMake never declared BUILD_FUZZERS nor called add_subdirectory(fuzz), so
-DBUILD_FUZZERS=ON was an unused variable, fuzz/CMakeLists.txt's
if(NOT BUILD_FUZZERS) return() guard was never reached, and the target was
never created.

Where

File Change
cmake/common-extras.cmake Declare option(BUILD_FUZZERS ... OFF) and add_subdirectory(fuzz) (EXISTS-guarded), matching the examples/benchmarks opt-in pattern
.github/workflows/fuzzing.yml COMMON_SYSTEM_BUILD_TESTS/EXAMPLES -> COMMON_BUILD_TESTS/EXAMPLES (real option names)

How (verification)

  • The default build path is unaffected: BUILD_FUZZERS defaults OFF and is
    EXISTS-guarded, so add_subdirectory(fuzz) runs only when explicitly
    enabled with a Clang toolchain.
  • Verified by dispatching the Fuzzing workflow on this branch
    (gh workflow run, short max_total_time): Configure no longer warns
    about an unused BUILD_FUZZERS, Build produces result_error_fuzzer, and
    Run executes the fuzzer.

Relates to #639 (v1.0 readiness — restores CI green precondition).

The Fuzzing workflow configured with -DBUILD_FUZZERS=ON, but the root build
never declared BUILD_FUZZERS nor added the fuzz/ subdirectory, so CMake
ignored the flag ("Manually-specified variables were not used") and the
fuzz/CMakeLists.txt early-return guard was never reached. The
result_error_fuzzer target was therefore absent and
'cmake --build --target result_error_fuzzer' failed with
"ninja: error: unknown target". The fuzz infrastructure entered main in the
v1.0.0 release (#696) without root build wiring.

Declare BUILD_FUZZERS (OFF by default, EXISTS-guarded) and add the fuzz
subdirectory in common-extras.cmake, matching the examples/benchmarks
opt-in pattern. The default build, tests, examples, and benchmarks are
unaffected. Also correct the workflow's stale option spellings
(COMMON_SYSTEM_BUILD_TESTS/EXAMPLES -> COMMON_BUILD_TESTS/EXAMPLES) so the
fuzz configure actually disables tests and examples.
@kcenon kcenon merged commit 96f67e9 into develop Jun 23, 2026
20 checks passed
@kcenon kcenon deleted the fix/ci-fuzz-wiring branch June 23, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant