Skip to content

Commit 385c165

Browse files
committed
- add msvc analysis
1 parent 9e34440 commit 385c165

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

.github/workflows/CI_build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ jobs:
77

88
runs-on: windows-latest
99
strategy:
10+
fail-fast: false
1011
matrix:
1112
build_configuration: [Release, Debug]
1213
build_platform: [x64, Win32]
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
#
6+
# Find more information at:
7+
# https://github.com/microsoft/msvc-code-analysis-action
8+
9+
name: Microsoft C++ Code Analysis
10+
11+
on: [push, pull_request]
12+
13+
jobs:
14+
Analyze:
15+
runs-on: windows-latest
16+
17+
strategy:
18+
fail-fast: false
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
submodules: recursive
25+
26+
- name: Add msbuild to PATH
27+
uses: microsoft/setup-msbuild@v2
28+
29+
- name: "Use CI config files"
30+
run: |
31+
Write-Host "remove PythonSettings.props" -ForegroundColor Green
32+
Remove-Item '.\PythonScript\project\PythonSettings.props'
33+
Rename-Item -Path ".\PythonScript\project\PythonSettings_appveyor.props" -NewName "PythonSettings.props"
34+
Write-Host "remove packages.config" -ForegroundColor Green
35+
Remove-Item '.\PythonScript\project\packages.config'
36+
Rename-Item -Path ".\PythonScript\project\packages_appveyor.config" -NewName "packages.config"
37+
shell: pwsh
38+
working-directory: .
39+
40+
- name: Setup NuGet.exe
41+
uses: nuget/setup-nuget@v2
42+
43+
- name: Restore
44+
working-directory: .
45+
run: nuget restore PythonScript.sln
46+
47+
- name: Run MSVC Code Analysis
48+
working-directory: .
49+
run: msbuild PythonScript.sln /m /verbosity:minimal /p:configuration="Debug" /p:platform="x64" /p:PlatformToolset="v143" /p:RunCodeAnalysis=true
50+
51+
# Upload SARIF file to GitHub Code Scanning Alerts
52+
#- name: Upload SARIF to GitHub
53+
# uses: github/codeql-action/upload-sarif@v1
54+
# with:
55+
# sarif_file: ${{ steps.run-analysis.outputs.sarif }}
56+
57+
# Upload SARIF file as an Artifact to download and view
58+
# - name: Upload SARIF as an Artifact
59+
# uses: actions/upload-artifact@v2
60+
# with:
61+
# name: sarif-file
62+
# path: ${{ steps.run-analysis.outputs.sarif }}

0 commit comments

Comments
 (0)