From bc1669d38ff0bb0d74fb0b391b105dc9ed38ce73 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 25 Jun 2022 17:38:08 +0200 Subject: [PATCH] Rename native libraries test for Dynamic project --- .github/workflows/dotnet.yml | 30 +++++++++---------- ComputeSharp.sln | 8 ++--- .../ComputeSharp.Dynamic.NuGet.csproj} | 0 .../Program.cs | 0 .../nuget.config | 0 .../NativeLibrariesResolverTests.cs | 14 ++++----- 6 files changed, 26 insertions(+), 26 deletions(-) rename tests/{ComputeSharp.NuGet/ComputeSharp.NuGet.csproj => ComputeSharp.Dynamic.NuGet/ComputeSharp.Dynamic.NuGet.csproj} (100%) rename tests/{ComputeSharp.NuGet => ComputeSharp.Dynamic.NuGet}/Program.cs (100%) rename tests/{ComputeSharp.NuGet => ComputeSharp.Dynamic.NuGet}/nuget.config (100%) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 3603191f..bc49e552 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -232,7 +232,7 @@ jobs: # Download the NuGet packages generated in the previous job and use them # to build and run the sample project referencing them. This is used as # a test to ensure the NuGet packages work in a consuming project. - verify-packages: + verify-packages-dynamic: if: success() needs: [build-packages] runs-on: windows-2022 @@ -251,23 +251,23 @@ jobs: with: name: nuget_preview path: artifacts - - name: Build ComputeSharp.NuGet (.NET 6) - run: dotnet build tests\ComputeSharp.NuGet\ComputeSharp.NuGet.csproj -c Release -f net6.0 + - name: Build ComputeSharp.Dynamic.NuGet (.NET 6) + run: dotnet build tests\ComputeSharp.Dynamic.NuGet\ComputeSharp.Dynamic.NuGet.csproj -c Release -f net6.0 shell: cmd - - name: Run ComputeSharp.NuGet (.NET 6) - run: dotnet tests\ComputeSharp.NuGet\bin\Release\net6.0\ComputeSharp.NuGet.dll + - name: Run ComputeSharp.Dynamic.NuGet (.NET 6) + run: dotnet tests\ComputeSharp.Dynamic.NuGet\bin\Release\net6.0\ComputeSharp.Dynamic.NuGet.dll shell: cmd - - name: Build ComputeSharp.NuGet (.NET Core 3.1) - run: dotnet build tests\ComputeSharp.NuGet\ComputeSharp.NuGet.csproj -c Release -f netcoreapp3.1 -r win-x64 + - name: Build ComputeSharp.Dynamic.NuGet (.NET Core 3.1) + run: dotnet build tests\ComputeSharp.Dynamic.NuGet\ComputeSharp.Dynamic.NuGet.csproj -c Release -f netcoreapp3.1 -r win-x64 shell: cmd - - name: Run ComputeSharp.NuGet (.NET Core 3.1) - run: tests\ComputeSharp.NuGet\bin\Release\netcoreapp3.1\win-x64\ComputeSharp.NuGet.exe + - name: Run ComputeSharp.Dynamic.NuGet (.NET Core 3.1) + run: tests\ComputeSharp.Dynamic.NuGet\bin\Release\netcoreapp3.1\win-x64\ComputeSharp.Dynamic.NuGet.exe shell: cmd - - name: Build ComputeSharp.NuGet (.NET Framework 4.7.2) - run: dotnet build tests\ComputeSharp.NuGet\ComputeSharp.NuGet.csproj -c Release -f net472 /p:Platform=x64 + - name: Build ComputeSharp.Dynamic.NuGet (.NET Framework 4.7.2) + run: dotnet build tests\ComputeSharp.Dynamic.NuGet\ComputeSharp.Dynamic.NuGet.csproj -c Release -f net472 /p:Platform=x64 shell: cmd - - name: Run ComputeSharp.NuGet (.NET Framework 4.7.2) - run: tests\ComputeSharp.NuGet\bin\x64\Release\net472\ComputeSharp.NuGet.exe + - name: Run ComputeSharp.Dynamic.NuGet (.NET Framework 4.7.2) + run: tests\ComputeSharp.Dynamic.NuGet\bin\x64\Release\net472\ComputeSharp.Dynamic.NuGet.exe shell: cmd # Download the NuGet packages and test the ComputeSharp.Pix dependency @@ -329,7 +329,7 @@ jobs: # Publish the packages to GitHub packages publish-nightlies-github: - needs: [run-dx12-tests, run-d2d1-tests, run-dx12-samples, verify-packages, verify-packages-pix, verify-package-native-libs] + needs: [run-dx12-tests, run-d2d1-tests, run-dx12-samples, verify-packages-dynamic, verify-packages-pix, verify-package-native-libs] runs-on: windows-2022 if: ${{github.event_name == 'push'}} steps: @@ -345,7 +345,7 @@ jobs: # Publish the packages to Azure DevOps publish-nightlies-azure-devops: - needs: [run-dx12-tests, run-d2d1-tests, run-dx12-samples, verify-packages, verify-packages-pix, verify-package-native-libs] + needs: [run-dx12-tests, run-d2d1-tests, run-dx12-samples, verify-packages-dynamic, verify-packages-pix, verify-package-native-libs] runs-on: windows-2022 if: ${{github.event_name == 'push'}} steps: diff --git a/ComputeSharp.sln b/ComputeSharp.sln index 201caf5f..4c907251 100644 --- a/ComputeSharp.sln +++ b/ComputeSharp.sln @@ -103,11 +103,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.D2D1.Tests.Ass EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Pix", "src\ComputeSharp.Pix\ComputeSharp.Pix.csproj", "{14EF12A3-90E6-4683-BD71-9896AF87026B}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComputeSharp.NuGet", "ComputeSharp.NuGet", "{CBA545B4-31EF-4E9F-A1A8-2A1290B54046}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComputeSharp.Dynamic.NuGet", "ComputeSharp.Dynamic.NuGet", "{CBA545B4-31EF-4E9F-A1A8-2A1290B54046}" ProjectSection(SolutionItems) = preProject - tests\ComputeSharp.NuGet\ComputeSharp.NuGet.csproj = tests\ComputeSharp.NuGet\ComputeSharp.NuGet.csproj - tests\ComputeSharp.NuGet\nuget.config = tests\ComputeSharp.NuGet\nuget.config - tests\ComputeSharp.NuGet\Program.cs = tests\ComputeSharp.NuGet\Program.cs + tests\ComputeSharp.Dynamic.NuGet\ComputeSharp.Dynamic.NuGet.csproj = tests\ComputeSharp.Dynamic.NuGet\ComputeSharp.Dynamic.NuGet.csproj + tests\ComputeSharp.Dynamic.NuGet\nuget.config = tests\ComputeSharp.Dynamic.NuGet\nuget.config + tests\ComputeSharp.Dynamic.NuGet\Program.cs = tests\ComputeSharp.Dynamic.NuGet\Program.cs EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComputeSharp.Pix.NuGet", "ComputeSharp.Pix.NuGet", "{C0B903AA-F32C-4760-B4B6-199AC4FE1C5A}" diff --git a/tests/ComputeSharp.NuGet/ComputeSharp.NuGet.csproj b/tests/ComputeSharp.Dynamic.NuGet/ComputeSharp.Dynamic.NuGet.csproj similarity index 100% rename from tests/ComputeSharp.NuGet/ComputeSharp.NuGet.csproj rename to tests/ComputeSharp.Dynamic.NuGet/ComputeSharp.Dynamic.NuGet.csproj diff --git a/tests/ComputeSharp.NuGet/Program.cs b/tests/ComputeSharp.Dynamic.NuGet/Program.cs similarity index 100% rename from tests/ComputeSharp.NuGet/Program.cs rename to tests/ComputeSharp.Dynamic.NuGet/Program.cs diff --git a/tests/ComputeSharp.NuGet/nuget.config b/tests/ComputeSharp.Dynamic.NuGet/nuget.config similarity index 100% rename from tests/ComputeSharp.NuGet/nuget.config rename to tests/ComputeSharp.Dynamic.NuGet/nuget.config diff --git a/tests/ComputeSharp.Tests.NativeLibrariesResolver/NativeLibrariesResolverTests.cs b/tests/ComputeSharp.Tests.NativeLibrariesResolver/NativeLibrariesResolverTests.cs index 1cf6ffe2..52100812 100644 --- a/tests/ComputeSharp.Tests.NativeLibrariesResolver/NativeLibrariesResolverTests.cs +++ b/tests/ComputeSharp.Tests.NativeLibrariesResolver/NativeLibrariesResolverTests.cs @@ -24,7 +24,7 @@ public class NativeLibrariesResolverTests path = Path.GetDirectoryName(path)!; } - SampleProjectDirectory = Path.Combine(path, "ComputeSharp.NuGet"); + SampleProjectDirectory = Path.Combine(path, "ComputeSharp.Dynamic.NuGet"); while (Path.GetFileName(path) is not "ComputeSharp") { @@ -42,7 +42,7 @@ public class NativeLibrariesResolverTests } /// - /// Gets the directory of the ComputeSharp.NuGet project. + /// Gets the directory of the ComputeSharp.Dynamic.NuGet project. /// private static string? SampleProjectDirectory { get; set; } @@ -68,7 +68,7 @@ public class NativeLibrariesResolverTests CleanSampleProject(configuration, rid); BuildSampleProject(configuration, rid); - string realtivePathToDll = Path.Combine("bin", $"{configuration}", "net6.0", $"{ToDirectory(rid)}", "ComputeSharp.NuGet.dll"); + string realtivePathToDll = Path.Combine("bin", $"{configuration}", "net6.0", $"{ToDirectory(rid)}", "ComputeSharp.Dynamic.NuGet.dll"); Assert.AreEqual(0, Exec(SampleProjectDirectory!, "dotnet", realtivePathToDll)); } @@ -85,7 +85,7 @@ public class NativeLibrariesResolverTests string pathToDllDirectory = Path.Combine(SampleProjectDirectory!, "bin", $"{configuration}", "net6.0", $"{ToDirectory(rid)}"); - Assert.AreEqual(0, Exec(pathToDllDirectory, "dotnet", "ComputeSharp.NuGet.dll")); + Assert.AreEqual(0, Exec(pathToDllDirectory, "dotnet", "ComputeSharp.Dynamic.NuGet.dll")); } [TestMethod] @@ -98,7 +98,7 @@ public class NativeLibrariesResolverTests CleanSampleProject(configuration, rid); BuildSampleProject(configuration, rid); - string relativePathToAppHost = Path.Combine("bin", $"{configuration}", "net6.0", $"{ToDirectory(rid)}", "ComputeSharp.NuGet.exe"); + string relativePathToAppHost = Path.Combine("bin", $"{configuration}", "net6.0", $"{ToDirectory(rid)}", "ComputeSharp.Dynamic.NuGet.exe"); Assert.AreEqual(0, Exec(SampleProjectDirectory!, relativePathToAppHost, "")); } @@ -115,7 +115,7 @@ public class NativeLibrariesResolverTests string pathToAppHostDirectory = Path.Combine(SampleProjectDirectory!, "bin", $"{configuration}", "net6.0", $"{ToDirectory(rid)}"); - Assert.AreEqual(0, Exec(pathToAppHostDirectory, "ComputeSharp.NuGet.exe", "")); + Assert.AreEqual(0, Exec(pathToAppHostDirectory, "ComputeSharp.Dynamic.NuGet.exe", "")); } @@ -134,7 +134,7 @@ public class NativeLibrariesResolverTests Exec(SampleProjectDirectory!, "dotnet", $"publish -c Release -f net6.0 -r win-x64 {ToOption(publishMode)} {ToOption(deploymentMode)} {ToOption(nativeLibsDeploymentMode)} /bl"); - string pathToAppHost = Path.Combine("bin", $"Release", "net6.0", "win-x64", "publish", "ComputeSharp.NuGet.exe"); + string pathToAppHost = Path.Combine("bin", $"Release", "net6.0", "win-x64", "publish", "ComputeSharp.Dynamic.NuGet.exe"); Assert.AreEqual(0, Exec(SampleProjectDirectory!, pathToAppHost, "")); }