diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index b75d51e9..f124a6d9 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -261,19 +261,20 @@ jobs: path: samples\ComputeSharp.SwapChain.Cli\bin\Release\net8.0\win-x64\publish\computesharp.cli.exe if-no-files-found: error - # Also publish the Win2D sample (without NativeAOT, see https://github.com/dotnet/runtime/issues/84908) + # Also publish the Win2D sample (with R2R). + # Only doing this on x64 (to avoid a Roslyn issue). - if: matrix.platform == 'x64' - name: Publish ComputeSharp.SwapChain.D2D1.Cli + name: Publish ComputeSharp.SwapChain.D2D1.Cli (R2R) run: > $env:COMPUTESHARP_SWAPCHAIN_D2D1_PUBLISH_R2R='true'; $env:COMPUTESHARP_SWAPCHAIN_D2D1_PUBLISH_AOT='false'; + git clean -fdx; msbuild samples\ComputeSharp.SwapChain.D2D1.Cli\ComputeSharp.SwapChain.D2D1.Cli.csproj /restore -t:publish - /p:Platform=${{matrix.platform}} /p:RuntimeIdentifier=win-${{matrix.platform}} + /p:Configuration=Release /p:Platform=${{matrix.platform}} /p:RuntimeIdentifier=win-${{matrix.platform}} - # Just like for the DX12 sample, run it on x64 to validate it works correctly. - # Temporarily disabled due to https://github.com/microsoft/Win2D/issues/935. - - if: false # matrix.platform == 'x64' - name: Run ComputeSharp.SwapChain.D2D1.Cli + # Just like for the DX12 sample, run it on x64 to validate it works correctly + - if: matrix.platform == 'x64' + name: Run ComputeSharp.SwapChain.D2D1.Cli (R2R) run: > $process = (Start-Process samples\ComputeSharp.SwapChain.D2D1.Cli\bin\x64\Release\net8.0-windows10.0.22621\win-x64\publish\computesharp.d2d1.cli.exe -PassThru); sleep -Seconds 2; @@ -282,15 +283,26 @@ jobs: if ($process.ExitCode -lt 0 -and $process.ExitCode -ne -1073741510) { throw $process.ExitCode; } return $process.ExitCode; - # Publish the Win2D sample with NativeAOT (just verifying the build, can't run this yet, see above) + # Publish the Win2D sample again (with NativeAOT) - if: matrix.platform == 'x64' - name: Publish ComputeSharp.SwapChain.D2D1.Cli with NativeAOT + name: Publish ComputeSharp.SwapChain.D2D1.Cli (NativeAOT) run: > $env:COMPUTESHARP_SWAPCHAIN_D2D1_PUBLISH_R2R='false'; $env:COMPUTESHARP_SWAPCHAIN_D2D1_PUBLISH_AOT='true'; git clean -fdx; msbuild samples\ComputeSharp.SwapChain.D2D1.Cli\ComputeSharp.SwapChain.D2D1.Cli.csproj /restore -t:publish - /p:Platform=${{matrix.platform}} /p:RuntimeIdentifier=win-${{matrix.platform}} + /p:Configuration=Release /p:Platform=${{matrix.platform}} /p:RuntimeIdentifier=win-${{matrix.platform}} + + # Verify that the Win2D NativeAOT sample also runs correctly + - if: matrix.platform == 'x64' + name: Run ComputeSharp.SwapChain.D2D1.Cli (NativeAOT) + run: > + $process = (Start-Process samples\ComputeSharp.SwapChain.D2D1.Cli\bin\x64\Release\net8.0-windows10.0.22621\win-x64\publish\computesharp.d2d1.cli.exe -PassThru); + sleep -Seconds 2; + $process.CloseMainWindow() | Out-Null; + $process.WaitForExit(); + if ($process.ExitCode -lt 0 -and $process.ExitCode -ne -1073741510) { throw $process.ExitCode; } + return $process.ExitCode; # Publish the native library as a NativeAOT shared library - name: Publish ComputeSharp.NativeLibrary diff --git a/samples/ComputeSharp.SwapChain.D2D1.Cli/ComputeSharp.SwapChain.D2D1.Cli.csproj b/samples/ComputeSharp.SwapChain.D2D1.Cli/ComputeSharp.SwapChain.D2D1.Cli.csproj index ae847368..04195799 100644 --- a/samples/ComputeSharp.SwapChain.D2D1.Cli/ComputeSharp.SwapChain.D2D1.Cli.csproj +++ b/samples/ComputeSharp.SwapChain.D2D1.Cli/ComputeSharp.SwapChain.D2D1.Cli.csproj @@ -9,9 +9,6 @@ $(NoWarn);IDE0065 computesharp.d2d1.cli ..\..\assets\icon.ico - - - true diff --git a/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj b/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj index 274b6bdc..a3760bc9 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj +++ b/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj @@ -9,9 +9,6 @@ win-$(Platform).pubxml true true - - - true @@ -32,15 +29,6 @@ - - - - diff --git a/src/ComputeSharp.D2D1.WinUI/ComputeSharp.D2D1.WinUI.csproj b/src/ComputeSharp.D2D1.WinUI/ComputeSharp.D2D1.WinUI.csproj index 5767bf8f..a3bb46c1 100644 --- a/src/ComputeSharp.D2D1.WinUI/ComputeSharp.D2D1.WinUI.csproj +++ b/src/ComputeSharp.D2D1.WinUI/ComputeSharp.D2D1.WinUI.csproj @@ -25,7 +25,7 @@ - + diff --git a/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj b/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj index c8f2a068..1e467774 100644 --- a/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj +++ b/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj @@ -7,7 +7,7 @@ - + diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj b/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj index ed5fa712..ae3d7cdf 100644 --- a/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj @@ -9,9 +9,6 @@ win-$(Platform).pubxml true true - - - true @@ -59,9 +56,6 @@ - - -