Skip to content

built cadaver

built cadaver #177

Workflow file for this run

name: PVS-Studio analysis
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pvs_studio_analyzer:
name: PVS-Studio static analyzer
runs-on: ubuntu-20.04
env:
debfile: pvs-studio-7.19.61166.216-amd64.deb
steps:
- name: Checkout repository
uses: actions/checkout@v2
- run: sudo apt-get update
- name: Log and setup environment
run: |
./scripts/log-env.sh
mkdir -p pvs-package
- uses: actions/cache@v2
id: cache-pvs
with:
path: pvs-package
key: ${{ env.debfile }}
- name: Fetch PVS-Studio package
if: steps.cache-pvs.outputs.cache-hit != 'true'
run: wget "https://cdn.pvs-studio.com/${debfile}" -O "pvs-package/pvs.deb"
- name: Install dependencies
run: |
set -xeu
sudo apt-get install -y strace $(cat .github/packages/ubuntu-20.04-apt.txt)
sudo pip3 install --upgrade meson ninja
sudo dpkg -i "pvs-package/pvs.deb"
pvs-studio-analyzer credentials "${{ secrets.PvsStudioName }}" "${{ secrets.PvsStudioKey }}"
- name: Cache subprojects
uses: actions/cache@v2
with:
path: subprojects/packagecache
key: subprojects-${{ hashFiles('subprojects/*.wrap') }}
- name: Build
run: |
set -xeu
meson setup -Dunit_tests=disabled --native-file=.github/meson/native-clang.ini build
pvs-studio-analyzer trace -- ninja -C build
- name: Analyze
run: |
set -xeu
log="pvs-analysis.log"
general_criteria="GA:1,2;64:1;OP:1,2,3;CS:1"
stamp="$(date +'%Y-%m-%d_T%H%M')-${GITHUB_SHA:0:8}"
reportdir="pvs-report/pvs-report-${stamp}"
disable_warnings="V002,V1042,V826,V802,V2008,V1071"
mkdir -p "${reportdir}"
pvs-studio-analyzer analyze \
-a 63 \
-e subprojects \
-s .pvs-suppress \
-j "$(nproc)" \
-o "${log}"
plog-converter \
-p dosbox-staging \
-v "${GITHUB_SHA:0:8}" \
-a "${general_criteria}" \
-d "${disable_warnings}" \
-t fullhtml \
-o "${reportdir}" \
"${log}"
mv "${reportdir}/fullhtml" "${reportdir}/general"
plog-converter \
-a "${general_criteria}" \
-d "${disable_warnings}" \
-t csv \
-o pvs-report.csv \
"${log}"
cp -l pvs-report.csv "${reportdir}/general/"
pvs-studio-analyzer suppress \
-a "${general_criteria}" \
-o "${reportdir}/general/supressible-list.json" \
"${log}"
- name: Upload report
uses: actions/upload-artifact@v2
with:
name: pvs-analysis-report
path: pvs-report
- name: Summarize report
env:
MAX_BUGS: 279
run: |
echo "Full report is included in build Artifacts"
echo
./scripts/count-pvs-bugs.py pvs-report.csv "${MAX_BUGS}"