Repository navigation
Update renderer test baseline #194
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 | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-test: | |
| name: Build and test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| rid: linux-x64 | |
| native_output: src/ProGPU.Tests/bin/Release/net10.0/linux-x64 | |
| - os: macos-15 | |
| rid: osx-arm64 | |
| native_output: src/ProGPU.Tests/bin/Release/net10.0/osx-arm64 | |
| - os: windows-latest | |
| rid: win-x64 | |
| native_output: src/ProGPU.Tests/bin/Release/net10.0/win-x64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install Linux WebGPU dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libvulkan1 \ | |
| mesa-vulkan-drivers \ | |
| libx11-xcb1 \ | |
| libxcb1 \ | |
| libxcb-randr0 \ | |
| libxcb-render0 \ | |
| libxcb-shape0 \ | |
| libxcb-shm0 \ | |
| libxcb-xfixes0 \ | |
| libxcb-present0 \ | |
| libxkbcommon0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| global-json-file: global.json | |
| - name: Restore | |
| run: | | |
| dotnet restore src/ProGPU.Tests/ProGPU.Tests.csproj --runtime ${{ matrix.rid }} | |
| dotnet restore src/ProGPU.Tests.Headless/ProGPU.Tests.Headless.csproj --runtime ${{ matrix.rid }} | |
| - name: Build tests | |
| run: | | |
| dotnet build src/ProGPU.Tests/ProGPU.Tests.csproj --configuration Release --runtime ${{ matrix.rid }} --no-restore -p:ContinuousIntegrationBuild=true | |
| dotnet build src/ProGPU.Tests.Headless/ProGPU.Tests.Headless.csproj --configuration Release --runtime ${{ matrix.rid }} --no-restore -p:ContinuousIntegrationBuild=true | |
| - name: Test | |
| shell: pwsh | |
| run: | | |
| $nativeRoot = Join-Path $env:GITHUB_WORKSPACE "${{ matrix.native_output }}" | |
| $nativeRidRoot = Join-Path $nativeRoot "runtimes/${{ matrix.rid }}/native" | |
| $headlessNativeRoot = Join-Path $env:GITHUB_WORKSPACE "src/ProGPU.Tests.Headless/bin/Release/net10.0/${{ matrix.rid }}" | |
| $headlessNativeRidRoot = Join-Path $headlessNativeRoot "runtimes/${{ matrix.rid }}/native" | |
| if ($IsWindows) { | |
| $env:PATH = "$nativeRoot;$nativeRidRoot;$headlessNativeRoot;$headlessNativeRidRoot;$env:PATH" | |
| } elseif ($IsMacOS) { | |
| $env:DYLD_LIBRARY_PATH = "$nativeRoot`:$nativeRidRoot`:$headlessNativeRoot`:$headlessNativeRidRoot`:$env:DYLD_LIBRARY_PATH" | |
| } else { | |
| $env:LD_LIBRARY_PATH = "$nativeRoot`:$nativeRidRoot`:$headlessNativeRoot`:$headlessNativeRidRoot`:$env:LD_LIBRARY_PATH" | |
| } | |
| $testArgs = @( | |
| "test", | |
| "src/ProGPU.Tests/ProGPU.Tests.csproj", | |
| "--configuration", | |
| "Release", | |
| "--runtime", | |
| "${{ matrix.rid }}", | |
| "--no-build", | |
| "--verbosity", | |
| "normal" | |
| ) | |
| if ($IsWindows) { | |
| $testArgs += @( | |
| "--filter", | |
| "FullyQualifiedName~DiagnosticsLoggingSourceTests|FullyQualifiedName~StrongNameSigningTests|FullyQualifiedName~WindowsDpiAwarenessTests" | |
| ) | |
| } | |
| dotnet @testArgs | |
| if ($LASTEXITCODE -ne 0) { | |
| exit $LASTEXITCODE | |
| } | |
| dotnet test ` | |
| src/ProGPU.Tests.Headless/ProGPU.Tests.Headless.csproj ` | |
| --configuration Release ` | |
| --runtime "${{ matrix.rid }}" ` | |
| --no-build ` | |
| --verbosity normal | |
| - name: Pack shipping packages | |
| shell: bash | |
| run: PROGPU_PACKAGE_VERSION=0.1.0-ci.${{ github.run_number }} ./eng/progpu-pack.sh | |
| - name: Upload NuGet packages | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: progpu-packages-${{ matrix.rid }} | |
| path: | | |
| artifacts/packages/Release/*.nupkg | |
| artifacts/packages/Release/*.snupkg | |
| if-no-files-found: error |