From 254dab14d99ae48c7b377276c46cb963da37af51 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Wed, 9 Nov 2022 00:11:26 +0100 Subject: [PATCH] Add .NET 7 and NativeAOT NuGet tests to CI --- .github/workflows/dotnet.yml | 19 ++++++++++++++++++- .../ComputeSharp.Dynamic.NuGet.csproj | 10 ++++++++-- .../ComputeSharp.NuGet.csproj | 10 ++++++++-- .../ComputeSharp.Pix.NuGet.csproj | 10 ++++++++-- 4 files changed, 42 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 7ab817f2..c47dc653 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -144,7 +144,7 @@ jobs: needs: [build-packages] strategy: matrix: - framework: [net6.0, netcoreapp3.1, net472] + framework: [net7.0, net6.0, netcoreapp3.1, net472] runs-on: windows-2022 steps: - name: Git checkout @@ -170,6 +170,23 @@ jobs: - if: matrix.framework == 'net6.0' name: Run ComputeSharp.Tests.NativeLibrariesResolver run: dotnet test tests\ComputeSharp.Tests.NativeLibrariesResolver\ComputeSharp.Tests.NativeLibrariesResolver.csproj -v n -l "console;verbosity=detailed" + + # If on .NET 7, also run the NativeAOT publishing tests + - if: matrix.framework == 'net7.0' + name: Publish and run ComputeSharp.NuGet with NativeAOT + run: > + dotnet publish tests\ComputeSharp.NuGet\ComputeSharp.NuGet.csproj -c Release -f net7.0 -r win-x64 -v n; + tests\ComputeSharp.NuGet\bin\Release\net7.0\win-x64\publish\ComputeSharp.NuGet.exe + - if: matrix.framework == 'net7.0' + name: Publish and run ComputeSharp.Dynamic.NuGet with NativeAOT + run: > + dotnet publish tests\ComputeSharp.Dynamic.NuGet\ComputeSharp.Dynamic.NuGet.csproj -c Release -f net7.0 -r win-x64 -v n; + tests\ComputeSharp.Dynamic.NuGet\bin\Release\net7.0\win-x64\publish\ComputeSharp.Dynamic.NuGet.exe + - if: matrix.framework == 'net7.0' + name: Publish and run ComputeSharp.Pix.NuGet with NativeAOT + run: > + dotnet publish tests\ComputeSharp.Pix.NuGet\ComputeSharp.Pix.NuGet.csproj -c Release -f net7.0 -r win-x64 -v n; + tests\ComputeSharp.Pix.NuGet\bin\Release\net7.0\win-x64\publish\ComputeSharp.Pix.NuGet.exe # Publish the packages to GitHub packages publish-nightlies-github: diff --git a/tests/ComputeSharp.Dynamic.NuGet/ComputeSharp.Dynamic.NuGet.csproj b/tests/ComputeSharp.Dynamic.NuGet/ComputeSharp.Dynamic.NuGet.csproj index 9b0202a7..f5ffddd5 100644 --- a/tests/ComputeSharp.Dynamic.NuGet/ComputeSharp.Dynamic.NuGet.csproj +++ b/tests/ComputeSharp.Dynamic.NuGet/ComputeSharp.Dynamic.NuGet.csproj @@ -1,8 +1,8 @@ - + Exe - net472;netcoreapp3.1;net6.0 + net472;netcoreapp3.1;net6.0;net7.0 AnyCPU;x64;ARM64 https://api.nuget.org/v3/index.json; @@ -10,6 +10,12 @@ + + true + true + $(NoWarn);IL2026 + + diff --git a/tests/ComputeSharp.NuGet/ComputeSharp.NuGet.csproj b/tests/ComputeSharp.NuGet/ComputeSharp.NuGet.csproj index 19ba6427..32605070 100644 --- a/tests/ComputeSharp.NuGet/ComputeSharp.NuGet.csproj +++ b/tests/ComputeSharp.NuGet/ComputeSharp.NuGet.csproj @@ -1,8 +1,8 @@ - + Exe - net472;netcoreapp3.1;net6.0 + net472;netcoreapp3.1;net6.0;net7.0 AnyCPU;x64;ARM64 https://api.nuget.org/v3/index.json; @@ -10,6 +10,12 @@ + + true + true + $(NoWarn);IL2026 + + diff --git a/tests/ComputeSharp.Pix.NuGet/ComputeSharp.Pix.NuGet.csproj b/tests/ComputeSharp.Pix.NuGet/ComputeSharp.Pix.NuGet.csproj index ac497fdd..f9f05e21 100644 --- a/tests/ComputeSharp.Pix.NuGet/ComputeSharp.Pix.NuGet.csproj +++ b/tests/ComputeSharp.Pix.NuGet/ComputeSharp.Pix.NuGet.csproj @@ -1,8 +1,8 @@ - + Exe - net472;netcoreapp3.1;net6.0 + net472;netcoreapp3.1;net6.0;net7.0 AnyCPU;x64;ARM64 https://api.nuget.org/v3/index.json; @@ -10,6 +10,12 @@ + + true + true + $(NoWarn);IL2026 + +