Merge pull request #437 from achaikou/numpy2 #109
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run static- and dynamic analyzers | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
cppcheck: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: './.github/actions/build_core_dependencies' | |
with: | |
privileges: 'sudo' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install cppcheck | |
- name: Build dlisio | |
run: | | |
cmake -S . -B build \ | |
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | |
-DBUILD_PYTHON=OFF \ | |
-DBUILD_TESTING=OFF | |
- name: Run cppcheck | |
run: | | |
cppcheck \ | |
--enable=style,portability,performance,warning \ | |
--library=posix \ | |
--suppressions-list=cppcheck/suppressions.txt \ | |
--inline-suppr \ | |
--project=build/compile_commands.json \ | |
scan_build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: './.github/actions/build_core_dependencies' | |
with: | |
privileges: 'sudo' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install clang clang-tools libfindbin-libs-perl | |
- name: Build dlisio | |
run: | | |
cmake -S . -B build \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | |
-DBUILD_PYTHON=OFF \ | |
-DBUILD_TESTING=OFF | |
- name: Run scan-build | |
run: | | |
sudo scan-build --status-bugs cmake \ | |
--build build \ | |
--target install | |
valgrind: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: './.github/actions/build_core_dependencies' | |
with: | |
privileges: 'sudo' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install valgrind | |
- name: Build dlisio | |
run: | | |
cmake -S . -B build \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DBUILD_PYTHON=OFF | |
cmake --build build | |
- name: Run valgrind | |
run: | | |
valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1 build/lib/test-dlis | |
valgrind --leak-check=full --show-leak-kinds=all --error-exitcode=1 build/lib/test-lis | |
debug: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: './.github/actions/build_core_dependencies' | |
with: | |
privileges: 'sudo' | |
- name: Build dlisio | |
run: | | |
cmake -S . -B build \ | |
-DCMAKE_BUILD_TYPE=Debug \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DBUILD_PYTHON=OFF | |
cmake --build build | |
- name: Test Core | |
shell: bash | |
run: | | |
cd build | |
ctest --output-on-failure |