TT#111150 Add github workflows for various code checkers

This adds support for running cppcheck, clang-analyzer, and running the
tests using various compiler sanitizers.

Change-Id: I931af6460c60bccd3d1429e84ef8653f907ecf38
coverity_scan
Guillem Jover 5 years ago
parent ee25d74dcb
commit 36deddce27

@ -0,0 +1,28 @@
name: Clang Analyze
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Get build dependencies
run: |
sudo apt-get install -qq -y --no-install-recommends clang-tools
sudo apt-get build-dep -qq -y .
- name: Analyze
run: |
scan-build -o clan-analyze/ make
- name: Store artifacts
uses: actions/upload-artifact@v2
with:
name: Clang Analyze results
path: clang-analyze/

@ -0,0 +1,19 @@
name: Cppcheck
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Get tool
run: sudo apt-get install -qq -y --no-install-recommends cppcheck
- name: Analyze
run: cppcheck --enable=all .

@ -0,0 +1,23 @@
name: Sanitizers
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
env:
FLAGS: -fsanitize=address -fsanitize=leak -fsanitize=undefined
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Get build dependencies
run: |
sudo apt-get build-dep -qq -y .
- name: Build with sanitizers enabled
run: |
make CFLAGS="$FLAGS" LDFLAGS="$FLAGS" test
Loading…
Cancel
Save