Skip to content

Commit 630622b

Browse files
authored
fix NativeAOT toolchain and tests (#2465)
1 parent fc7afed commit 630622b

File tree

5 files changed

+8
-13
lines changed

5 files changed

+8
-13
lines changed

src/BenchmarkDotNet/ConsoleArguments/ConfigParser.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -544,10 +544,10 @@ private static Job CreateJobForGivenRuntime(Job baseJob, string runtimeId, Comma
544544
return CreateAotJob(baseJob, options, runtimeMoniker, "6.0.0-*", "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json");
545545

546546
case RuntimeMoniker.NativeAot70:
547-
return CreateAotJob(baseJob, options, runtimeMoniker, "", "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json");
547+
return CreateAotJob(baseJob, options, runtimeMoniker, "", "https://api.nuget.org/v3/index.json");
548548

549549
case RuntimeMoniker.NativeAot80:
550-
return CreateAotJob(baseJob, options, runtimeMoniker, "", "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json");
550+
return CreateAotJob(baseJob, options, runtimeMoniker, "", "https://api.nuget.org/v3/index.json");
551551

552552
case RuntimeMoniker.NativeAot90:
553553
return CreateAotJob(baseJob, options, runtimeMoniker, "", "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json");

src/BenchmarkDotNet/Toolchains/NativeAot/NativeAotToolchain.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ public class NativeAotToolchain : Toolchain
2222
.ToToolchain();
2323

2424
/// <summary>
25-
/// compiled as net8.0, targets latest NativeAOT build from the .NET 8 feed: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json
25+
/// compiled as net8.0, targets latest NativeAOT build from the NuGet.org feed: "https://api.nuget.org/v3/index.json"
2626
/// </summary>
2727
public static readonly IToolchain Net80 = CreateBuilder()
28-
.UseNuGet("", "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json")
28+
.UseNuGet("", "https://api.nuget.org/v3/index.json")
2929
.TargetFrameworkMoniker("net8.0")
3030
.ToToolchain();
3131

src/BenchmarkDotNet/Toolchains/NativeAot/NativeAotToolchainBuilder.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public NativeAotToolchainBuilder UseLocalBuild(DirectoryInfo ilcPackages)
5353
if (!ilcPackages.Exists) throw new DirectoryNotFoundException($"{ilcPackages} provided as {nameof(ilcPackages)} does NOT exist");
5454

5555
Feeds["local"] = ilcPackages.FullName;
56-
ilCompilerVersion = "7.0.0-dev";
57-
Feeds["dotnet7"] = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json";
56+
ilCompilerVersion = "9.0.0-dev";
57+
Feeds["dotnet9"] = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json";
5858
useTempFolderForRestore = true;
5959
DisplayName("local ILCompiler build");
6060

tests/BenchmarkDotNet.IntegrationTests/MemoryDiagnoserTests.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,7 @@ public void MemoryDiagnoserSupportsNativeAOT()
7272
if (RuntimeInformation.IsMacOS())
7373
return; // currently not supported
7474

75-
MemoryDiagnoserIsAccurate(
76-
NativeAotToolchain.CreateBuilder()
77-
.UseNuGet("7.0.0", "https://api.nuget.org/v3/index.json")
78-
.ToToolchain());
75+
MemoryDiagnoserIsAccurate(NativeAotToolchain.Net80);
7976
}
8077

8178
[FactEnvSpecific("We don't want to test MonoVM twice (for .NET Framework 4.6.2 and .NET 8.0)", EnvRequirement.DotNetCoreOnly)]

tests/BenchmarkDotNet.IntegrationTests/ThreadingDiagnoserTests.cs

+1-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ public static IEnumerable<object[]> GetToolchains()
3434
if (!ContinuousIntegration.IsGitHubActionsOnWindows() // no native dependencies
3535
&& !RuntimeInformation.IsMacOS()) // currently not supported
3636
{
37-
yield return new object[]{ NativeAotToolchain.CreateBuilder()
38-
.UseNuGet("7.0.0", "https://api.nuget.org/v3/index.json")
39-
.ToToolchain() };
37+
yield return new object[]{ NativeAotToolchain.Net80 };
4038
}
4139
// TODO: Support InProcessEmitToolchain.Instance
4240
// yield return new object[] { InProcessEmitToolchain.Instance };

0 commit comments

Comments
 (0)