From e821b1da2d6dfe47ea1c66742a44dcca940da52e Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 20 Nov 2023 17:33:25 +0100 Subject: [PATCH] Configure sample publishing from .csproj file --- .github/workflows/dotnet.yml | 7 +++++-- .../ComputeSharp.SwapChain.D2D1.Cli.csproj | 8 ++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index e5923091..62652467 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -265,8 +265,10 @@ jobs: - if: matrix.platform == 'x64' name: Publish ComputeSharp.SwapChain.D2D1.Cli run: > - msbuild samples\ComputeSharp.SwapChain.D2D1.Cli\ComputeSharp.SwapChain.D2D1.Cli.csproj /restore -t:publish /p:Configuration=Release - /p:Platform=${{matrix.platform}} /p:RuntimeIdentifier=win-${{matrix.platform}} /p:PublishSingleFile=True /p:SelfContained=True /p:PublishTrimmed=True + $env:COMPUTESHARP_SWAPCHAIN_D2D1_PUBLISH_R2R='true'; + $env:COMPUTESHARP_SWAPCHAIN_D2D1_PUBLISH_AOT='false'; + msbuild samples\ComputeSharp.SwapChain.D2D1.Cli\ComputeSharp.SwapChain.D2D1.Cli.csproj /restore -t:publish + /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 - if: matrix.platform == 'x64' @@ -283,6 +285,7 @@ jobs: - if: matrix.platform == 'x64' name: Publish ComputeSharp.SwapChain.D2D1.Cli with 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:Configuration=Release 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 2602e247..ae847368 100644 --- a/samples/ComputeSharp.SwapChain.D2D1.Cli/ComputeSharp.SwapChain.D2D1.Cli.csproj +++ b/samples/ComputeSharp.SwapChain.D2D1.Cli/ComputeSharp.SwapChain.D2D1.Cli.csproj @@ -20,6 +20,14 @@ $(NoWarn);IL2104;IL2026 + + + true + true + true + true + + true