chore: Modernize CMake build, CI workflows, and code quality tooling #26
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: C++ CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| format-check: | |
| name: Format Check | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| - name: Check format | |
| run: | | |
| clang-format --version | |
| find src tests \( -name "*.hpp" -o -name "*.cpp" -o -name "*.h" \) | \ | |
| xargs clang-format --dry-run --Werror | |
| build-and-test: | |
| name: Build and Test | |
| runs-on: ubuntu-24.04 | |
| needs: format-check | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgtest-dev | |
| - name: Show tool versions | |
| run: | | |
| cmake --version | |
| g++ --version | |
| - name: Configure | |
| run: cmake --preset ci | |
| - name: Build | |
| run: cmake --build --preset ci | |
| - name: Test | |
| run: ctest --preset ci |