Skip to content

Commit

Permalink
fix NativeAOT toolchain and tests (#2465)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsitnik authored Nov 16, 2023
1 parent fc7afed commit 630622b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
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

0 comments on commit 630622b

Please sign in to comment.