From e08c4aeb614310103435cb972413289f9fbf0361 Mon Sep 17 00:00:00 2001 From: 21_SavchenkoAA <21_SavchenkoAA@iux.local> Date: Sat, 16 May 2026 20:25:52 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20.gitea/workflows/ci.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yml | 51 ++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 0a99591..f8a515d 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -3,50 +3,55 @@ name: CI Pipeline on: push: branches: - - main - - master - - ci/setup + - main # Запуск только при пуше в main jobs: lint: - name: Lint + name: 1. Lint (Static Analysis) runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install cppcheck - run: sudo apt-get update && sudo apt-get install -y cppcheck + run: | + sudo apt-get update + sudo apt-get install -y cppcheck + - name: Run cppcheck run: | - cppcheck --enable=all --inconclusive -I include/ --suppress=missingIncludeSystem src/ tests/ --error-exitcode=1 + cppcheck --enable=all -I include/ --suppress=missingIncludeSystem src/ tests/ --error-exitcode=1 test: - name: Test + name: 2. Test (Unit Tests) runs-on: ubuntu-latest - needs: lint + needs: lint # Запускается только если Lint прошел успешно steps: - uses: actions/checkout@v4 + - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y cmake build-essential - - name: Configure - run: cmake -B build - - name: Build - run: cmake --build build - - name: Run tests run: | - cd build - ctest --output-on-failure --verbose - ./test_calculator + sudo apt-get update + sudo apt-get install -y cmake build-essential + + - name: Build and Test + run: | + cmake -B build + cmake --build build + cd build && ctest --output-on-failure build: - name: Build + name: 3. Build (Release) runs-on: ubuntu-latest - needs: test + needs: test # Запускается только если Test прошел успешно steps: - uses: actions/checkout@v4 + - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y cmake build-essential - - name: Build + run: | + sudo apt-get update + sudo apt-get install -y cmake build-essential + + - name: Build Release run: | cmake -B build -DCMAKE_BUILD_TYPE=Release - cmake --build build - # Блок Upload artifact удален \ No newline at end of file + cmake --build build \ No newline at end of file