From 1d0100928e85349a121e57468779580b761db9a6 Mon Sep 17 00:00:00 2001 From: Michal Date: Mon, 11 May 2026 16:56:07 +0200 Subject: [PATCH] feat: add CI configuration file --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3a2732e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: C++ CI + +on: + push: + branches: [ "main", "master" ] + pull_request: + branches: [ "main", "master" ] + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y cmake clang-format clang-tidy + + - name: Check Code Formatting + run: | + find src include tests -type f \( -name "*.cpp" -o -name "*.hpp" -o -name "*.c" -o -name "*.h" \) | xargs clang-format --dry-run -Werror + + - name: Configure CMake + run: cmake -B build -DCMAKE_BUILD_TYPE=Release + + - name: Build + run: cmake --build build --config Release + + - name: Run Tests + working-directory: build + run: ctest --output-on-failure -C Release