From dad6f34210428cf412273b2f1d38bfba00c2825f Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Wed, 22 Nov 2023 12:29:27 +0100 Subject: [PATCH] Always publish R2R/NAOT samples, only run on x64 Only build AOT samples on x64 --- .github/workflows/dotnet.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 03b0deb9..6a65f2ee 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -261,9 +261,10 @@ 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 (with R2R) + # 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'; @@ -272,7 +273,8 @@ jobs: /p:Platform=${{matrix.platform}} /p:RuntimeIdentifier=win-${{matrix.platform}} # Just like for the DX12 sample, run it on x64 to validate it works correctly - - name: Run ComputeSharp.SwapChain.D2D1.Cli + - if: matrix.platform == 'x64' + name: Run ComputeSharp.SwapChain.D2D1.Cli 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; @@ -283,7 +285,7 @@ jobs: # 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'; @@ -292,7 +294,8 @@ jobs: /p:Platform=${{matrix.platform}} /p:RuntimeIdentifier=win-${{matrix.platform}} # Verify that the Win2D NativeAOT sample also runs correctly - - name: Run ComputeSharp.SwapChain.D2D1.Cli + - if: matrix.platform == 'x64' + name: Run ComputeSharp.SwapChain.D2D1.Cli 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;