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: undefined behaviour sanitizers
|
|
|
|
|
|
|
|
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
|
|
|
|
2022-01-29 20:44:26 +01:00
|
|
|
container:
|
|
|
|
image: "ubuntu:21.10"
|
|
|
|
|
2021-03-05 21:55:57 +01:00
|
|
|
env:
|
|
|
|
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
|
|
|
|
|
2020-09-05 18:29:19 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2022-01-29 20:44:26 +01:00
|
|
|
- name: Set up Python 3.10
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: '3.10'
|
|
|
|
|
2020-09-05 18:29:19 +02:00
|
|
|
- name: Install missing software on ubuntu
|
|
|
|
run: |
|
2022-01-29 20:44:26 +01:00
|
|
|
apt-get update
|
2022-04-11 07:30:55 +02:00
|
|
|
apt-get install -y make libpcre3-dev
|
2022-01-29 20:44:26 +01:00
|
|
|
apt-get install -y clang-13
|
2020-09-05 18:29:19 +02:00
|
|
|
|
|
|
|
- name: Build
|
2022-04-11 07:30:55 +02:00
|
|
|
run: make -j$(nproc) cppcheck testrunner HAVE_RULES=yes MATCHCOMPILER=yes VERIFY=1
|
2021-03-05 21:55:57 +01:00
|
|
|
env:
|
2022-01-29 20:44:26 +01:00
|
|
|
CC: clang-13
|
|
|
|
CXX: clang++-13
|
|
|
|
CXXFLAGS: "-fsanitize=undefined -fsanitize=nullability -fno-sanitize=signed-integer-overflow -O2 -g3 -DCPPCHK_GLIBCXX_DEBUG"
|
2021-03-05 21:55:57 +01:00
|
|
|
CPPFLAGS: "-DCHECK_INTERNAL"
|
2020-09-05 18:29:19 +02:00
|
|
|
|
|
|
|
- name: Run tests
|
2021-03-05 21:55:57 +01:00
|
|
|
run: ./testrunner
|
2020-09-05 18:29:19 +02:00
|
|
|
|
2021-02-20 13:34:57 +01:00
|
|
|
- name: Self check
|
|
|
|
run: |
|
2022-05-13 06:52:20 +02:00
|
|
|
ec=0
|
|
|
|
./cppcheck -q -j$(nproc) --std=c++11 --template=selfcheck -D__CPPCHECK__ --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=cppcheck-lib --addon=naming.json -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ -Icli --inconclusive --enable=style,performance,portability,warning,internal --exception-handling --debug-warnings cli lib || ec=1
|
|
|
|
./cppcheck -q -j$(nproc) --std=c++11 --template=selfcheck -D__CPPCHECK__ -DQT_VERSION=0x050000 -DQ_MOC_OUTPUT_REVISION=67 --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=qt --addon=naming.json -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ --enable=style,performance,portability,warning,internal --exception-handling --debug-warnings gui/*.cpp gui/temp/*.cpp || ec=1
|
|
|
|
./cppcheck -q -j$(nproc) --std=c++11 --template=selfcheck -D__CPPCHECK__ -DQ_MOC_OUTPUT_REVISION=67 --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/*.cpp || ec=1
|
|
|
|
./cppcheck -q -j$(nproc) --std=c++11 --template=selfcheck -D__CPPCHECK__ -DQ_MOC_OUTPUT_REVISION=67 --error-exitcode=1 --inline-suppr --suppressions-list=.travis_suppressions --library=cppcheck-lib --library=qt -Ilib -Iexternals/simplecpp/ -Iexternals/tinyxml2/ -Igui --inconclusive --enable=style,performance,portability,warning,missingInclude,internal --exception-handling --debug-warnings tools/triage || ec=1
|
|
|
|
exit $ec
|
2021-02-20 13:34:57 +01:00
|
|
|
|