-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.3 KB
/
msvc-code-analysis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Microsoft C++ Code Analysis
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
build: ${{ github.workspace }}/build
config: Debug
permissions:
contents: read
jobs:
analyze:
permissions:
contents: read
security-events: write
actions: read
name: Analyze
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: Configure CMake
run: cmake -B "${{ env.build }}"" -DCMAKE_BUILD_TYPE="${{ env.config }}"
- name: Initialize MSVC Code Analysis
uses: microsoft/msvc-code-analysis-action@24c285ab36952c9e9182f4b78dfafbac38a7e5ee
id: run-analysis
with:
buildConfiguration: ${{ env.config }}
cmakeBuildDirectory: ${{ env.build }}
ruleset: NativeRecommendedRules.ruleset
- name: Upload SARIF to GitHub
uses: github/codeql-action/upload-sarif@46a6823b81f2d7c67ddf123851eea88365bc8a67
with:
sarif_file: ${{ steps.run-analysis.outputs.sarif }}
- name: Upload SARIF as an Artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: sarif-file
path: ${{ steps.run-analysis.outputs.sarif }}