|
| 1 | +name: ONNX Runtime Windows GPU Doc Gen CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + - rel-* |
| 8 | + paths: |
| 9 | + - '**' |
| 10 | + - '!docs/**' |
| 11 | + - 'docs/OperatorKernels.md' |
| 12 | + - 'docs/ContribOperators.md' |
| 13 | + - '!README.md' |
| 14 | + - '!CONTRIBUTING.md' |
| 15 | + - '!BUILD.md' |
| 16 | + - '!js/web/**' |
| 17 | + - '!onnxruntime/core/providers/js/**' |
| 18 | + pull_request: |
| 19 | + branches: |
| 20 | + - main |
| 21 | + - rel-* |
| 22 | + paths: |
| 23 | + - '**' |
| 24 | + - '!docs/**' |
| 25 | + - 'docs/OperatorKernels.md' |
| 26 | + - 'docs/ContribOperators.md' |
| 27 | + - '!README.md' |
| 28 | + - '!CONTRIBUTING.md' |
| 29 | + - '!BUILD.md' |
| 30 | + - '!js/web/**' |
| 31 | + - '!onnxruntime/core/providers/js/**' |
| 32 | + workflow_dispatch: |
| 33 | + |
| 34 | +concurrency: |
| 35 | + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }} |
| 36 | + cancel-in-progress: true |
| 37 | + |
| 38 | +jobs: |
| 39 | + kernel_documentation: |
| 40 | + name: Windows GPU Kernel Documentation Validation |
| 41 | + env: |
| 42 | + OrtPackageId: Microsoft.ML.OnnxRuntime |
| 43 | + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true |
| 44 | + setVcvars: true |
| 45 | + ALLOW_RELEASED_ONNX_OPSET_ONLY: '0' |
| 46 | + AZCOPY_AUTO_LOGIN_TYPE: MSI |
| 47 | + AZCOPY_MSI_CLIENT_ID: 63b63039-6328-442f-954b-5a64d124e5b4 |
| 48 | + runs-on: [ |
| 49 | + "self-hosted", |
| 50 | + "1ES.Pool=onnxruntime-github-Win2022-GPU-A10", |
| 51 | + "JobId=windows-gpu-doc-gen-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" |
| 52 | + ] |
| 53 | + timeout-minutes: 300 |
| 54 | + steps: |
| 55 | + - uses: actions/checkout@v6 |
| 56 | + with: |
| 57 | + fetch-depth: 0 |
| 58 | + submodules: 'none' |
| 59 | + |
| 60 | + - uses: actions/setup-python@v6 |
| 61 | + with: |
| 62 | + python-version: '3.12' |
| 63 | + architecture: x64 |
| 64 | + |
| 65 | + - name: Locate vcvarsall and Setup Env |
| 66 | + uses: ./.github/actions/locate-vcvarsall-and-setup-env |
| 67 | + with: |
| 68 | + architecture: x64 |
| 69 | + |
| 70 | + - name: Install python modules |
| 71 | + run: python -m pip install -r .\tools\ci_build\github\windows\python\requirements.txt |
| 72 | + working-directory: ${{ github.workspace }} |
| 73 | + shell: cmd |
| 74 | + |
| 75 | + - name: Download CUDA SDK v12.8 |
| 76 | + working-directory: ${{ runner.temp }} |
| 77 | + run: | |
| 78 | + azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v12.8" . |
| 79 | + dir |
| 80 | + shell: pwsh |
| 81 | + |
| 82 | + - name: Add CUDA to PATH |
| 83 | + shell: powershell |
| 84 | + run: | |
| 85 | + Write-Host "Adding CUDA to PATH" |
| 86 | + Write-Host "CUDA Path: $env:RUNNER_TEMP\v12.8\bin" |
| 87 | + Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.8\bin" |
| 88 | + Add-Content -Path $env:GITHUB_PATH -Value "$env:RUNNER_TEMP\v12.8\extras\CUPTI\lib64" |
| 89 | +
|
| 90 | + - uses: actions/setup-node@v6 |
| 91 | + with: |
| 92 | + node-version: '20.x' |
| 93 | + |
| 94 | + - uses: actions/setup-java@v5 |
| 95 | + with: |
| 96 | + distribution: 'temurin' |
| 97 | + java-version: '17' |
| 98 | + architecture: x64 |
| 99 | + |
| 100 | + - name: API Documentation Check and generate |
| 101 | + run: | |
| 102 | + set ORT_DOXY_SRC=${{ github.workspace }} |
| 103 | + set ORT_DOXY_OUT=${{ runner.temp }}\build\RelWithDebInfo\RelWithDebInfo |
| 104 | + mkdir %ORT_DOXY_SRC% |
| 105 | + mkdir %ORT_DOXY_OUT% |
| 106 | + "C:\Program Files\doxygen\bin\doxygen.exe" ${{ github.workspace }}\tools\ci_build\github\Doxyfile_csharp.cfg |
| 107 | + working-directory: ${{ github.workspace }} |
| 108 | + shell: cmd |
| 109 | + |
| 110 | + - uses: actions/setup-dotnet@v5 |
| 111 | + env: |
| 112 | + PROCESSOR_ARCHITECTURE: x64 |
| 113 | + with: |
| 114 | + dotnet-version: '8.x' |
| 115 | + |
| 116 | + - name: Use Nuget 6.x |
| 117 | + uses: nuget/setup-nuget@v2 |
| 118 | + with: |
| 119 | + nuget-version: '6.x' |
| 120 | + |
| 121 | + - name: NuGet restore |
| 122 | + run: nuget restore ${{ github.workspace }}\packages.config -ConfigFile ${{ github.workspace }}\NuGet.config -PackagesDirectory ${{ runner.temp }}\build\RelWithDebInfo |
| 123 | + shell: cmd |
| 124 | + |
| 125 | + - name: Set OnnxRuntimeBuildDirectory |
| 126 | + shell: pwsh |
| 127 | + run: | |
| 128 | + $buildDir = Join-Path ${{ runner.temp }} "build" |
| 129 | + echo "OnnxRuntimeBuildDirectory=$buildDir" >> $env:GITHUB_ENV |
| 130 | +
|
| 131 | + - name: Build |
| 132 | + working-directory: ${{ runner.temp }} |
| 133 | + run: | |
| 134 | + python.exe ${{ github.workspace }}\tools\ci_build\build.py --config RelWithDebInfo --build_dir build --skip_submodule_sync --build_csharp --parallel --use_binskim_compliant_compile_flags --cmake_generator "Visual Studio 17 2022" --build_shared_lib --update --build --gen_doc validate --skip_tests --build_wheel --use_dml --use_cuda --cuda_home="$env:RUNNER_TEMP\v12.8" --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86 --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF |
| 135 | + if ($lastExitCode -ne 0) { |
| 136 | + exit $lastExitCode |
| 137 | + } |
| 138 | + Remove-Item "${{ runner.temp }}\build\RelWithDebInfo" -Include "*.obj" -Recurse |
| 139 | + shell: pwsh |
| 140 | + |
| 141 | + - name: Validate C# native delegates |
| 142 | + run: python tools\ValidateNativeDelegateAttributes.py |
| 143 | + working-directory: ${{ github.workspace }}\csharp |
| 144 | + shell: cmd |
| 145 | + |
| 146 | + - name: Install ONNX Runtime Wheel |
| 147 | + uses: ./.github/actions/install-onnxruntime-wheel |
| 148 | + with: |
| 149 | + whl-directory: ${{ runner.temp }}\build\RelWithDebInfo\RelWithDebInfo\dist |
| 150 | + |
| 151 | + - name: Generate and validate documentation |
| 152 | + working-directory: ${{ runner.temp }}\build |
| 153 | + run: | |
| 154 | + python.exe ${{ github.workspace }}\tools\ci_build\build.py --config RelWithDebInfo --build_dir ${{ runner.temp }}\build --gen_doc validate |
| 155 | + if ($lastExitCode -ne 0) { |
| 156 | + exit $lastExitCode |
| 157 | + } |
| 158 | + shell: pwsh |
| 159 | + |
| 160 | + - name: Upload updated documentation |
| 161 | + if: failure() |
| 162 | + uses: actions/upload-artifact@v6 |
| 163 | + with: |
| 164 | + name: updated-docs |
| 165 | + path: | |
| 166 | + ${{ github.workspace }}/docs/OperatorKernels.md |
| 167 | + ${{ github.workspace }}/docs/ContribOperators.md |
0 commit comments