Workflow file for this run
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: On PRs - Linux - Static Analysis | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths-ignore: | |
- "*.md" | |
jobs: | |
special_pvsStudio: | |
name: 'Ubuntu 22.04 - GCC - Static Analyzer: PVS-Studio' | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
# Trying to deal with warning: -> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0 | |
- name: install dependencies | |
run: | | |
python3 -m pip install conan==1.59.0 | |
sudo add-apt-repository ppa:ubuntu-lxc/daily -y | |
wget -q -O - https://files.pvs-studio.com/etc/pubkey.txt |sudo apt-key add - | |
sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.pvs-studio.com/etc/viva64.list | |
sudo apt update -qq | |
sudo apt install -qq pvs-studio | |
- name: Conan common config | |
run: | | |
conan profile new --detect default | |
conan profile update settings.compiler.libcxx=libstdc++11 default | |
- name: Run Conan | |
run: | | |
mkdir build && cd build | |
conan profile list | |
conan profile show default | |
conan install .. -o webready=True --build missing | |
- name: Configure | |
run: | | |
cmake --preset linux-debug -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
- name: Static Analysis | |
env: | |
PVS_USERNAME: ${{ secrets.PVS_USERNAME }} | |
PVS_KEY: ${{ secrets.PVS_KEY }} | |
run: | | |
cd build | |
pvs-studio-analyzer credentials $PVS_USERNAME $PVS_KEY -o PVS_license.lic | |
pvs-studio-analyzer analyze -l PVS_license.lic -o pvsStudio.log -j4 --disableLicenseExpirationCheck | |
plog-converter -a GA:1,2 -d V1042 -t fullhtml pvsStudio.log -o pvsReportHtml | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: static_analysis | |
path: build/pvsReportHtml | |
retention-days: 7 | |