Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix NativeAOT toolchain and tests #2465

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/BenchmarkDotNet/ConsoleArguments/ConfigParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,10 @@ private static Job CreateJobForGivenRuntime(Job baseJob, string runtimeId, Comma
return CreateAotJob(baseJob, options, runtimeMoniker, "6.0.0-*", "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json");

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

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

case RuntimeMoniker.NativeAot90:
return CreateAotJob(baseJob, options, runtimeMoniker, "", "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public class NativeAotToolchain : Toolchain
.ToToolchain();

/// <summary>
/// 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
/// compiled as net8.0, targets latest NativeAOT build from the NuGet.org feed: "https://api.nuget.org/v3/index.json"
/// </summary>
public static readonly IToolchain Net80 = CreateBuilder()
.UseNuGet("", "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json")
.UseNuGet("", "https://api.nuget.org/v3/index.json")
.TargetFrameworkMoniker("net8.0")
.ToToolchain();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public NativeAotToolchainBuilder UseLocalBuild(DirectoryInfo ilcPackages)
if (!ilcPackages.Exists) throw new DirectoryNotFoundException($"{ilcPackages} provided as {nameof(ilcPackages)} does NOT exist");

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@ public void MemoryDiagnoserSupportsNativeAOT()
if (RuntimeInformation.IsMacOS())
return; // currently not supported

MemoryDiagnoserIsAccurate(
NativeAotToolchain.CreateBuilder()
.UseNuGet("7.0.0", "https://api.nuget.org/v3/index.json")
.ToToolchain());
MemoryDiagnoserIsAccurate(NativeAotToolchain.Net80);
}

[FactEnvSpecific("We don't want to test MonoVM twice (for .NET Framework 4.6.2 and .NET 8.0)", EnvRequirement.DotNetCoreOnly)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ public static IEnumerable<object[]> GetToolchains()
if (!ContinuousIntegration.IsGitHubActionsOnWindows() // no native dependencies
&& !RuntimeInformation.IsMacOS()) // currently not supported
{
yield return new object[]{ NativeAotToolchain.CreateBuilder()
.UseNuGet("7.0.0", "https://api.nuget.org/v3/index.json")
.ToToolchain() };
yield return new object[]{ NativeAotToolchain.Net80 };
}
// TODO: Support InProcessEmitToolchain.Instance
// yield return new object[] { InProcessEmitToolchain.Instance };
Expand Down