add workflow
Some checks failed
CI Pipeline / Lint (push) Failing after 1m46s
CI Pipeline / Test (push) Has been skipped
CI Pipeline / Build (push) Has been skipped

This commit is contained in:
asaky
2026-05-16 19:15:18 +03:00
parent 44b0694e9d
commit a0e2003e01

51
.gitea/workflows/ci.yml Normal file
View File

@@ -0,0 +1,51 @@
name: CI Pipeline
on:
push:
branches:
- main
- master
- ci/setup
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cppcheck
run: sudo apt-get update && sudo apt-get install -y cppcheck
- name: Run cppcheck
run: cppcheck --enable=all src/ tests/ --error-exitcode=1
test:
name: Test
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: 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
runs-on: ubuntu-latest
needs: 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: |
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: calculator
path: build/test_calculator