use the latest clang and -O2 for sanitizer jobs (#3775)
This commit is contained in:
parent
5ef3a41dc9
commit
842f2b2da7
|
@ -9,36 +9,45 @@ jobs:
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: "ubuntu:21.10"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
ASAN_OPTIONS: detect_stack_use_after_return=1
|
ASAN_OPTIONS: detect_stack_use_after_return=1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Python 3.10
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
|
||||||
- name: Install missing software on ubuntu
|
- name: Install missing software on ubuntu
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
apt-get update
|
||||||
sudo apt-get install libz3-4 libz3-dev
|
apt-get install -y make libz3-dev libpcre3-dev
|
||||||
|
apt-get install -y clang-13
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make -j$(nproc) cppcheck testrunner USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes VERIFY=1
|
run: make -j$(nproc) cppcheck testrunner USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes VERIFY=1
|
||||||
env:
|
env:
|
||||||
CC: clang
|
CC: clang-13
|
||||||
CXX: clang++
|
CXX: clang++-13
|
||||||
CXXFLAGS: "-fsanitize=address -O1 -g3 -DCPPCHK_GLIBCXX_DEBUG"
|
CXXFLAGS: "-fsanitize=address -O2 -g3 -DCPPCHK_GLIBCXX_DEBUG"
|
||||||
CPPFLAGS: "-DCHECK_INTERNAL"
|
CPPFLAGS: "-DCHECK_INTERNAL"
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: ./testrunner
|
run: ./testrunner
|
||||||
|
|
||||||
# Does not work
|
# TODO: re-enable - was being killed because of incresaed memory usage
|
||||||
# - name: Self check
|
# - name: Self check
|
||||||
# run: |
|
# run: |
|
||||||
# ./cppcheck -q -j$(nproc) --std=c++11 --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
|
# ./cppcheck -q -j$(nproc) --std=c++11 --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
|
||||||
# ./cppcheck -q -j$(nproc) --std=c++11 --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
|
# ./cppcheck -q -j$(nproc) --std=c++11 --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
|
||||||
# ./cppcheck -q -j$(nproc) --std=c++11 --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
|
# ./cppcheck -q -j$(nproc) --std=c++11 --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
|
||||||
|
|
||||||
# This takes too long time right now
|
# TODO: This does takes too long to run
|
||||||
# - name: Bughunting lib
|
# - name: Bughunting lib
|
||||||
# run: ./cppcheck -D__CPPCHECK__ --bug-hunting -j$(nproc) lib
|
# run: ./cppcheck -D__CPPCHECK__ --bug-hunting -j$(nproc) lib
|
||||||
|
|
||||||
|
|
|
@ -9,23 +9,32 @@ jobs:
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: "ubuntu:21.10"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
|
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Python 3.10
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
|
||||||
- name: Install missing software on ubuntu
|
- name: Install missing software on ubuntu
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
apt-get update
|
||||||
sudo apt-get install libz3-4 libz3-dev
|
apt-get install -y make libz3-dev libpcre3-dev
|
||||||
|
apt-get install -y clang-13
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make -j$(nproc) cppcheck testrunner USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes VERIFY=1
|
run: make -j$(nproc) cppcheck testrunner USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes VERIFY=1
|
||||||
env:
|
env:
|
||||||
CC: clang
|
CC: clang-13
|
||||||
CXX: clang++
|
CXX: clang++-13
|
||||||
CXXFLAGS: "-fsanitize=undefined -fsanitize=nullability -fno-sanitize=signed-integer-overflow -O1 -g3 -DCPPCHK_GLIBCXX_DEBUG"
|
CXXFLAGS: "-fsanitize=undefined -fsanitize=nullability -fno-sanitize=signed-integer-overflow -O2 -g3 -DCPPCHK_GLIBCXX_DEBUG"
|
||||||
CPPFLAGS: "-DCHECK_INTERNAL"
|
CPPFLAGS: "-DCHECK_INTERNAL"
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
@ -37,7 +46,7 @@ jobs:
|
||||||
./cppcheck -q -j$(nproc) --std=c++11 --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
|
./cppcheck -q -j$(nproc) --std=c++11 --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
|
||||||
./cppcheck -q -j$(nproc) --std=c++11 --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
|
./cppcheck -q -j$(nproc) --std=c++11 --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
|
||||||
|
|
||||||
# This takes too long time right now
|
# TODO: This does takes too long to run
|
||||||
# - name: Bughunting lib
|
# - name: Bughunting lib
|
||||||
# run: ./cppcheck -D__CPPCHECK__ --bug-hunting -j$(nproc) lib
|
# run: ./cppcheck -D__CPPCHECK__ --bug-hunting -j$(nproc) lib
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue