Developer Workflow

This page contains day-to-day commands. For environment setup, see Development Setup.

Update Repository

git pull --recurse-submodules
# If needed:
git submodule update --init --recursive

Build and Test

vcpkg preset:

cmake --preset vcpkg
cmake --build --preset vcpkg --parallel
ctest --test-dir build-vcpkg --output-on-failure

Notes:

  • On Windows, prefer vcpkg-windows-static-md for static libraries with dynamic MSVC runtime.

  • Tests are opt-in. Configure with -DBUILD_TESTING=ON and ensure GTest is available (for vcpkg: set VCPKG_MANIFEST_FEATURES=tests).

Format and Lint

Using hooks directly

$(git rev-parse --git-path hooks)/pre-commit
$(git rev-parse --git-path hooks)/pre-commit --run-tidy
$(git rev-parse --git-path hooks)/pre-commit --fix-format
$(git rev-parse --git-path hooks)/pre-commit --fix-tidy
$(git rev-parse --git-path hooks)/pre-commit --fix-python
$(git rev-parse --git-path hooks)/pre-commit --all-files --run-tidy --fix-format --fix-tidy
$(git rev-parse --git-path hooks)/pre-commit --all-files --skip-python
$(git rev-parse --git-path hooks)/pre-commit --skip-format
$(git rev-parse --git-path hooks)/pre-commit --skip-tidy

Notes:

  • clang-tidy is opt-in. Use --run-tidy (or --fix-tidy) to enable it.

  • It requires compile_commands.json. Generate it using the ninja preset (run from Developer Command Prompt on Windows):

    cmake --preset ninja
    

Commit

git commit -S -s -m "feat: short description"