Skip to content

Microsoft C++ Code Analysis #671

Microsoft C++ Code Analysis

Microsoft C++ Code Analysis #671

Workflow file for this run

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@v4
- name: Setup
run: |
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.85.0/binaries/boost_1_85_0-msvc-14.3-64.exe"
(New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\boost.exe")
Start-Process -Wait -FilePath "$RUNNER_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@v3
with:
sarif_file: ${{ steps.run-analysis.outputs.sarif }}
- name: Upload SARIF as an Artifact
uses: actions/upload-artifact@v4
with:
name: sarif-file
path: ${{ steps.run-analysis.outputs.sarif }}