Microsoft C++ Code Analysis #612
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: Microsoft C++ Code Analysis | |
on: | |
schedule: | |
- cron: '0 0 * * 0' | |
workflow_dispatch: | |
env: | |
# Path to the CMake build directory. | |
build: '${{ github.workspace }}/build' | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup | |
run: | | |
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.83.0/binaries/boost_1_83_0-msvc-14.3-64.exe" | |
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe") | |
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost" | |
- name: Configure CMake | |
env: | |
BOOST_ROOT: C:\local\boost | |
run: cmake -B ${{ env.build }} -DQL_USE_STD_CLASSES=ON | |
- name: Run MSVC Code Analysis | |
uses: microsoft/[email protected] | |
# Provide a unique ID to access the sarif output path | |
id: run-analysis | |
env: | |
CAExcludePath: C:\local\boost | |
with: | |
cmakeBuildDirectory: ${{ env.build }} | |
buildConfiguration: Release | |
ruleset: '${{ github.workspace }}/.msvc-analysis.ruleset' | |
- name: Upload SARIF to GitHub | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: ${{ steps.run-analysis.outputs.sarif }} | |
- name: Upload SARIF as an Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sarif-file | |
path: ${{ steps.run-analysis.outputs.sarif }} | |