Context
Surfaced by #550 (forbid-advisory-warnings).
When make benchmark.native removed its ::warning:: suppression, CI failed with:
Error: Build directory not found
Run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -G Ninja .. && ninja
make[1]: *** [Makefile:171: benchmark] Error 1
Root cause
scripts/run_benchmarks.sh defaulted BUILD_DIR to $PROJECT_ROOT/build/release/bin, but the Makefile produces binaries at $(BUILD_DIR)/$(BUILD_SUBDIR) which expands to build/x86.release/ (BUILD_DIR=build, BUILD_SUBDIR=x86, suffixed with .release from CMAKE_BUILD_TYPE).
The script's path never existed. Under the prior if ! make benchmark.native; then echo "::warning::..."; fi invocation, the failure was swallowed and benchmarks were never actually exercised in CI.
Short-term fix (in #550)
Pointed the script's default BUILD_DIR at build/x86.release and let callers override BUILD_DIR or BUILD_SUBDIR.
Follow-up to consider
- Have the Makefile
benchmark target export BUILD_DIR and BUILD_SUBDIR to the subshell so there is no second source of truth.
- Add a CI assertion that at least N benchmark binaries actually ran (the script today silently
continues past any missing binary and only fails when ALL are missing — a partial regression could go unnoticed).
- Reconcile
benchmarks/README.md (which documents ./build/hierarchy_benchmarks) with the actual output path.
Acceptance
Linked: #550
Context
Surfaced by #550 (forbid-advisory-warnings).
When
make benchmark.nativeremoved its::warning::suppression, CI failed with:Root cause
scripts/run_benchmarks.shdefaultedBUILD_DIRto$PROJECT_ROOT/build/release/bin, but the Makefile produces binaries at$(BUILD_DIR)/$(BUILD_SUBDIR)which expands tobuild/x86.release/(BUILD_DIR=build, BUILD_SUBDIR=x86, suffixed with.releasefrom CMAKE_BUILD_TYPE).The script's path never existed. Under the prior
if ! make benchmark.native; then echo "::warning::..."; fiinvocation, the failure was swallowed and benchmarks were never actually exercised in CI.Short-term fix (in #550)
Pointed the script's default
BUILD_DIRatbuild/x86.releaseand let callers overrideBUILD_DIRorBUILD_SUBDIR.Follow-up to consider
benchmarktarget exportBUILD_DIRandBUILD_SUBDIRto the subshell so there is no second source of truth.continues past any missing binary and only fails when ALL are missing — a partial regression could go unnoticed).benchmarks/README.md(which documents./build/hierarchy_benchmarks) with the actual output path.Acceptance
benchmarks/README.mdreflect the real path.Linked: #550