Skip to content

Commit

Permalink
Remove bug hunting. This feature will be provided in Cppcheck premium.
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Apr 11, 2022
1 parent 98f84e3 commit 8f386e1
Show file tree
Hide file tree
Showing 90 changed files with 83 additions and 7,305 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/CI-unixish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,13 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install libxml2-utils
sudo apt-get install libz3-dev libtinyxml2-dev
sudo apt-get install libtinyxml2-dev
sudo apt-get install qtbase5-dev qttools5-dev libqt5charts5-dev qt5-default
- name: Fix missing z3_version.h
if: matrix.os == 'ubuntu-18.04'
run: |
cp externals/z3_version_old.h externals/z3_version.h
- name: Install missing software on macos
if: contains(matrix.os, 'macos')
run: |
brew install coreutils python3 z3 qt@5
brew install coreutils python3 qt@5
- name: Install missing Python packages
run: |
Expand All @@ -45,7 +40,7 @@ jobs:
run: |
mkdir cmake.output.tinyxml2
cd cmake.output.tinyxml2
cmake -G "Unix Makefiles" -DUSE_Z3=On -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DUSE_BUNDLED_TINYXML2=Off ..
cmake -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DUSE_BUNDLED_TINYXML2=Off ..
cmake --build . -- -j$(nproc)
cd ..
Expand All @@ -59,7 +54,7 @@ jobs:
run: |
mkdir cmake.output
cd cmake.output
cmake -G "Unix Makefiles" -DUSE_Z3=On -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On ..
cmake -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On ..
cmake --build . -- -j$(nproc)
cd ..
Expand All @@ -68,7 +63,7 @@ jobs:
run: |
mkdir cmake.output
cd cmake.output
cmake -G "Unix Makefiles" -DUSE_Z3=On -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DQt5_DIR=$(brew --prefix qt@5)/lib/cmake/Qt5 ..
cmake -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DQt5_DIR=$(brew --prefix qt@5)/lib/cmake/Qt5 ..
cmake --build . -- -j$(nproc)
cd ..
Expand All @@ -95,15 +90,15 @@ jobs:
- name: Build cppcheck
run: |
make clean
make -j$(nproc) USE_Z3=yes HAVE_RULES=yes
make -j$(nproc) HAVE_RULES=yes
- name: Build test
run: |
make -j$(nproc) testrunner USE_Z3=yes HAVE_RULES=yes
make -j$(nproc) testrunner HAVE_RULES=yes
- name: Run test
run: |
make -j$(nproc) check USE_Z3=yes HAVE_RULES=yes
make -j$(nproc) check HAVE_RULES=yes
# the script uses sed parameters not supported by MacOS
- name: Run extra tests
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/CI-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ jobs:
env:
# see https://www.pcre.org/original/changelog.txt
PCRE_VERSION: 8.45
# see https://github.com/Z3Prover/z3/releases:
Z3_VERSION: 4.8.15

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -72,25 +70,6 @@ jobs:
env:
CL: /MP

- name: Cache Z3 Library
id: cache-z3
uses: actions/cache@v2
if: matrix.arch == 'x64' || matrix.qt_ver == ''
with:
path: z3-${{ env.Z3_VERSION }}-${{ matrix.arch }}-win.zip
key: z3-${{ env.Z3_VERSION }}-${{ matrix.arch }}-win

- name: Download Z3 library
if: (matrix.arch == 'x64' || matrix.qt_ver == '') && steps.cache-z3.outputs.cache-hit != 'true'
run: |
curl -fsSL https://github.com/Z3Prover/z3/releases/download/z3-%Z3_VERSION%/z3-%Z3_VERSION%-${{ matrix.arch }}-win.zip -o z3-%Z3_VERSION%-${{ matrix.arch }}-win.zip || exit /b !errorlevel!
- name: Install Z3 library
if: matrix.arch == 'x64' || matrix.qt_ver == ''
run: |
7z x z3-%Z3_VERSION%-${{ matrix.arch }}-win.zip -oexternals -r -y || exit /b !errorlevel!
move externals\z3-%Z3_VERSION%-${{ matrix.arch }}-win externals\z3 || exit /b !errorlevel!
- name: Cache Qt ${{ matrix.qt_ver }}
if: matrix.qt_ver != '' && matrix.arch == 'x64'
id: cache-qt
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
- name: Install missing software on ubuntu
run: |
apt-get update
apt-get install -y make libz3-dev libpcre3-dev
apt-get install -y make libpcre3-dev
apt-get install -y clang-13
- name: Build
run: make -j$(nproc) cppcheck testrunner USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes VERIFY=1
run: make -j$(nproc) cppcheck testrunner HAVE_RULES=yes MATCHCOMPILER=yes VERIFY=1
env:
CC: clang-13
CXX: clang++-13
Expand All @@ -47,7 +47,3 @@ 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__ --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

# TODO: This does takes too long to run
# - name: Bughunting lib
# run: ./cppcheck -D__CPPCHECK__ --bug-hunting -j$(nproc) lib

47 changes: 0 additions & 47 deletions .github/workflows/bughunting.yml

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
run: |
apt-get update
apt-get install -y cmake g++ make
apt-get install -y libz3-dev
apt-get install -y libpcre3-dev
apt-get install -y libffi7 # work around missing dependency for Qt install step
apt-get install -y clang-tidy-13
Expand All @@ -46,7 +45,7 @@ jobs:
run: |
mkdir cmake.output
cd cmake.output
cmake -G "Unix Makefiles" -DUSE_Z3=On -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCPPCHK_GLIBCXX_DEBUG=Off ..
cmake -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCPPCHK_GLIBCXX_DEBUG=Off ..
cd ..
- name: Prepare CMake dependencies
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install libxml2-utils
sudo apt-get install libz3-dev libz3-4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand All @@ -38,7 +37,7 @@ jobs:
setup-python-dependencies: false

- run: |
make -j$(nproc) USE_Z3=yes HAVE_RULES=yes cppcheck
make -j$(nproc) HAVE_RULES=yes cppcheck
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
3 changes: 1 addition & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install libxml2-utils
sudo apt-get install libz3-dev libz3-4
sudo apt-get install lcov
sudo apt-get install libcppunit-dev
python -m pip install pip --upgrade
python -m pip install lcov_cobertura
- name: Compile instrumented
run: |
make -j$(nproc) test CXXFLAGS="-g -fprofile-arcs -ftest-coverage" USE_Z3=yes HAVE_RULES=yes
make -j$(nproc) test CXXFLAGS="-g -fprofile-arcs -ftest-coverage" HAVE_RULES=yes
- name: Generate coverage report
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/iwyu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
- name: Install missing software
run: |
apt-get update
apt-get install -y cmake g++ make libz3-dev libpcre3-dev
apt-get install -y cmake g++ make libpcre3-dev
apt-get install -y qtbase5-dev qttools5-dev libqt5charts5-dev
apt-get install -y wget iwyu
- name: Prepare CMake
run: |
mkdir cmake.output
cd cmake.output
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DUSE_Z3=On -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCPPCHK_GLIBCXX_DEBUG=Off -DUSE_MATCHCOMPILER=Off ..
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DBUILD_TESTS=On -DBUILD_GUI=On -DWITH_QCHART=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCPPCHK_GLIBCXX_DEBUG=Off -DUSE_MATCHCOMPILER=Off ..
cd ..
- name: Prepare CMake dependencies
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/release-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ jobs:
env:
# see https://www.pcre.org/original/changelog.txt
PCRE_VERSION: 8.45
# see https://github.com/Z3Prover/z3/releases:
Z3_VERSION: 4.8.15
QT_VERSION: 5.15.2

steps:
Expand Down Expand Up @@ -56,23 +54,6 @@ jobs:
copy pcre.h ..\externals
copy Release\pcre.lib ..\externals\pcre64.lib
- name: Cache Z3 Library
id: cache-z3
uses: actions/cache@v2
with:
path: z3-${{ env.Z3_VERSION }}-x64-win.zip
key: z3-${{ env.Z3_VERSION }}-x64-win

- name: Download Z3 library
if: steps.cache-z3.outputs.cache-hit != 'true'
run: |
curl -fsSL https://github.com/Z3Prover/z3/releases/download/z3-%Z3_VERSION%/z3-%Z3_VERSION%-x64-win.zip -o z3-%Z3_VERSION%-x64-win.zip
- name: Install Z3 library
run: |
7z x z3-%Z3_VERSION%-x64-win.zip -oexternals -r -y
move externals\z3-%Z3_VERSION%-x64-win externals\z3
- name: Cache Qt ${{ env.QT_VERSION }}
id: cache-qt
uses: actions/cache@v1 # not v2!
Expand Down Expand Up @@ -125,7 +106,6 @@ jobs:
copy platforms\*.xml win_installer\files\platforms
copy bin\cppcheck.exe win_installer\files
copy bin\cppcheck-core.dll win_installer\files
copy externals\z3\bin\libz3.dll win_installer\files
mkdir win_installer\files\help
xcopy /s gui\help win_installer\files\help
del win_installer\files\translations\*.qm
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/selfcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install missing software
run: |
sudo apt-get update
sudo apt-get install libz3-dev
- name: Cache Qt ${{ env.QT_VERSION }}
id: cache-qt
uses: actions/cache@v1 # not v2!
Expand All @@ -44,7 +39,7 @@ jobs:
run: |
mkdir cmake.output
pushd cmake.output
cmake -G "Unix Makefiles" -DUSE_Z3=On -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=ON -DWITH_QCHART=ON -DCMAKE_GLOBAL_AUTOGEN_TARGET=On ..
cmake -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=ON -DWITH_QCHART=ON -DCMAKE_GLOBAL_AUTOGEN_TARGET=On ..
- name: Generate dependencies
run: |
Expand All @@ -68,7 +63,7 @@ jobs:
run: |
mkdir cmake.output.notest
pushd cmake.output.notest
cmake -G "Unix Makefiles" -DUSE_Z3=On -DHAVE_RULES=On -DBUILD_TESTS=0 -DBUILD_GUI=ON -DWITH_QCHART=ON -DCMAKE_GLOBAL_AUTOGEN_TARGET=On ..
cmake -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=0 -DBUILD_GUI=ON -DWITH_QCHART=ON -DCMAKE_GLOBAL_AUTOGEN_TARGET=On ..
- name: Generate dependencies (no test)
run: |
Expand All @@ -83,4 +78,4 @@ jobs:
run: |
./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib --library=qt -D__GNUC__ -DQT_VERSION=0x050000 -DQ_MOC_OUTPUT_REVISION=67 --inconclusive --enable=unusedFunction --exception-handling -rp=. --project=cmake.output.notest/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr
env:
DISABLE_VALUEFLOW: 1
DISABLE_VALUEFLOW: 1
8 changes: 2 additions & 6 deletions .github/workflows/ubsan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
- name: Install missing software on ubuntu
run: |
apt-get update
apt-get install -y make libz3-dev libpcre3-dev
apt-get install -y make libpcre3-dev
apt-get install -y clang-13
- name: Build
run: make -j$(nproc) cppcheck testrunner USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes VERIFY=1
run: make -j$(nproc) cppcheck testrunner HAVE_RULES=yes MATCHCOMPILER=yes VERIFY=1
env:
CC: clang-13
CXX: clang++-13
Expand All @@ -46,7 +46,3 @@ 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__ --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
# TODO: This does takes too long to run
# - name: Bughunting lib
# run: ./cppcheck -D__CPPCHECK__ --bug-hunting -j$(nproc) lib

5 changes: 2 additions & 3 deletions .github/workflows/valgrind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,15 @@ jobs:
sudo apt-get update
sudo apt-get install libxml2-utils
sudo apt-get install valgrind
sudo apt-get install libz3-dev libz3-4 libz3-4-dbgsym
sudo apt-get install libc6-dbg-amd64-cross
- name: Build cppcheck
run: |
CXXFLAGS="-O1 -g" make -j$(nproc) USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes
CXXFLAGS="-O1 -g" make -j$(nproc) HAVE_RULES=yes MATCHCOMPILER=yes
- name: Build test
run: |
CXXFLAGS="-O1 -g" make -j$(nproc) testrunner USE_Z3=yes HAVE_RULES=yes MATCHCOMPILER=yes
CXXFLAGS="-O1 -g" make -j$(nproc) testrunner HAVE_RULES=yes MATCHCOMPILER=yes
- name: Run valgrind
run: |
Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
before_install:
# install needed deps
- travis_retry sudo apt-get update -qq
- travis_retry sudo apt-get install -qq python3-pip libxml2-utils libpcre3 gdb unzip wx-common xmlstarlet python3-dev liblua5.3-dev libcurl3 libcairo2-dev libsigc++-2.0-dev tidy libopencv-dev libz3-dev
- travis_retry sudo apt-get install -qq python3-pip libxml2-utils libpcre3 gdb unzip wx-common xmlstarlet python3-dev liblua5.3-dev libcurl3 libcairo2-dev libsigc++-2.0-dev tidy libopencv-dev
# Python 2 modules
- travis_retry python2 -m pip install --user pytest==4.6.4
- travis_retry python2 -m pip install --user unittest2
Expand All @@ -32,7 +32,6 @@ before_install:
- travis_retry python3 -m pip install --user requests # imported by tools/pr.py
- travis_retry python3 -m pip install --user pygments
- travis_retry python3 -m pip install --user natsort
- cp externals/z3_version_old.h externals/z3_version.h # because travis z3 version is old

matrix:
# do notify immediately about it when a job of a build fails.
Expand Down
Loading

0 comments on commit 8f386e1

Please sign in to comment.