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:
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest]
|
|
|
|
fail-fast: false # not worthwhile...
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
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
|
|
|
cp externals/z3_version_old.h externals/z3_version.h
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cp externals/z3_version_old.h externals/z3_version.h
|
2020-12-01 18:02:13 +01:00
|
|
|
CC=clang CXX=clang++ CXXFLAGS="-fsanitize=undefined -fsanitize=nullability -O1 -g3 -DCPPCHK_GLIBCXX_DEBUG" make cppcheck testrunner -j$(nproc) USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes
|
2020-09-05 18:29:19 +02:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
2020-12-01 18:02:13 +01:00
|
|
|
UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 ./testrunner
|
2020-09-05 18:29:19 +02:00
|
|
|
|
2020-12-01 18:02:13 +01:00
|
|
|
- name: Bughunting lib
|
2020-09-05 18:29:19 +02:00
|
|
|
run: |
|
2020-12-01 18:02:13 +01:00
|
|
|
UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 ./cppcheck -D__CPPCHECK__ --bug-hunting -j$(nproc) lib
|
2020-09-05 18:29:19 +02:00
|
|
|
|