From c2dfe5fbd0ff918d570e0bdfd4fdda225db3c001 Mon Sep 17 00:00:00 2001 From: vitek-karas <10670590+vitek-karas@users.noreply.github.com> Date: Sat, 21 Mar 2026 23:01:57 +0100 Subject: [PATCH 1/2] Add Rosetta diagnostics for Apple Helix jobs Log Rosetta installation and x64 execution checks before Apple device Helix workitems invoke the x64 dotnet-cli, and scope a single ios_arm64 AllSubsets_CoreCLR job to the manual runtime-ioslike pipeline so the diagnostics can be exercised on a PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../extra-platforms/runtime-extra-platforms-ioslike.yml | 4 +++- eng/testing/tests.ioslike.targets | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml index 28398159291f3a..d8452fa5c63950 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml @@ -227,8 +227,10 @@ jobs: isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }} isiOSLikeOnlyBuild: ${{ parameters.isiOSLikeOnlyBuild }} platforms: + # Keep the diagnostic run scoped to the dedicated runtime-ioslike pipeline. + - ${{ if eq(parameters.isiOSLikeOnlyBuild, true) }}: + - ios_arm64 # Tracking issue: https://github.com/dotnet/runtime/issues/123796 - # - ios_arm64 # - tvos_arm64 variables: # map dependencies variables to local variables diff --git a/eng/testing/tests.ioslike.targets b/eng/testing/tests.ioslike.targets index 5db2b02f21b3b0..c7ca3fc45f1319 100644 --- a/eng/testing/tests.ioslike.targets +++ b/eng/testing/tests.ioslike.targets @@ -10,7 +10,16 @@ + + <_RosettaDiagnosticsCommand Condition="'$(TargetOS)' == 'ios' or '$(TargetOS)' == 'tvos'">echo "=== Rosetta diagnostics ==="; uname -m; + <_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) PROC_TRANSLATED=`/usr/sbin/sysctl -n sysctl.proc_translated 2>/dev/null || true`; if [ -n "$PROC_TRANSLATED" ]; then echo "proc_translated=$PROC_TRANSLATED"; else echo "proc_translated=unavailable"; fi; + <_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) if /usr/sbin/pkgutil --pkg-info com.apple.pkg.RosettaUpdateAuto 2>/dev/null; then echo "rosetta_receipt=present"; else echo "rosetta_receipt=missing"; fi; + <_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) if [ -e /Library/Apple/usr/libexec/oah/libRosettaRuntime ]; then echo "rosetta_runtime=present"; else echo "rosetta_runtime=missing"; fi; + <_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) if /usr/bin/arch -x86_64 /usr/bin/true >/dev/null 2>&1; then echo "x64_exec_works=true"; else echo "x64_exec_works=false"; fi; echo "DOTNET_ROOT=$DOTNET_ROOT"; + <_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) if [ -n "$DOTNET_ROOT" ] && [ -e "$DOTNET_ROOT/dotnet" ]; then echo "dotnet_host=$DOTNET_ROOT/dotnet"; /usr/bin/file "$DOTNET_ROOT/dotnet" || true; else echo "dotnet_host=missing"; fi; echo "=== End Rosetta diagnostics ==="; + <_AOTBuildCommand>export PATH=$HELIX_CORRELATION_PAYLOAD/build/cmake/cmake-3.28.0-macos-universal/CMake.app/Contents/bin:$PATH && + <_AOTBuildCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_AOTBuildCommand) $(_RosettaDiagnosticsCommand) && <_AOTBuildCommand>$(_AOTBuildCommand) dotnet msbuild publish/ProxyProjectForAOTOnHelix.proj /bl:$XHARNESS_OUT/AOTBuild.binlog From 202031316dfb799033e3fe3413c5a5fbb4fdc8ba Mon Sep 17 00:00:00 2001 From: vitek-karas <10670590+vitek-karas@users.noreply.github.com> Date: Sun, 22 Mar 2026 00:19:15 +0100 Subject: [PATCH 2/2] Fix Rosetta diagnostic command chaining Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/testing/tests.ioslike.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/testing/tests.ioslike.targets b/eng/testing/tests.ioslike.targets index c7ca3fc45f1319..43a9f795cd5958 100644 --- a/eng/testing/tests.ioslike.targets +++ b/eng/testing/tests.ioslike.targets @@ -16,7 +16,7 @@ <_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) if /usr/sbin/pkgutil --pkg-info com.apple.pkg.RosettaUpdateAuto 2>/dev/null; then echo "rosetta_receipt=present"; else echo "rosetta_receipt=missing"; fi; <_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) if [ -e /Library/Apple/usr/libexec/oah/libRosettaRuntime ]; then echo "rosetta_runtime=present"; else echo "rosetta_runtime=missing"; fi; <_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) if /usr/bin/arch -x86_64 /usr/bin/true >/dev/null 2>&1; then echo "x64_exec_works=true"; else echo "x64_exec_works=false"; fi; echo "DOTNET_ROOT=$DOTNET_ROOT"; - <_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) if [ -n "$DOTNET_ROOT" ] && [ -e "$DOTNET_ROOT/dotnet" ]; then echo "dotnet_host=$DOTNET_ROOT/dotnet"; /usr/bin/file "$DOTNET_ROOT/dotnet" || true; else echo "dotnet_host=missing"; fi; echo "=== End Rosetta diagnostics ==="; + <_RosettaDiagnosticsCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_RosettaDiagnosticsCommand) if [ -n "$DOTNET_ROOT" ] && [ -e "$DOTNET_ROOT/dotnet" ]; then echo "dotnet_host=$DOTNET_ROOT/dotnet"; /usr/bin/file "$DOTNET_ROOT/dotnet" || true; else echo "dotnet_host=missing"; fi; echo "=== End Rosetta diagnostics ===" <_AOTBuildCommand>export PATH=$HELIX_CORRELATION_PAYLOAD/build/cmake/cmake-3.28.0-macos-universal/CMake.app/Contents/bin:$PATH && <_AOTBuildCommand Condition="'$(_RosettaDiagnosticsCommand)' != ''">$(_AOTBuildCommand) $(_RosettaDiagnosticsCommand) &&