From dca209e740f975232c06e86c9376e1b25fcc7fe6 Mon Sep 17 00:00:00 2001 From: Parker Bibus Date: Thu, 27 Feb 2025 15:56:15 -0800 Subject: [PATCH 1/2] Update net462 channel to use 10.0 branch. --- scripts/channel_map.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/channel_map.py b/scripts/channel_map.py index 04acdc026b2..da150ddf38f 100644 --- a/scripts/channel_map.py +++ b/scripts/channel_map.py @@ -7,6 +7,11 @@ class ChannelMap(): 'branch': '10.0', 'quality': 'daily' }, + 'net462': { + 'tfm': 'net462', + 'branch': '10.0', # This needs to be kept up to date with main or whatever the global.json will require. + 'quality': 'daily' + }, '10.0': { 'tfm': 'net10.0', 'branch': '10.0', @@ -159,11 +164,6 @@ class ChannelMap(): 'branch': '3.1.4xx', 'quality': 'daily' }, - 'net462': { - 'tfm': 'net462', - 'branch': '9.0', - 'quality': 'daily' - }, 'net48': { 'tfm': 'net48', # For Full Framework download the LTS for dotnet cli. 'branch': 'LTS' From 69c603ce549b22226635160d1811240d79690520 Mon Sep 17 00:00:00 2001 From: Parker Bibus Date: Fri, 28 Feb 2025 11:11:52 -0800 Subject: [PATCH 2/2] Build the support tools (Startup, SOD) using the supporting target framework instead of the framework name for special cases (nativeaot*, net462). --- scripts/performance/common.py | 19 +++++++++++++++++++ scripts/run_performance_job.py | 15 ++++++++------- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/scripts/performance/common.py b/scripts/performance/common.py index 80ace0c09fc..f87963ddbfe 100644 --- a/scripts/performance/common.py +++ b/scripts/performance/common.py @@ -253,6 +253,25 @@ def set_environment_variable(name: str, value: str, save_to_pipeline: bool = Tru __write_pipeline_variable(name, value) os.environ[name] = value +def get_target_framework_moniker_from_framework(framework: str) -> str: + ''' + Translates framework name to target framework moniker (TFM) + This maps the frameworks to the TFMs to be used to build support tooling. + ''' + if framework == 'nativeaot6.0': + return 'net6.0' + if framework == 'nativeaot7.0': + return 'net7.0' + if framework == 'nativeaot8.0': + return 'net8.0' + if framework == 'nativeaot9.0': + return 'net9.0' + if framework == 'nativeaot10.0': + return 'net10.0' + if framework == 'net462': + return 'net10.0' # This needs to be kept up to date with the version in channel_map.py, both should also be the latest version + return framework + class RunCommand: ''' This is a class wrapper around `subprocess.Popen` with an additional set diff --git a/scripts/run_performance_job.py b/scripts/run_performance_job.py index add95307e49..30fdbf65f24 100644 --- a/scripts/run_performance_job.py +++ b/scripts/run_performance_job.py @@ -15,7 +15,7 @@ from typing import Any, Dict, List, Optional import ci_setup -from performance.common import RunCommand, set_environment_variable +from performance.common import RunCommand, set_environment_variable, get_target_framework_moniker_from_framework from performance.logger import setup_loggers from send_to_helix import PerfSendToHelixArgs, perf_send_to_helix @@ -791,12 +791,13 @@ def run_performance_job(args: RunPerformanceJobArgs): runtime_id = "linux" + (f"{args.os_sub_group.replace('_', '-')}" if args.os_sub_group else "") + f"-{args.architecture}" dotnet_executable_path = os.path.join(ci_setup_arguments.dotnet_path, "dotnet") if ci_setup_arguments.dotnet_path else os.path.join(ci_setup_arguments.install_dir, "dotnet") - + tool_framework = get_target_framework_moniker_from_framework(framework) + RunCommand([ dotnet_executable_path, "publish", "-c", "Release", "-o", os.path.join(payload_dir, "certhelper"), - "-f", framework, + "-f", tool_framework, "-r", runtime_id, "--self-contained", os.path.join(args.performance_repo_dir, "src", "tools", "CertHelper", "CertHelper.csproj"), @@ -819,7 +820,7 @@ def run_performance_job(args: RunPerformanceJobArgs): dotnet_executable_path, "publish", "-c", "Release", "-o", os.path.join(payload_dir, "startup"), - "-f", framework, + "-f", tool_framework, "-r", runtime_id, "--self-contained", os.path.join(args.performance_repo_dir, "src", "tools", "ScenarioMeasurement", "Startup", "Startup.csproj"), @@ -832,7 +833,7 @@ def run_performance_job(args: RunPerformanceJobArgs): dotnet_executable_path, "publish", "-c", "Release", "-o", os.path.join(payload_dir, "SOD"), - "-f", framework, + "-f", tool_framework, "-r", runtime_id, "--self-contained", os.path.join(args.performance_repo_dir, "src", "tools", "ScenarioMeasurement", "SizeOnDisk", "SizeOnDisk.csproj"), @@ -846,7 +847,7 @@ def run_performance_job(args: RunPerformanceJobArgs): dotnet_executable_path, "publish", "-c", "Release", "-o", os.path.join(payload_dir, "MemoryConsumption"), - "-f", framework, + "-f", tool_framework, "-r", runtime_id, "--self-contained", os.path.join(args.performance_repo_dir, "src", "tools", "ScenarioMeasurement", "MemoryConsumption", "MemoryConsumption.csproj"), @@ -859,7 +860,7 @@ def run_performance_job(args: RunPerformanceJobArgs): dotnet_executable_path, "publish", "-c", "Release", "-o", os.path.join(payload_dir, "PerfLabGenericEventSourceForwarder"), - "-f", framework, + "-f", tool_framework, "-r", runtime_id, os.path.join(args.performance_repo_dir, "src", "tools", "PerfLabGenericEventSourceForwarder", "PerfLabGenericEventSourceForwarder", "PerfLabGenericEventSourceForwarder.csproj"), f"/bl:{os.path.join(args.performance_repo_dir, 'artifacts', 'log', build_config, 'PerfLabGenericEventSourceForwarder.binlog')}",