diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 5177b935..d348c6f2 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -161,15 +161,15 @@ jobs: - name: Build and run ComputeSharp.Sample run: > dotnet build samples\ComputeSharp.Sample\ComputeSharp.Sample.csproj -c Release -r win-x64 --no-self-contained -p:Platform=x64 -v n; - samples\ComputeSharp.Sample\bin\x64\Release\${{matrix.framework}}\win-x64\ComputeSharp.Sample.exe + samples\ComputeSharp.Sample\bin\x64\Release\net6.0\win-x64\ComputeSharp.Sample.exe - name: Build and run ComputeSharp.Sample.FSharp run: > dotnet build samples\ComputeSharp.Sample.FSharp\ComputeSharp.Sample.FSharp.fsproj -c Release -r win-x64 --no-self-contained -p:Platform=x64 -v n; - samples\ComputeSharp.Sample.FSharp\bin\x64\Release\${{matrix.framework}}\win-x64\ComputeSharp.Sample.FSharp.exe + samples\ComputeSharp.Sample.FSharp\bin\x64\Release\net6.0\win-x64\ComputeSharp.Sample.FSharp.exe - name: Build and run ComputeSharp.ImageProcessing.csproj run: > dotnet build samples\ComputeSharp.ImageProcessing\ComputeSharp.ImageProcessing.csproj -c Release -r win-x64 --no-self-contained -p:Platform=x64 -v n; - samples\ComputeSharp.ImageProcessing\bin\x64\Release\${{matrix.framework}}\win-x64\ComputeSharp.ImageProcessing.exe + samples\ComputeSharp.ImageProcessing\bin\x64\Release\net6.0\win-x64\ComputeSharp.ImageProcessing.exe # Run the NativeAOT samples as well run-samples-aot: diff --git a/tests/ComputeSharp.Tests.NativeLibrariesResolver/DynamicNativeLibrariesResolverTests.cs b/tests/ComputeSharp.Tests.NativeLibrariesResolver/DynamicNativeLibrariesResolverTests.cs index 507f6660..9f31da5e 100644 --- a/tests/ComputeSharp.Tests.NativeLibrariesResolver/DynamicNativeLibrariesResolverTests.cs +++ b/tests/ComputeSharp.Tests.NativeLibrariesResolver/DynamicNativeLibrariesResolverTests.cs @@ -25,13 +25,12 @@ public class DynamicNativeLibrariesResolverTests : NativeLibrariesResolverTestsB path = Path.GetDirectoryName(path)!; } - string corePackagingProjectPath = Path.Combine(path, "src", "ComputeSharp.Core", "ComputeSharp.Core.msbuildproj"); - string packagingProjectPath = Path.Combine(path, "src", "ComputeSharp.Package", "ComputeSharp.Package.msbuildproj"); - string dynamicPackagingProjectPath = Path.Combine(path, "src", "ComputeSharp.Dynamic.Package", "ComputeSharp.Dynamic.Package.msbuildproj"); + string coreProjectPath = Path.Combine(path, "src", "ComputeSharp.Core", "ComputeSharp.Core.csproj"); + string projectPath = Path.Combine(path, "src", "ComputeSharp.Package", "ComputeSharp.Package.csproj"); + string dynamicProjectPath = Path.Combine(path, "src", "ComputeSharp.Dynamic", "ComputeSharp.Dynamic.csproj"); - // Run dotnet pack and on the packaging projects, to ensure the local NuGet packages are available - Process.Start("dotnet", $"pack {corePackagingProjectPath} -c Release").WaitForExit(); - Process.Start("dotnet", $"pack {packagingProjectPath} -c Release").WaitForExit(); - Process.Start("dotnet", $"pack {dynamicPackagingProjectPath} -c Release").WaitForExit(); + Process.Start("dotnet", $"pack {coreProjectPath} -c Release").WaitForExit(); + Process.Start("dotnet", $"pack {projectPath} -c Release").WaitForExit(); + Process.Start("dotnet", $"pack {dynamicProjectPath} -c Release").WaitForExit(); } } \ No newline at end of file diff --git a/tests/ComputeSharp.Tests.NativeLibrariesResolver/Helpers/NativeLibrariesResolverTestsBase.cs b/tests/ComputeSharp.Tests.NativeLibrariesResolver/Helpers/NativeLibrariesResolverTestsBase.cs index 74881bb5..bf3e64a0 100644 --- a/tests/ComputeSharp.Tests.NativeLibrariesResolver/Helpers/NativeLibrariesResolverTestsBase.cs +++ b/tests/ComputeSharp.Tests.NativeLibrariesResolver/Helpers/NativeLibrariesResolverTestsBase.cs @@ -42,7 +42,7 @@ public abstract class NativeLibrariesResolverTestsBase { CleanSampleProject(configuration, rid); - Assert.AreEqual(0, Exec(SampleProjectDirectory, "dotnet", $"run -c {configuration} -f net6.0 {ToOption(rid)}")); + Assert.AreEqual(0, Exec(SampleProjectDirectory, "dotnet", $"run -c {configuration} {ToOption(rid)}")); } [TestMethod] @@ -55,7 +55,7 @@ public abstract class NativeLibrariesResolverTestsBase CleanSampleProject(configuration, rid); BuildSampleProject(configuration, rid); - string realtivePathToDll = Path.Combine("bin", $"{configuration}", "net6.0", $"{ToDirectory(rid)}", $"{SampleProjectName}.dll"); + string realtivePathToDll = Path.Combine("bin", $"{configuration}", "net7.0", $"{ToDirectory(rid)}", $"{SampleProjectName}.dll"); Assert.AreEqual(0, Exec(SampleProjectDirectory, "dotnet", realtivePathToDll)); } @@ -70,7 +70,7 @@ public abstract class NativeLibrariesResolverTestsBase CleanSampleProject(configuration, rid); BuildSampleProject(configuration, rid); - string pathToDllDirectory = Path.Combine(SampleProjectDirectory, "bin", $"{configuration}", "net6.0", $"{ToDirectory(rid)}"); + string pathToDllDirectory = Path.Combine(SampleProjectDirectory, "bin", $"{configuration}", "net7.0", $"{ToDirectory(rid)}"); Assert.AreEqual(0, Exec(pathToDllDirectory, "dotnet", $"{SampleProjectName}.dll")); } @@ -85,7 +85,7 @@ public abstract class NativeLibrariesResolverTestsBase CleanSampleProject(configuration, rid); BuildSampleProject(configuration, rid); - string relativePathToAppHost = Path.Combine("bin", $"{configuration}", "net6.0", $"{ToDirectory(rid)}", $"{SampleProjectName}.exe"); + string relativePathToAppHost = Path.Combine("bin", $"{configuration}", "net7.0", $"{ToDirectory(rid)}", $"{SampleProjectName}.exe"); Assert.AreEqual(0, Exec(SampleProjectDirectory, relativePathToAppHost, "")); } @@ -100,7 +100,7 @@ public abstract class NativeLibrariesResolverTestsBase CleanSampleProject(configuration, rid); BuildSampleProject(configuration, rid); - string pathToAppHostDirectory = Path.Combine(SampleProjectDirectory, "bin", $"{configuration}", "net6.0", $"{ToDirectory(rid)}"); + string pathToAppHostDirectory = Path.Combine(SampleProjectDirectory, "bin", $"{configuration}", "net7.0", $"{ToDirectory(rid)}"); Assert.AreEqual(0, Exec(pathToAppHostDirectory, $"{SampleProjectName}.exe", "")); } @@ -118,9 +118,9 @@ public abstract class NativeLibrariesResolverTestsBase // Furthermore, only publishing in Release mode is tested. CleanSampleProject(Configuration.Release, RID.Win_x64); - _ = Exec(SampleProjectDirectory, "dotnet", $"publish -c Release -f net6.0 -r win-x64 {ToOption(publishMode)} {ToOption(deploymentMode)} {ToOption(nativeLibsDeploymentMode)} /bl"); + _ = Exec(SampleProjectDirectory, "dotnet", $"publish -c Release -r win-x64 {ToOption(publishMode)} {ToOption(deploymentMode)} {ToOption(nativeLibsDeploymentMode)} /bl"); - string pathToAppHost = Path.Combine("bin", $"Release", "net6.0", "win-x64", "publish", $"{SampleProjectName}.exe"); + string pathToAppHost = Path.Combine("bin", $"Release", "net7.0", "win-x64", "publish", $"{SampleProjectName}.exe"); Assert.AreEqual(0, Exec(SampleProjectDirectory, pathToAppHost, "")); } diff --git a/tests/ComputeSharp.Tests.NativeLibrariesResolver/NativeLibrariesResolverTests.cs b/tests/ComputeSharp.Tests.NativeLibrariesResolver/NativeLibrariesResolverTests.cs index e299b1e2..5d895df0 100644 --- a/tests/ComputeSharp.Tests.NativeLibrariesResolver/NativeLibrariesResolverTests.cs +++ b/tests/ComputeSharp.Tests.NativeLibrariesResolver/NativeLibrariesResolverTests.cs @@ -25,11 +25,10 @@ public class NativeLibrariesResolverTests : NativeLibrariesResolverTestsBase path = Path.GetDirectoryName(path)!; } - string corePackagingProjectPath = Path.Combine(path, "src", "ComputeSharp.Core", "ComputeSharp.Core.msbuildproj"); - string packagingProjectPath = Path.Combine(path, "src", "ComputeSharp.Package", "ComputeSharp.Package.msbuildproj"); + string coreProjectPath = Path.Combine(path, "src", "ComputeSharp.Core", "ComputeSharp.Core.csproj"); + string projectPath = Path.Combine(path, "src", "ComputeSharp", "ComputeSharp.csproj"); - // Run dotnet pack and on the packaging projects, to ensure the local NuGet packages are available - Process.Start("dotnet", $"pack {corePackagingProjectPath} -c Release").WaitForExit(); - Process.Start("dotnet", $"pack {packagingProjectPath} -c Release").WaitForExit(); + Process.Start("dotnet", $"pack {coreProjectPath} -c Release").WaitForExit(); + Process.Start("dotnet", $"pack {projectPath} -c Release").WaitForExit(); } } \ No newline at end of file diff --git a/tests/ComputeSharp.Tests.NativeLibrariesResolver/PixNativeLibrariesResolverTests.cs b/tests/ComputeSharp.Tests.NativeLibrariesResolver/PixNativeLibrariesResolverTests.cs index e98eb7d5..42d1a734 100644 --- a/tests/ComputeSharp.Tests.NativeLibrariesResolver/PixNativeLibrariesResolverTests.cs +++ b/tests/ComputeSharp.Tests.NativeLibrariesResolver/PixNativeLibrariesResolverTests.cs @@ -25,13 +25,13 @@ public class PixNativeLibrariesResolverTests : NativeLibrariesResolverTestsBase path = Path.GetDirectoryName(path)!; } - string corePackagingProjectPath = Path.Combine(path, "src", "ComputeSharp.Core", "ComputeSharp.Core.msbuildproj"); - string packagingProjectPath = Path.Combine(path, "src", "ComputeSharp.Package", "ComputeSharp.Package.msbuildproj"); - string pixPackagingProjectPath = Path.Combine(path, "src", "ComputeSharp.Pix.Package", "ComputeSharp.Pix.Package.msbuildproj"); + string coreProjectPath = Path.Combine(path, "src", "ComputeSharp.Core", "ComputeSharp.Core.csproj"); + string projectPath = Path.Combine(path, "src", "ComputeSharp.Package", "ComputeSharp.Package.csproj"); + string pixProjectPath = Path.Combine(path, "src", "ComputeSharp.Pix", "ComputeSharp.Pix.csproj"); // Run dotnet pack and on the packaging projects, to ensure the local NuGet packages are available - Process.Start("dotnet", $"pack {corePackagingProjectPath} -c Release").WaitForExit(); - Process.Start("dotnet", $"pack {packagingProjectPath} -c Release").WaitForExit(); - Process.Start("dotnet", $"pack {pixPackagingProjectPath} -c Release").WaitForExit(); + Process.Start("dotnet", $"pack {coreProjectPath} -c Release").WaitForExit(); + Process.Start("dotnet", $"pack {projectPath} -c Release").WaitForExit(); + Process.Start("dotnet", $"pack {pixProjectPath} -c Release").WaitForExit(); } } \ No newline at end of file