mirror of https://github.com/sipwise/libtcap.git
This adds support for running cppcheck, clang-analyzer, and running the tests using various compiler sanitizers. Change-Id: I931af6460c60bccd3d1429e84ef8653f907ecf38mr10.1.1
parent
8091ae9cdb
commit
deaba17691
@ -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 clang-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 -q --enable=all src
|
@ -0,0 +1,24 @@
|
||||
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: |
|
||||
CFLAGS="$FLAGS" LDFLAGS="$FLAGS" make test
|
Loading…
Reference in new issue