Skip to content
Closed
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
1 change: 1 addition & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
<add key="dotnet10" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json" />
<add key="dotnet11" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet11/nuget/v3/index.json" />
<add key="dotnet12" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet12/nuget/v3/index.json" />

<add key="benchmarkdotnet.weaver" value="src/BenchmarkDotNet.Weaver/packages" />
</packageSources>
Expand Down
12 changes: 12 additions & 0 deletions src/BenchmarkDotNet.Annotations/Jobs/RuntimeMoniker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public static class RuntimeMoniker
public const string Net10_0 = "net10.0";
/// <summary>.NET 11.0</summary>
public const string Net11_0 = "net11.0";
/// <summary>.NET 12.0</summary>
public const string Net12_0 = "net12.0";

/// <summary>NativeAOT compiled as net7.0</summary>
public const string NativeAot70 = "nativeaot7.0";
Expand All @@ -64,6 +66,8 @@ public static class RuntimeMoniker
public const string NativeAot10_0 = "nativeaot10.0";
/// <summary>NativeAOT compiled as net11.0</summary>
public const string NativeAot11_0 = "nativeaot11.0";
/// <summary>NativeAOT compiled as net12.0</summary>
public const string NativeAot12_0 = "nativeaot12.0";

/// <summary>.NET 6 using MonoVM (not CLR which is the default)</summary>
public const string Mono60 = "mono6.0";
Expand All @@ -77,6 +81,8 @@ public static class RuntimeMoniker
public const string Mono10_0 = "mono10.0";
/// <summary>.NET 11 using MonoVM (not CLR which is the default)</summary>
public const string Mono11_0 = "mono11.0";
/// <summary>.NET 12 using MonoVM (not CLR which is the default)</summary>
public const string Mono12_0 = "mono12.0";

/// <summary>.NET 8 CLR with composite ReadyToRun compilation</summary>
public const string R2R80 = "r2r8.0";
Expand All @@ -86,6 +92,8 @@ public static class RuntimeMoniker
public const string R2R10_0 = "r2r10.0";
/// <summary>.NET 11 CLR with composite ReadyToRun compilation</summary>
public const string R2R11_0 = "r2r11.0";
/// <summary>.NET 12 CLR with composite ReadyToRun compilation</summary>
public const string R2R12_0 = "r2r12.0";

/// <summary>Mono WebAssembly with net8.0</summary>
public const string MonoWasm80 = "monowasm8.0";
Expand All @@ -95,6 +103,8 @@ public static class RuntimeMoniker
public const string MonoWasm10_0 = "monowasm10.0";
/// <summary>Mono WebAssembly with net11.0</summary>
public const string MonoWasm11_0 = "monowasm11.0";
/// <summary>Mono WebAssembly with net12.0</summary>
public const string MonoWasm12_0 = "monowasm12.0";

/// <summary>Mono WebAssembly AOT with net8.0</summary>
public const string MonoWasmAot80 = "monowasmaot8.0";
Expand All @@ -104,6 +114,8 @@ public static class RuntimeMoniker
public const string MonoWasmAot10_0 = "monowasmaot10.0";
/// <summary>Mono WebAssembly AOT with net11.0</summary>
public const string MonoWasmAot11_0 = "monowasmaot11.0";
/// <summary>Mono WebAssembly AOT with net12.0</summary>
public const string MonoWasmAot12_0 = "monowasmaot12.0";

// Still experimental
//public const string CoreWasm11_0 = "corewasm11.0";
Expand Down
5 changes: 4 additions & 1 deletion src/BenchmarkDotNet/Environments/Runtimes/CoreRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ public sealed class CoreRuntime : Runtime
public static readonly CoreRuntime Core90 = new(new(9, 0));
public static readonly CoreRuntime Core10_0 = new(new(10, 0));
public static readonly CoreRuntime Core11_0 = new(new(11, 0));
public static readonly CoreRuntime Core12_0 = new(new(12, 0));

public static CoreRuntime Latest => Core11_0; // when dotnet/runtime branches for 12.0, this will need to get updated
public static CoreRuntime Latest => Core12_0; // when dotnet/runtime branches for 13.0, this will need to get updated

private readonly string? platform;

Expand Down Expand Up @@ -125,6 +126,7 @@ public static CoreRuntime From(Version version, string? platform = null)
(9, 0) => Core90,
(10, 0) => Core10_0,
(11, 0) => Core11_0,
(12, 0) => Core12_0,
_ => new CoreRuntime(version),
};

Expand Down Expand Up @@ -314,6 +316,7 @@ private static CoreRuntime GetPlatformSpecific(Version version, Assembly? assemb
9 => Core90,
10 => Core10_0,
11 => Core11_0,
12 => Core12_0,
_ => new(version),
};

Expand Down
2 changes: 2 additions & 0 deletions src/BenchmarkDotNet/Environments/Runtimes/MonoCoreRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public sealed class MonoCoreRuntime : Runtime
public static readonly MonoCoreRuntime Net90 = new(new(9, 0));
public static readonly MonoCoreRuntime Net10_0 = new(new(10, 0));
public static readonly MonoCoreRuntime Net11_0 = new(new(11, 0));
public static readonly MonoCoreRuntime Net12_0 = new(new(12, 0));

private MonoCoreRuntime(Version version) => Version = ToRuntimeVersion(version);

Expand All @@ -36,6 +37,7 @@ public static MonoCoreRuntime From(Version version)
9 => Net90,
10 => Net10_0,
11 => Net11_0,
12 => Net12_0,
_ => new(version),
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public sealed class MonoWasmAotRuntime : WasmRuntime
public static readonly MonoWasmAotRuntime Net90 = new(new(9, 0));
public static readonly MonoWasmAotRuntime Net10_0 = new(new(10, 0));
public static readonly MonoWasmAotRuntime Net11_0 = new(new(11, 0));
public static readonly MonoWasmAotRuntime Net12_0 = new(new(12, 0));

private MonoWasmAotRuntime(Version version) : base(version) { }

Expand All @@ -26,6 +27,7 @@ public static MonoWasmAotRuntime From(Version version)
9 => Net90,
10 => Net10_0,
11 => Net11_0,
12 => Net12_0,
_ => new(version),
};

Expand Down
2 changes: 2 additions & 0 deletions src/BenchmarkDotNet/Environments/Runtimes/MonoWasmRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public sealed class MonoWasmRuntime : WasmRuntime
public static readonly MonoWasmRuntime Net90 = new(new(9, 0));
public static readonly MonoWasmRuntime Net10_0 = new(new(10, 0));
public static readonly MonoWasmRuntime Net11_0 = new(new(11, 0));
public static readonly MonoWasmRuntime Net12_0 = new(new(12, 0));

private MonoWasmRuntime(Version version) : base(version) { }

Expand All @@ -26,6 +27,7 @@ public static MonoWasmRuntime From(Version version)
9 => Net90,
10 => Net10_0,
11 => Net11_0,
12 => Net12_0,
_ => new(version),
};

Expand Down
6 changes: 6 additions & 0 deletions src/BenchmarkDotNet/Environments/Runtimes/NativeAotRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ public sealed class NativeAotRuntime : Runtime
/// </summary>
public static readonly NativeAotRuntime Net11_0 = new(new(11, 0));

/// <summary>
/// NativeAOT compiled as net12.0
/// </summary>
public static readonly NativeAotRuntime Net12_0 = new(new(12, 0));

private NativeAotRuntime(Version version) => Version = ToRuntimeVersion(version);

public override string Name => "NativeAOT";
Expand All @@ -53,6 +58,7 @@ public static NativeAotRuntime From(Version version)
9 => Net90,
10 => Net10_0,
11 => Net11_0,
12 => Net12_0,
_ => new(version),
};

Expand Down
2 changes: 2 additions & 0 deletions src/BenchmarkDotNet/Environments/Runtimes/R2RRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public sealed class R2RRuntime : Runtime
public static readonly R2RRuntime Net90 = new(new(9, 0));
public static readonly R2RRuntime Net10_0 = new(new(10, 0));
public static readonly R2RRuntime Net11_0 = new(new(11, 0));
public static readonly R2RRuntime Net12_0 = new(new(12, 0));

private R2RRuntime(Version version) => Version = ToRuntimeVersion(version);

Expand All @@ -25,6 +26,7 @@ public static R2RRuntime From(Version version)
9 => Net90,
10 => Net10_0,
11 => Net11_0,
12 => Net12_0,
_ => new(version),
};

Expand Down
2 changes: 1 addition & 1 deletion src/BenchmarkDotNet/Toolchains/CoreRun/CoreRunToolchain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace BenchmarkDotNet.Toolchains.CoreRun
{
public sealed class CoreRunToolchain : IToolchain, IHasSettings
{
private const string DefaultTargetFrameworkMoniker = "net11.0";
private const string DefaultTargetFrameworkMoniker = "net12.0";

private CoreRunToolchain(CoreRunSettings settings)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public sealed class CsProjMonoCoreToolchain : CsProjNetToolchain
public static readonly CsProjMonoCoreToolchain Mono90 = new(MonoCoreRuntime.Net90, MonoCoreSettings.Default);
public static readonly CsProjMonoCoreToolchain Mono10_0 = new(MonoCoreRuntime.Net10_0, MonoCoreSettings.Default);
public static readonly CsProjMonoCoreToolchain Mono11_0 = new(MonoCoreRuntime.Net11_0, MonoCoreSettings.Default);
public static readonly CsProjMonoCoreToolchain Mono12_0 = new(MonoCoreRuntime.Net12_0, MonoCoreSettings.Default);

private CsProjMonoCoreToolchain(MonoCoreRuntime runtime, MonoCoreSettings settings)
: this(runtime, settings, Resolve(settings, runtime)) { }
Expand Down Expand Up @@ -46,6 +47,7 @@ public static CsProjMonoCoreToolchain From(MonoCoreRuntime runtime, MonoCoreSett
9 => Mono90,
10 => Mono10_0,
11 => Mono11_0,
12 => Mono12_0,
_ => new CsProjMonoCoreToolchain(runtime, settings),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal sealed class CsProjNativeAotGenerator : CsProjGenerator
{
internal const string NativeAotNuGetFeed = "nativeAotNuGetFeed";
private const string DefaultNuGetFeed = "https://api.nuget.org/v3/index.json";
private const string LocalBuildDotNetFeed = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet11/nuget/v3/index.json";
private const string LocalBuildDotNetFeed = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet12/nuget/v3/index.json";
internal const string GeneratedRdXmlFileName = "bdn_generated.rd.xml";

private readonly NativeAotSettings settings;
Expand Down Expand Up @@ -95,7 +95,7 @@ protected override async ValueTask GenerateNuGetConfigAsync(ArtifactsPaths artif

// The ILCompiler is restored either from a NuGet feed, or from a local runtime build (which also needs the dotnet nightly feed).
private KeyValuePair<string, string>[] GetFeeds()
=> settings.LocalIlcPackages is not null ? [new("local", settings.LocalIlcPackages.FullName), new("dotnet11", LocalBuildDotNetFeed)]
=> settings.LocalIlcPackages is not null ? [new("local", settings.LocalIlcPackages.FullName), new("dotnet12", LocalBuildDotNetFeed)]
: settings.NuGetFeedUrl.IsNotBlank() ? [new(NativeAotNuGetFeed, settings.NuGetFeedUrl!)]
: [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public sealed class CsProjNativeAotToolchain : CsProjNetToolchain
public static readonly CsProjNativeAotToolchain Net10_0 = new(NativeAotRuntime.Net10_0, NativeAotSettings.Default);
/// <summary>compiled as net11.0</summary>
public static readonly CsProjNativeAotToolchain Net11_0 = new(NativeAotRuntime.Net11_0, NativeAotSettings.Default);
/// <summary>compiled as net12.0</summary>
public static readonly CsProjNativeAotToolchain Net12_0 = new(NativeAotRuntime.Net12_0, NativeAotSettings.Default);

private CsProjNativeAotToolchain(NativeAotRuntime runtime, NativeAotSettings settings)
: this(runtime, settings, Resolve(settings, runtime)) { }
Expand Down Expand Up @@ -49,6 +51,7 @@ public static CsProjNativeAotToolchain From(NativeAotRuntime runtime, NativeAotS
9 => Net90,
10 => Net10_0,
11 => Net11_0,
12 => Net12_0,
_ => new CsProjNativeAotToolchain(runtime, settings),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace BenchmarkDotNet.Toolchains.NativeAot;

public sealed record NativeAotSettings : DotNetCliSettings
{
private const string LocalBuildIlCompilerVersion = "11.0.0-dev";
private const string LocalBuildIlCompilerVersion = "12.0.0-dev";

public static readonly NativeAotSettings Default = new();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public sealed class CsProjCoreToolchain : CsProjNetToolchain
public static readonly CsProjCoreToolchain NetCoreApp90 = new(CoreRuntime.Core90, NetCoreAppSettings.Default);
public static readonly CsProjCoreToolchain NetCoreApp10_0 = new(CoreRuntime.Core10_0, NetCoreAppSettings.Default);
public static readonly CsProjCoreToolchain NetCoreApp11_0 = new(CoreRuntime.Core11_0, NetCoreAppSettings.Default);
public static readonly CsProjCoreToolchain NetCoreApp12_0 = new(CoreRuntime.Core12_0, NetCoreAppSettings.Default);

private CsProjCoreToolchain(CoreRuntime runtime, NetCoreAppSettings settings)
: this(runtime, settings, Resolve(settings, runtime)) { }
Expand Down Expand Up @@ -61,6 +62,7 @@ public static CsProjCoreToolchain From(CoreRuntime runtime, NetCoreAppSettings s
(9, 0) => NetCoreApp90,
(10, 0) => NetCoreApp10_0,
(11, 0) => NetCoreApp11_0,
(12, 0) => NetCoreApp12_0,
_ => new CsProjCoreToolchain(runtime, settings),
};
}
Expand Down
2 changes: 2 additions & 0 deletions src/BenchmarkDotNet/Toolchains/R2R/CsProjR2RToolchain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public sealed class CsProjR2RToolchain : CsProjNetToolchain
public static readonly CsProjR2RToolchain R2R90 = new(R2RRuntime.Net90, R2RSettings.Default);
public static readonly CsProjR2RToolchain R2R10_0 = new(R2RRuntime.Net10_0, R2RSettings.Default);
public static readonly CsProjR2RToolchain R2R11_0 = new(R2RRuntime.Net11_0, R2RSettings.Default);
public static readonly CsProjR2RToolchain R2R12_0 = new(R2RRuntime.Net12_0, R2RSettings.Default);

private CsProjR2RToolchain(R2RRuntime runtime, R2RSettings settings)
: this(runtime, settings, Resolve(settings, runtime)) { }
Expand Down Expand Up @@ -42,6 +43,7 @@ public static CsProjR2RToolchain From(R2RRuntime runtime, R2RSettings settings)
9 => R2R90,
10 => R2R10_0,
11 => R2R11_0,
12 => R2R12_0,
_ => new CsProjR2RToolchain(runtime, settings),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public sealed class CsProjMonoWasmAotToolchain : CsProjWasmToolchain
public static readonly CsProjMonoWasmAotToolchain Net90 = new(MonoWasmAotRuntime.Net90, WasmSettings.Default);
public static readonly CsProjMonoWasmAotToolchain Net10_0 = new(MonoWasmAotRuntime.Net10_0, WasmSettings.Default);
public static readonly CsProjMonoWasmAotToolchain Net11_0 = new(MonoWasmAotRuntime.Net11_0, WasmSettings.Default);
public static readonly CsProjMonoWasmAotToolchain Net12_0 = new(MonoWasmAotRuntime.Net12_0, WasmSettings.Default);

private CsProjMonoWasmAotToolchain(MonoWasmAotRuntime runtime, WasmSettings settings)
: base("MonoWasmAot", runtime, settings, aot: true, useCoreClrRuntime: false) { }
Expand All @@ -25,6 +26,7 @@ public static CsProjMonoWasmAotToolchain From(MonoWasmAotRuntime runtime, WasmSe
9 => Net90,
10 => Net10_0,
11 => Net11_0,
12 => Net12_0,
_ => new CsProjMonoWasmAotToolchain(runtime, settings),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public sealed class CsProjMonoWasmToolchain : CsProjWasmToolchain
public static readonly CsProjMonoWasmToolchain Net90 = new(MonoWasmRuntime.Net90, WasmSettings.Default);
public static readonly CsProjMonoWasmToolchain Net10_0 = new(MonoWasmRuntime.Net10_0, WasmSettings.Default);
public static readonly CsProjMonoWasmToolchain Net11_0 = new(MonoWasmRuntime.Net11_0, WasmSettings.Default);
public static readonly CsProjMonoWasmToolchain Net12_0 = new(MonoWasmRuntime.Net12_0, WasmSettings.Default);

private CsProjMonoWasmToolchain(MonoWasmRuntime runtime, WasmSettings settings)
: base("MonoWasm", runtime, settings, aot: false, useCoreClrRuntime: false) { }
Expand All @@ -25,6 +26,7 @@ public static CsProjMonoWasmToolchain From(MonoWasmRuntime runtime, WasmSettings
9 => Net90,
10 => Net10_0,
11 => Net11_0,
12 => Net12_0,
_ => new CsProjMonoWasmToolchain(runtime, settings),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "net12.0",
"description": ".NET 12"
},
{
"choice": "net11.0",
"description": ".NET 11"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "net12.0",
"description": ".NET 12"
},
{
"choice": "net11.0",
"description": ".NET 11"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
"description": "The target framework for the project.",
"datatype": "choice",
"choices": [
{
"choice": "net12.0",
"description": ".NET 12"
},
{
"choice": "net11.0",
"description": ".NET 11"
Expand Down
Loading
Loading