forked from danmar/cppcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (23 loc) · 1.03 KB
/
ubsan.yml
File metadata and controls
32 lines (23 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 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:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install missing software on ubuntu
run: |
sudo apt-get update
sudo apt-get install libz3-4 libz3-dev
- name: Build
run: |
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
- name: Run tests
run: |
UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 ./testrunner
# This takes too long time right now
# - name: Bughunting lib
# run: |
# UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 ./cppcheck -D__CPPCHECK__ --bug-hunting -j$(nproc) lib