Make this program more configurable for compilers with incomplete sta… #149
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: CMake on a single platform | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '**.h' | |
- '**.c' | |
- '**.cpp' | |
- 'CMakeLists.txt' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '**.h' | |
- '**.c' | |
- '**.cpp' | |
- 'CMakeLists.txt' | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install PVS-Studio | |
run: choco install pvs-studio --package-parameters="'/standalone'" | |
shell: cmd | |
- name: PVS-Setup License | |
run: | | |
& 'C:\Program Files (x86)\PVS-Studio\PVS-Studio_Cmd.exe' credentials --userName ${{ secrets.PVS_STUDIO_USER_NAME }} --licenseKey ${{ secrets.PVS_STUDIO_LICSESE_KEY }} | |
shell: pwsh | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/testbuild -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DEFXC2_USE_PVS_STUDIO=ON -DEFXC2_USE_ALL_RULES=ON | |
- name: Build | |
run: cmake --build ${{github.workspace}}/testbuild --config ${{env.BUILD_TYPE}} | |
- name: Publish report | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: ${{github.workspace}}\testbuild\pvs-studio.sarif | |
category: PVS-Studio |