File: cppcheck.yml

package info (click to toggle)
cpr 1.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,452 kB
  • sloc: cpp: 14,315; ansic: 637; sh: 139; xml: 38; makefile: 16
file content (28 lines) | stat: -rw-r--r-- 1,173 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: "Test cppcheck"

on: [push, workflow_dispatch, pull_request] # Trigger for every push as well as for every pull request. Yes, this will run stuff twice in case we create a PR from inside this repo. I'm open for better solutions, where I do not have to specify each brach individually for the 'push' trigger.

jobs:
  cppcheck:
    runs-on: ubuntu-latest
    container: "fedora:latest" # Use fedora for an up to date version of cppcheck
    steps:
    - name: Checkout
      uses: actions/checkout@v3
    - name: Update package list
      run: dnf update -y
    - name: Install Dependencies
      run: dnf install -y gcc clang git gcc gdb make openssl-devel cmake libpsl-devel cppcheck meson
    - name: "[Release g++] Build"
      env:
        CPR_ENABLE_CPPCHECK: ON
        # Avoid parallel runs so only the resulting error file is not being written by multiple processes at the same time.
        CMAKE_BUILD_PARALLEL_LEVEL: 1
      uses: ashutoshvarma/action-cmake-build@master
      with:
        build-dir: ${{github.workspace}}/build
        source-dir: ${{github.workspace}}
        cc: gcc
        cxx: g++
        build-type: Release
        run-test: false