Skip to content

Tidy / cppcheck

Tidy / cppcheck #55

Workflow file for this run

# SPDX-FileCopyrightText: 2025 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
#
# SPDX-License-Identifier: MIT
name: Tidy / cppcheck
on:
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
config:
- name: clang-tidy
preset: clang-tidy
apt_pgks:
- cppcheck
steps:
- name: Install ninja-build tool
uses: turtlesec-no/get-ninja@main
- name: Install dependencies on Ubuntu (${{ join(matrix.config.apt_pgks, ' ') }})
if: ${{ runner.os == 'Linux' && matrix.config.apt_pgks }}
run: |
sudo apt update -qq
echo ${{ join(matrix.config.apt_pgks, ' ') }} | xargs sudo apt install -y
- uses: actions/checkout@v4
- name: Configure project
run: cmake --preset=${{ matrix.config.preset }}
- name: Build Project
id: ctest
run: cmake --build --preset=${{ matrix.config.preset }}
- name: Run cppcheck
if: ${{ matrix.config.preset == 'clang-tidy' }}
run: cmake --build --preset=${{ matrix.config.preset }} --target cppcheck