Skip to content

Commit bacfb33

Browse files
snnnankitm3k
authored andcommitted
Enable Prefast for WebGPU native (microsoft#22588)
### Description Enable Prefast for WebGPU native ### Motivation and Context Increase static analysis coverage
1 parent ac8d3fa commit bacfb33

File tree

1 file changed

+42
-3
lines changed

1 file changed

+42
-3
lines changed

.github/workflows/sca.yml

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
- uses: actions/setup-node@v4
3232
with:
33-
node-version: 18
33+
node-version: 20
3434

3535
- name: Download cuda
3636
run: azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v11.8" cuda_sdk
@@ -57,6 +57,45 @@ jobs:
5757
sarif_file: ${{ github.workspace }}\output\MergeResult.sarif
5858
category: VS_SCA
5959

60+
# With WebGPU, Without python
61+
Onnxruntime-SCA-win32-WebGPU-x64:
62+
permissions:
63+
security-events: write
64+
runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"]
65+
steps:
66+
- uses: actions/checkout@v4
67+
with:
68+
submodules: false
69+
- uses: actions/setup-python@v5
70+
with:
71+
python-version: '3.11.x'
72+
architecture: 'x64'
73+
74+
- uses: actions/setup-node@v4
75+
with:
76+
node-version: 20
77+
78+
- name: Delete build folder
79+
run: |
80+
if (Test-Path D:\b) { Remove-Item -Recurse -Force D:\b }
81+
82+
83+
- name: Build code
84+
env:
85+
CAExcludePath: 'C:\Program Files;D:\b;${{ github.workspace }}\cmake'
86+
run: python tools\ci_build\build.py --compile_no_warning_as_error --config Debug --build_dir D:\b --skip_submodule_sync --update --build --parallel --cmake_generator "Visual Studio 17 2022" --build_shared_lib --cmake_extra_defines onnxruntime_USE_CUSTOM_STATIC_ANALYSIS_RULES=ON --cmake_extra_defines onnxruntime_ENABLE_STATIC_ANALYSIS=ON --cmake_extra_defines onnxruntime_REDIRECT_STATIC_ANALYSIS_OUTPUTS_TO_FILE=ON --use_webgpu
87+
88+
- name: Generate sarif
89+
working-directory: D:\b
90+
run: npx @microsoft/sarif-multitool merge *.sarif --recurse --output-directory=${{ github.workspace }}\output --output-file=MergeResult.sarif --merge-runs && dir ${{ github.workspace }}\output
91+
92+
- name: Upload SARIF to GitHub
93+
uses: github/codeql-action/upload-sarif@v3
94+
continue-on-error: true
95+
with:
96+
sarif_file: ${{ github.workspace }}\output\MergeResult.sarif
97+
category: VS_SCA_WIN32_WEBGPU_X64
98+
6099
# No python
61100
Onnxruntime-SCA-win32-WINML-x64:
62101
permissions:
@@ -73,7 +112,7 @@ jobs:
73112

74113
- uses: actions/setup-node@v4
75114
with:
76-
node-version: 18
115+
node-version: 20
77116

78117
- name: Delete build folder
79118
run: |
@@ -113,7 +152,7 @@ jobs:
113152

114153
- uses: actions/setup-node@v4
115154
with:
116-
node-version: 18
155+
node-version: 20
117156

118157
- name: Delete build folder
119158
run: |

0 commit comments

Comments
 (0)