2020-09-05 18:29:19 +02:00
|
|
|
# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
|
|
|
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
|
|
|
|
name: address sanitizer
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
2020-12-15 10:59:09 +01:00
|
|
|
runs-on: ubuntu-20.04
|
2020-09-05 18:29:19 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install missing software on ubuntu
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2020-12-01 18:02:13 +01:00
|
|
|
sudo apt-get install libz3-4 libz3-dev
|
2020-09-05 18:29:19 +02:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
2021-02-21 14:17:02 +01:00
|
|
|
CC=clang CXX=clang++ CXXFLAGS="-fsanitize=address -O1 -g3 -DCPPCHK_GLIBCXX_DEBUG" CPPFLAGS="-DCHECK_INTERNAL" make -j$(nproc) cppcheck testrunner USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes VERIFY=1
|
2020-09-05 18:29:19 +02:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
2020-12-01 18:02:13 +01:00
|
|
|
ASAN_OPTIONS=detect_stack_use_after_return=1 ./testrunner
|
2020-09-05 18:29:19 +02:00
|
|
|
|
2021-02-20 13:34:57 +01:00
|
|
|
- name: Self check
|
|
|
|
run: |
|
|
|
|
ASAN_OPTIONS=detect_stack_use_after_return=1 ./cppcheck -q -j$(nproc) --template=selfcheck -D__CPPCHECK__ --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ -Icli --inconclusive --enable=style,performance,portability,warning,internal --exception-handling --debug-warnings cli lib
|
|
|
|
ASAN_OPTIONS=detect_stack_use_after_return=1 ./cppcheck -q -j$(nproc) --template=selfcheck -D__CPPCHECK__ -DQT_VERSION=0x050000 --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=qt -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ --enable=style,performance,portability,warning,internal --exception-handling --debug-warnings gui/*.cpp
|
|
|
|
ASAN_OPTIONS=detect_stack_use_after_return=1 ./cppcheck -q -j$(nproc) --template=selfcheck -D__CPPCHECK__ --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=cppcheck-lib -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ -Icli -Igui --inconclusive --enable=style,performance,portability,warning,internal --exception-handling --debug-warnings test/*.cpp tools
|
|
|
|
|
2020-12-06 22:06:55 +01:00
|
|
|
# This takes too long time right now
|
|
|
|
# - name: Bughunting lib
|
|
|
|
# run: |
|
|
|
|
# ASAN_OPTIONS=detect_stack_use_after_return=1 ./cppcheck -D__CPPCHECK__ --bug-hunting -j$(nproc) lib
|
2020-09-05 18:29:19 +02:00
|
|
|
|