init commit

This commit is contained in:
SILCHENKO
2026-05-24 18:06:03 +03:00
commit 2cc6b72b6b
4 changed files with 64 additions and 0 deletions

36
.github/workflow/ci.yaml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: C++ CI/CD Pipeline
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 cppcheck build-essential
- name: Run Static Analysis (Cppcheck)
run: |
cppcheck --enable=all --language=c++ --error-exitcode=1 main.cpp test.cpp
# Флаг --error-exitcode=1 остановит пайплайн, если найдутся критические ошибки
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: Build Project
run: cmake --build build --config Release
- name: Run Tests (CTest)
run: |
cd build
ctest --output-on-failure