Skip to content

Fix the Makefile workflow, test it in CI, and update infra - #284

Merged
steve-downey merged 7 commits into
bemanproject:mainfrom
steve-downey:fix-makefile-telemetry-include
Nov 24, 2026
Merged

steve-downey merged 7 commits into
bemanproject:mainfrom
steve-downey:fix-makefile-telemetry-include

Conversation

@steve-downey

@steve-downey steve-downey commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

The Makefile workflow has been broken since the infra/ re-import in a9116bf, and nothing in CI runs it. This fixes it, adds a CI job that does, and then moves infra/ to current upstream so we can drop our local fork of use-fetch-content.cmake.

Fixes

  • Makefile top-level include. The re-imported infra/ renamed bemancmakeinstrumentation.cmake to BuildTelemetry.cmake. The Makefile still named the old file, so configure failed with:
    CMake Error: CMAKE_PROJECT_TOP_LEVEL_INCLUDES file does not exist: infra/cmake/bemancmakeinstrumentation.cmake
    CMake Error at .build/build-system/_deps/googletest-src/CMakeLists.txt:6 (project):
      Language 'CXX' is currently being enabled.  Recursive call not allowed.
    
    The second error is a consequence of the first: CMake abandons the top-level project() partway through enabling CXX. The preset-based CI doesn't load the telemetry module, so it never saw this.
  • make coverage. etc/toolchain.cmake didn't set GCOV_EXECUTABLE, so the generated gcovr.cfg had an empty gcov-executable and gcovr failed. It now defaults to gcov, matching the versioned toolchains and the example project.
  • make lint. nodejs.org's release index now lists v27.0.0-alpha builds first. nodeenv 1.10.0 can't parse that, so pre-commit couldn't install markdownlint's node environment. Bumped to nodeenv 1.12.0.

New CI

.github/workflows/test_makefile.yml is ported from the example project's Makefile workflow test. It runs make venv, compile, test, coverage, lint, lint-manual, and testinstall with the system gcc-14.

The lint step first switches to a local branch. beman-tidy reads the active branch name and fails with "An error occurred while getting repository information" on the detached HEAD that actions/checkout produces for PRs.

infra update

  • Updated infra/ from 53a1500 to bemanproject/infra@a943c4a using beman-submodule (which now lives in bemanproject/beman-submodule and is on PyPI).
  • Upstream's use-fetch-content.cmake no longer uses exemplar names, so the local cmake/use-fetch-content.cmake is removed. The Makefile, README, and the no-GTest warning now use infra/cmake/use-fetch-content.cmake, which CMakePresets.json already used.
  • The local copy hard-coded INSTALL_GTEST OFF. That now goes through the lockfile's cmake_args.

To check

  • Behavior change: the lockfile override variable is now BEMAN_LOCKFILE instead of BEMAN_OPTIONAL_LOCKFILE.
  • Locally: Makefile compile, test, coverage, testinstall, and lint pass, and so does cmake --workflow --preset gcc-debug.
  • Locally, beman-tidy also scans the gitignored .install/, so make lint fails after make install. The workflow runs lint before testinstall, so CI is not affected.

The infra/ re-import in a9116bf renamed
infra/cmake/bemancmakeinstrumentation.cmake to BuildTelemetry.cmake, but
the Makefile still named the old file. CMake reports the missing file,
abandons the top-level project() part way through enabling CXX, and the
googletest project() call then fails with "Language 'CXX' is currently
being enabled. Recursive call not allowed."

CI configures through CMakePresets.json, which does not load the
telemetry module, so only the Makefile workflow was broken.
etc/toolchain.cmake did not set GCOV_EXECUTABLE, so gcovr.cfg was
generated with an empty gcov-executable and `make coverage` failed in
gcovr trying to execute '--help'. The versioned gcc and clang toolchains
already set it; use plain gcov for the system compiler, matching the
example project.
The nodejs.org release index now lists v27.0.0-alpha builds first, and
nodeenv 1.10.0 fails to parse that version when pre-commit installs a
node environment for markdownlint. 1.12.0 handles it.
The Makefile is the local developer entry point but nothing in CI ran
it, so a broken top-level include went unnoticed. Port the Makefile
workflow test from the example project: venv, compile, test, coverage,
lint, manual lint, and testinstall with the system gcc-14 toolchain.
beman-tidy reads the active branch name and errors out with "An error
occurred while getting repository information" on the detached HEAD
that actions/checkout produces for pull requests.
Updated with beman-submodule. Picks up the de-exemplar'd
use-fetch-content.cmake (BEMAN_LOCKFILE, Beman_* names), lockfile
cmake_args support, telemetry fixes, the xfail-compile helpers, and the
experimental import std boilerplate.
Upstream infra's use-fetch-content.cmake no longer carries exemplar
names, so drop the local cmake/use-fetch-content.cmake fork and point
the Makefile, README, and the no-GTest warning at the infra copy, which
CMakePresets.json already used.

The local copy hard-coded INSTALL_GTEST OFF; express that through the
lockfile's cmake_args instead. The lockfile override variable is now
BEMAN_LOCKFILE rather than BEMAN_OPTIONAL_LOCKFILE.
@steve-downey steve-downey changed the title Fix the Makefile workflow and test it in CI Fix the Makefile workflow, test it in CI, and update infra Nov 24, 2026
@steve-downey
steve-downey merged commit a3cfc75 into bemanproject:main Nov 24, 2026
80 checks passed
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