Skip to content

Add CTest categories, shader & packaging validation, and GitHub Actions CI foundation - #8

Merged
ercmine merged 1 commit into
mainfrom
codex/establish-ci-and-testing-foundations
Apr 6, 2026
Merged

Add CTest categories, shader & packaging validation, and GitHub Actions CI foundation#8
ercmine merged 1 commit into
mainfrom
codex/establish-ci-and-testing-foundations

Conversation

@ercmine

@ercmine ercmine commented Apr 6, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Establish a professional, CMake-aligned test and CI foundation so every commit/PR runs unit tests, headless smoke validation, shader compilation checks, and packaging checks.
  • Provide clear blocking vs informational gates, fast local workflows that mirror CI, and reproducible dependency/bootstrap behavior for CI.
  • Make shader validation and package layout checks deterministic and visible in CI logs to speed triage.

Description

  • Register unit tests and a new headless smoke executable with CTest (labels: unit, headless) and add helper targets render_test_unit and render_test_headless for convenient local invocation via CMake/CTest.
  • Add shader validation targets and policy: render_shaders / render_shader_check, RENDER_REQUIRE_SHADER_COMPILATION toggle, auto-discovery of a built shaderc target, and shader compilation logging to out/build/<preset>/logs/shader_compilation.log.
  • Add packaging staging and validation via render_package_stage and render_package_validate, which verify expected binaries, shader outputs, and produce a portable archive (.tar.gz or .zip) while emitting out/build/<preset>/logs/package_validation.log for debugging.
  • Add CMake presets (linux-ci) and RENDER_BGFX_BUILD_TOOLS option to allow CI to build bgfx tools when required, and wire the validation targets into the top-level render_validate_all umbrella target.
  • Add cross-platform GitHub Actions workflows (.github/workflows/pr-validation.yml and main-validation.yml) with a pragmatic matrix (Linux full lane runs shader+packaging, macOS/Windows run build+unit+headless), dependency caching, and artifact upload for Linux lanes.
  • Ship developer tooling and docs: scripts/run_validations.sh / .ps1, docs/testing.md, docs/ci.md, and docs/build.md updates that map local commands to CI behavior.

Testing

  • Added automated test registrations (CTest) for existing unit suites and a new tests/headless/headless_validation.cpp smoke executable, but no CTest cases were executed in CI as part of this change yet.
  • Performed a local configure attempt with cmake --preset linux-debug -DRENDER_ALLOW_FETCHCONTENT=ON, which failed in this environment because FetchContent attempted to clone https://github.com/libsdl-org/SDL.git and the network fetch was blocked (CONNECT tunnel failed, response 403), so shader/tool bootstrapping and full configure did not complete.
  • The repository now includes the CMake/CTest targets and CI workflows required to run the following automated checks (once CI or networked bootstrap runs succeed): unit tests via ctest -L unit, headless smoke via ctest -L headless, shader compilation via cmake --build --target render_shader_check, and packaging validation via cmake --build --target render_package_validate.

Codex Task

@ercmine
ercmine merged commit f42b7b7 into main Apr 6, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant