Skip to content

feat: add c++ common code#24

Merged
ReenigneArcher merged 10 commits into
masterfrom
feat/add-c++-common-code
Jun 28, 2026
Merged

feat: add c++ common code#24
ReenigneArcher merged 10 commits into
masterfrom
feat/add-c++-common-code

Conversation

@ReenigneArcher

Copy link
Copy Markdown
Member

Description

  • Adds c++ common code for src and tests
  • Add doxyconfig/doxygen build using readthedocs

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Introduce a new CMake-based `lizardbyte::common` static library with cross-platform environment variable helpers (`get_env`, `set_env`, `append_env`, `unset_env`), packaging/export config, and install rules. Add C++ unit tests and wire them into CTest, then add a new multi-OS CMake job in CI to configure, build, test, and install the project. Update README and `.gitignore` to document and support the new C++ workflow.
Adds `third-party/googletest` as a new submodule and records its source URL in `.gitmodules`. The submodule is pinned to commit `52eb8108c5bdec04579160ae17225d66034bd723` for reproducible dependency state.
Registers `third-party/doxyconfig` in `.gitmodules` with the LizardByte `doxyconfig` repository on the `master` branch, and adds the submodule pointer at commit `e552f7c`.
Major improvements to the project's testing and CI/CD infrastructure:

- Convert C++ tests from custom runner to GoogleTest framework
- Add lizardbyte::test_support library with shared test fixtures (BaseTest, LinuxTest, MacOSTest, WindowsTest)
- Expand CI/CD pipeline to test multiple compilers (GCC, Clang) and platforms (Linux, macOS, Windows with MinGW and MSVC)
- Add OpenCppCoverage support for MSVC code coverage
- Add separate codecov job for aggregating and uploading coverage reports
- Add ReadTheDocs configuration and Doxygen documentation support
- Add get_env() string overload to env API
- Update documentation with GoogleTest support helpers and build instructions
Add a new `sonar-project.properties` file to define the repository Sonar project key and set `sonar.cfamily.reportingCppStandardOverride` to `c++17`, ensuring analysis aligns with the oldest C++ standard used across LizardByte projects.
@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (07382e5) to head (75423bb).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #24   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         3    +1     
  Lines          166       213   +47     
  Branches         0        12   +12     
=========================================
+ Hits           166       213   +47     
Flag Coverage Δ
Linux ?
Linux-Clang 87.50% <87.50%> (?)
Linux-GCC 100.00% <100.00%> (?)
Linux-python 100.00% <ø> (?)
Windows ?
Windows-MSVC 100.00% <100.00%> (?)
Windows-MinGW-UCRT64 100.00% <100.00%> (?)
Windows-python 100.00% <ø> (?)
macOS 87.50% <87.50%> (-12.50%) ⬇️
macOS-python 100.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/common/env.cpp 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 07382e5...75423bb. Read the comment docs.

Drop the `LB_CAT_VA_ARGS` and `LB_MAKE_TEST` macro helpers from the testing support header and remove the matching test case that exercised them.
@ReenigneArcher ReenigneArcher force-pushed the feat/add-c++-common-code branch from 31dd1b1 to 8dac6d6 Compare June 28, 2026 23:17
Update the Codecov flags for Python coverage and test uploads to use `RunnerOS-python`, separating them from other language reports.
@ReenigneArcher ReenigneArcher marked this pull request as ready for review June 28, 2026 23:24
@ReenigneArcher ReenigneArcher merged commit 4c05418 into master Jun 28, 2026
27 checks passed
@ReenigneArcher ReenigneArcher deleted the feat/add-c++-common-code branch June 28, 2026 23:51
@sonarqubecloud

Copy link
Copy Markdown

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