diff --git a/.gitlab-ci.yml.example b/.gitlab-ci.yml.example index 40a9a8d..00da56c 100644 --- a/.gitlab-ci.yml.example +++ b/.gitlab-ci.yml.example @@ -32,3 +32,7 @@ check-format-sources: only: - merge_requests extends: .check-format-sources + +analyze-pvs: + when: manual + extends: .analyze-pvs diff --git a/scheduled.yml b/scheduled.yml index a400d59..ec17809 100644 --- a/scheduled.yml +++ b/scheduled.yml @@ -144,3 +144,19 @@ variables: ${CHECK_FORMAT_SOURCES_CMD} fi +.analyze-pvs: + variables: + CMAKE_GENERATOR: Ninja + image: jammy-dev + tags: ['analyze'] + script: + - > + if [ -n "${CUSTOM_ANALYZE_PVS}" ]; then + ${CUSTOM_ANALYZE_PVS} + else + cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B build . + cmake --build build -j + pvs-studio-analyzer analyze -f build/compile_commands.json -j + plog-converter -a "GA:1,2,3;64:1;OP:1,2;CS:1,2" -t errorfile PVS-Studio.log + fi +