Microsoft C++ Code Analysis #679
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@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 }} | |