57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
name: CI Pipeline
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
lint:
|
|
name: 1. 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 -I include/ --suppress=missingIncludeSystem src/ tests/ --error-exitcode=1
|
|
|
|
test:
|
|
name: 2. 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: 3. 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 Release
|
|
run: |
|
|
cmake -B build -DCMAKE_BUILD_TYPE=Release
|
|
cmake --build build |