Bump Microsoft.Extensions.Http from 7.0.0 to 9.0.10 #111
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Test | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - 'samples/**' | |
| - '*.sln' | |
| - '**/*.csproj' | |
| - '.github/workflows/build-test.yml' | |
| - 'scripts/download-openvino-runtime.*' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - 'samples/**' | |
| - '*.sln' | |
| - '**/*.csproj' | |
| - '.github/workflows/build-test.yml' | |
| - 'scripts/download-openvino-runtime.*' | |
| workflow_dispatch: | |
| jobs: | |
| build-test: | |
| name: Build and Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| include: | |
| - os: ubuntu-latest | |
| runtime: linux-x64 | |
| - os: windows-latest | |
| runtime: win-x64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Cache NuGet packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.nuget/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| - name: Cache Whisper model | |
| uses: actions/cache@v4 | |
| with: | |
| path: Models/whisper-tiny-fp16-ov | |
| key: whisper-model-v1 | |
| restore-keys: | | |
| whisper-model- | |
| - name: Restore dependencies | |
| run: dotnet restore Fluid.OpenVINO.sln | |
| - name: Download OpenVINO Runtime (Windows) | |
| if: matrix.os == 'windows-latest' | |
| shell: pwsh | |
| run: | | |
| ./scripts/download-openvino-runtime.ps1 -Version "2025.3.0.0.dev20250805" -OutputPath "build/native" | |
| - name: Set OPENVINO_RUNTIME_PATH for Windows | |
| if: matrix.os == 'windows-latest' | |
| shell: pwsh | |
| run: | | |
| $runtimePath = "$(Get-Location)/build/native/runtimes/win-x64/native" | |
| "OPENVINO_RUNTIME_PATH=$runtimePath" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| Write-Host "Set OPENVINO_RUNTIME_PATH to: $runtimePath" | |
| # Verify the runtime path exists and contains DLLs | |
| if (Test-Path $runtimePath) { | |
| $dllCount = (Get-ChildItem -Path $runtimePath -Filter *.dll | Measure-Object).Count | |
| Write-Host "Found $dllCount DLL files in runtime path" | |
| Get-ChildItem -Path $runtimePath -Filter "openvino*.dll" | Select-Object -First 5 | ForEach-Object { Write-Host " - $_" } | |
| } else { | |
| Write-Host "ERROR: Runtime path does not exist: $runtimePath" -ForegroundColor Red | |
| exit 1 | |
| } | |
| - name: Download OpenVINO Runtime (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| chmod +x scripts/download-openvino-runtime.sh | |
| ./scripts/download-openvino-runtime.sh "2025.3.0.0.dev20250805" "build/native" "24" | |
| - name: Set OPENVINO_RUNTIME_PATH for Linux | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| RUNTIME_PATH="$(pwd)/build/native/runtimes/linux-x64/native" | |
| echo "OPENVINO_RUNTIME_PATH=$RUNTIME_PATH" >> $GITHUB_ENV | |
| echo "Set OPENVINO_RUNTIME_PATH to: $RUNTIME_PATH" | |
| - name: Download Whisper model (Windows) | |
| if: matrix.os == 'windows-latest' | |
| shell: pwsh | |
| run: | | |
| ./scripts/download-whisper-model.ps1 | |
| - name: Download Whisper model (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| chmod +x scripts/download-whisper-model.sh | |
| ./scripts/download-whisper-model.sh | |
| - name: Set WHISPER_MODEL_PATH | |
| run: | | |
| if [ "${{ matrix.os }}" == "windows-latest" ]; then | |
| echo "WHISPER_MODEL_PATH=$(pwd)\Models\whisper-tiny-fp16-ov" >> $GITHUB_ENV | |
| else | |
| echo "WHISPER_MODEL_PATH=$(pwd)/Models/whisper-tiny-fp16-ov" >> $GITHUB_ENV | |
| fi | |
| shell: bash | |
| - name: Build solution | |
| run: dotnet build Fluid.OpenVINO.sln --configuration Release --no-restore | |
| - name: Set LD_LIBRARY_PATH for Linux | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| LIBRARY_PATH="$(pwd)/build/native/runtimes/linux-x64/native" | |
| echo "LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
| echo "Setting LD_LIBRARY_PATH to: $LIBRARY_PATH" | |
| ls -la "$LIBRARY_PATH" | grep -E "(libtbb|libopenvino)" | head -10 | |
| shell: bash | |
| - name: Run unit tests | |
| run: dotnet test tests/OpenVINO.NET.GenAI.Tests/OpenVINO.NET.GenAI.Tests.csproj --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results-${{ matrix.runtime }} | |
| path: ./coverage | |
| - name: Build artifacts | |
| run: dotnet publish samples/QuickDemo/QuickDemo.csproj --configuration Release --runtime ${{ matrix.runtime }} --self-contained false --output ./artifacts/${{ matrix.runtime }} | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: quickdemo-${{ matrix.runtime }} | |
| path: ./artifacts/${{ matrix.runtime }} |