|
3 | 3 | push:
|
4 | 4 | branches:
|
5 | 5 | - main
|
| 6 | + - rel-* |
6 | 7 | pull_request:
|
7 | 8 |
|
8 | 9 | concurrency:
|
9 |
| - group: ${{ github.head_ref || github.run_id }} |
| 10 | + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
10 | 11 | cancel-in-progress: true
|
11 | 12 |
|
12 | 13 | env:
|
13 | 14 | AZCOPY_AUTO_LOGIN_TYPE: MSI
|
14 | 15 | AZCOPY_MSI_CLIENT_ID: 63b63039-6328-442f-954b-5a64d124e5b4
|
15 | 16 |
|
16 | 17 | jobs:
|
17 |
| - Onnxruntime-SCA: |
| 18 | + Onnxruntime-SCA-training-CUDA: |
18 | 19 | runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"]
|
19 | 20 | steps:
|
20 | 21 | - uses: actions/checkout@v3
|
|
33 | 34 | run: azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v11.8" cuda_sdk
|
34 | 35 |
|
35 | 36 |
|
| 37 | + - name: Delete build folder |
| 38 | + run: | |
| 39 | + if (Test-Path D:\b) { Remove-Item -Recurse -Force D:\b } |
| 40 | + &tools\ci_build\github\windows\install_third_party_deps.ps1 -cpu_arch x64 -install_prefix D:\b\Debug\installed -build_config Debug |
| 41 | +
|
36 | 42 | # The build machine doesn't have a GPU. So the value of CMAKE_CUDA_ARCHITECTURES doesn't matter.
|
37 | 43 | - name: Build code
|
38 | 44 | env:
|
|
49 | 55 | with:
|
50 | 56 | sarif_file: ${{ github.workspace }}\output\MergeResult.sarif
|
51 | 57 | category: VS_SCA
|
| 58 | + |
| 59 | + # No python |
| 60 | + Onnxruntime-SCA-win32-WINML-x64: |
| 61 | + runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"] |
| 62 | + steps: |
| 63 | + - uses: actions/checkout@v3 |
| 64 | + with: |
| 65 | + submodules: false |
| 66 | + - uses: actions/setup-python@v3 |
| 67 | + with: |
| 68 | + python-version: '3.11.x' |
| 69 | + architecture: 'x64' |
| 70 | + |
| 71 | + - uses: actions/setup-node@v3 |
| 72 | + with: |
| 73 | + node-version: 18 |
| 74 | + |
| 75 | + - name: Delete build folder |
| 76 | + run: | |
| 77 | + if (Test-Path D:\b) { Remove-Item -Recurse -Force D:\b } |
| 78 | + &tools\ci_build\github\windows\install_third_party_deps.ps1 -cpu_arch x64 -install_prefix D:\b\Debug\installed -build_config Debug |
| 79 | +
|
| 80 | + # The build machine doesn't have a GPU. So the value of CMAKE_CUDA_ARCHITECTURES doesn't matter. |
| 81 | + - name: Build code |
| 82 | + env: |
| 83 | + CAExcludePath: 'C:\Program Files;D:\b;${{ github.workspace }}\cmake' |
| 84 | + run: python tools\ci_build\build.py --enable_training --build_java --compile_no_warning_as_error --config Debug --build_dir D:\b --skip_submodule_sync --build_csharp --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 --ms_experimental --use_dml --use_winml --disable_rtti --enable_wcos --build_shared_lib |
| 85 | + |
| 86 | + - name: Generate sarif |
| 87 | + working-directory: D:\b |
| 88 | + run: npx @microsoft/sarif-multitool merge *.sarif --recurse --output-directory=${{ github.workspace }}\output --output-file=MergeResult.sarif --merge-runs && dir ${{ github.workspace }}\output |
| 89 | + |
| 90 | + - name: Upload SARIF to GitHub |
| 91 | + uses: github/codeql-action/upload-sarif@v2 |
| 92 | + continue-on-error: true |
| 93 | + with: |
| 94 | + sarif_file: ${{ github.workspace }}\output\MergeResult.sarif |
| 95 | + category: VS_SCA_WIN32_WINML_X64 |
| 96 | + |
| 97 | + # No java, No python |
| 98 | + Onnxruntime-SCA-win32-WINML-x86: |
| 99 | + runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"] |
| 100 | + steps: |
| 101 | + - uses: actions/checkout@v3 |
| 102 | + with: |
| 103 | + submodules: false |
| 104 | + - uses: actions/setup-python@v3 |
| 105 | + with: |
| 106 | + python-version: '3.11.x' |
| 107 | + architecture: 'x86' |
| 108 | + |
| 109 | + - uses: actions/setup-node@v3 |
| 110 | + with: |
| 111 | + node-version: 18 |
| 112 | + |
| 113 | + - name: Delete build folder |
| 114 | + run: | |
| 115 | + if (Test-Path D:\b) { Remove-Item -Recurse -Force D:\b } |
| 116 | + &tools\ci_build\github\windows\install_third_party_deps.ps1 -cpu_arch x86 -install_prefix D:\b\Debug\installed -build_config Debug |
| 117 | +
|
| 118 | + # The build machine doesn't have a GPU. So the value of CMAKE_CUDA_ARCHITECTURES doesn't matter. |
| 119 | + - name: Build code |
| 120 | + env: |
| 121 | + CAExcludePath: 'C:\Program Files;D:\b;${{ github.workspace }}\cmake' |
| 122 | + run: python tools\ci_build\build.py --enable_training --compile_no_warning_as_error --config Debug --build_dir D:\b --skip_submodule_sync --build_csharp --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 --ms_experimental --use_dml --use_winml --disable_rtti --enable_wcos --build_shared_lib |
| 123 | + |
| 124 | + - name: Generate sarif |
| 125 | + working-directory: D:\b |
| 126 | + run: npx @microsoft/sarif-multitool merge *.sarif --recurse --output-directory=${{ github.workspace }}\output --output-file=MergeResult.sarif --merge-runs && dir ${{ github.workspace }}\output |
| 127 | + |
| 128 | + - name: Upload SARIF to GitHub |
| 129 | + uses: github/codeql-action/upload-sarif@v2 |
| 130 | + continue-on-error: true |
| 131 | + with: |
| 132 | + sarif_file: ${{ github.workspace }}\output\MergeResult.sarif |
| 133 | + category: VS_SCA_WIN32_WINML_X86 |
0 commit comments