-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (32 loc) · 981 Bytes
/
cppcheck.yaml
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
29
30
31
32
33
34
35
36
37
38
39
on:
push:
branches:
- master
pull_request:
branches:
- master
name: cppcheck
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1
- name: Add PPA
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update -q
- name: Install gcc
run: |
sudo apt-get install gcc-9 -qy
sudo apt-get install g++-9 -qy
- name: Install cppcheck
run: |
wget https://github.com/danmar/cppcheck/archive/2.1.tar.gz -P /tmp/
tar -xvf /tmp/2.1.tar.gz -C /tmp/
sudo make --directory=/tmp/cppcheck-2.1 install SRCDIR=build MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" || true
- name: Run cppcheck
env:
TOKEN: ${{ secrets.TOKEN }}
run: make cppcheck