-
Notifications
You must be signed in to change notification settings - Fork 29
63 lines (52 loc) · 1.56 KB
/
msvc.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
52
53
54
55
56
57
58
59
60
61
62
63
name: 🪟 MSVC
# TODO: upload dlls as artifact
on:
push:
paths:
- "doc/cpp-demo/**"
branches-ignore:
- godot3
pull_request:
paths:
- "doc/cpp-demo/**"
branches-ignore:
- godot3
env:
VCPKG_ROOT: "${{ github.workspace }}/vcpkg"
source: "${{ github.workspace }}/doc/cpp-demo"
build: "${{ github.workspace }}/doc/cpp-demo/msvc.debug"
preset: msvc.debug
config: Debug
jobs:
analyze:
name: Build and Analyze
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Get vcpkg
run: |
git clone -n https://github.com/microsoft/vcpkg
cd vcpkg
git checkout 2022.11.14
.\bootstrap-vcpkg.bat
- name: CMake Configure
run: cmake --preset ${{ env.preset }} doc/cpp-demo
- name: CMake Build
run: cmake --build ${{ env.build }} --config ${{ env.config }} --target install
- name: Run MSVC Code Analysis
uses: microsoft/[email protected]
id: run-analysis
with:
cmakeBuildDirectory: ${{ env.build }}
buildConfiguration: ${{ env.config }}
ignoredPaths: ${{ env.build }}/_deps
ruleset: NativeRecommendedRules.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@v2
with:
name: sarif-file
path: ${{ steps.run-analysis.outputs.sarif }}