feat: implement cymon-lib — DSDL protocol, C++ device API, gtest suite, CI pipeline #4
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: CI | |
| on: | |
| push: | |
| branches: [main, "copilot/**"] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install tools | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y \ | |
| cmake ninja-build clang clang-format clang-tidy | |
| - name: Configure | |
| run: | | |
| cmake -B build -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCMAKE_CXX_COMPILER=clang++ \ | |
| -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
| - name: Build | |
| run: cmake --build build | |
| - name: Test | |
| run: ctest --test-dir build --output-on-failure | |
| - name: clang-format check | |
| run: | | |
| find include src tests -name "*.hpp" -o -name "*.cpp" | \ | |
| xargs clang-format --dry-run --Werror | |
| - name: clang-tidy | |
| run: | | |
| find src -name "*.cpp" | \ | |
| xargs clang-tidy -p build/ |