Skip to content

Commit

Permalink
[mono][infra] Enable runtime tests in fullAOT LLVM mode on linux-x64 (d…
Browse files Browse the repository at this point in the history
…otnet#92057)

This PR enables jobs to run runtime tests in fullAOT LLVM mode on linux-x64. The jobs utilize the CBL-Mariner docker image, which contains the clang toolchain instead of binutils. Due to OOM and timeout issues, the tests are split into two jobs: intrinsics and other runtime tests.
  • Loading branch information
kotlarmilos authored Apr 5, 2024
1 parent f91b911 commit ddae9bd
Show file tree
Hide file tree
Showing 16 changed files with 192 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ steps:
displayName: "AOT compile CoreCLR tests"
target: ${{ coalesce(parameters.llvmAotStepContainer, parameters.container) }}
- ${{ if in(parameters.runtimeVariant, 'llvmfullaot', 'minifullaot') }}:
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)MonoAot mono_fullaot ${{ parameters.buildConfig }} ${{ parameters.archType }} /p:RuntimeVariant=${{ parameters.runtimeVariant }}
- script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)MonoAot mono_fullaot ${{ parameters.buildConfig }} ${{ parameters.archType }} /p:RuntimeVariant=${{ parameters.runtimeVariant }} -maxcpucount:1
displayName: "AOT compile CoreCLR tests"
target: ${{ coalesce(parameters.llvmAotStepContainer, parameters.container) }}
- ${{ if eq(parameters.archType, 'arm64') }}:
Expand Down
49 changes: 8 additions & 41 deletions eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,47 +108,6 @@ jobs:
eq(variables['monoContainsChange'], true),
eq(variables['isRollingBuild'], true))
#
# Mono CoreCLR runtime Test executions using live libraries and LLVM Full AOT
# Only when Mono is changed
#
# Disabled due to OOM issues https://github.com/dotnet/runtime/issues/90427
# - template: /eng/pipelines/common/platform-matrix.yml
# parameters:
# jobTemplate: /eng/pipelines/common/global-build-job.yml
# helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
# buildConfig: Release
# runtimeFlavor: mono
# platforms:
# - linux_x64
# - linux_arm64
# variables:
# - name: timeoutPerTestInMinutes
# value: 60
# - name: timeoutPerTestCollectionInMinutes
# value: 180
# jobParameters:
# testGroup: innerloop
# nameSuffix: AllSubsets_Mono_LLVMFullAot_RuntimeTests
# runtimeVariant: llvmfullaot
# buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true
# timeoutInMinutes: 300
# isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}

# condition: >-
# or(
# eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true),
# eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
# eq(variables['isRollingBuild'], true))
# postBuildSteps:
# - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
# parameters:
# creator: dotnet-bot
# llvmAotStepContainer: linux_x64_llvmaot
# testRunNamePrefixSuffix: Mono_Release
# extraVariablesTemplates:
# - template: /eng/pipelines/common/templates/runtimes/test-variables.yml

#
# Mono CoreCLR runtime test executions using live libraries and mini Full AOT
# Only when Mono is changed
Expand All @@ -161,6 +120,8 @@ jobs:
runtimeFlavor: mono
platforms:
- linux_x64
# Tracking issue: https://github.com/dotnet/runtime/issues/90427
# linux_arm64
variables:
- name: timeoutPerTestInMinutes
value: 60
Expand All @@ -172,6 +133,12 @@ jobs:
runtimeVariant: minifullaot
buildArgs: -s mono+libs+clr.hosts -c Release
timeoutInMinutes: 300
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
eq(variables['isRollingBuild'], true))
postBuildSteps:
- template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
parameters:
Expand Down
134 changes: 91 additions & 43 deletions eng/pipelines/runtime-llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,6 @@ schedules:
- main
always: false # run only if there were changes since the last successful scheduled run.

pr:
branches:
include:
- main
- release/*.*
paths:
include:
- '*'
exclude:
- '**.md'
- eng/Version.Details.xml
- .devcontainer/*
- .github/*
- docs/*
- LICENSE.TXT
- PATENTS.TXT
- THIRD-PARTY-NOTICES.TXT

variables:
- template: /eng/pipelines/common/variables.yml

Expand Down Expand Up @@ -117,8 +99,7 @@ extends:
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono_LLVMAOT
buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
/p:MonoEnableLLVM=true /p:MonoAOTEnableLLVM=true /p:MonoBundleLLVMOptimizer=true
buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:MonoEnableLLVM=true /p:MonoAOTEnableLLVM=true
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
Expand All @@ -136,8 +117,7 @@ extends:
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono_LLVMAOT
buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
/p:MonoEnableLLVM=true /p:MonoAOTEnableLLVM=true /p:MonoBundleLLVMOptimizer=true
buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:MonoEnableLLVM=true /p:MonoAOTEnableLLVM=true
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
Expand All @@ -149,55 +129,123 @@ extends:
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
buildConfig: release
buildConfig: Release
runtimeFlavor: mono
platforms:
- linux_x64
# Disabled pending outcome of https://github.com/dotnet/runtime/issues/60234 investigation
#- linux_arm64
- linux_x64
# Disabled pending outcome of https://github.com/dotnet/runtime/issues/60234 investigation
#- linux_arm64
variables:
- name: timeoutPerTestInMinutes
value: 60
- name: timeoutPerTestCollectionInMinutes
value: 180
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono_LLVMAOT_RuntimeTests
buildArgs: -s mono+clr.iltools+clr.hosts+libs+host+packs -c $(_BuildConfig) -lc ${{ variables.debugOnPrReleaseOnRolling }}
/p:MonoEnableLLVM=true /p:MonoAOTEnableLLVM=true /p:MonoBundleLLVMOptimizer=true
postBuildSteps:
- template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
parameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_Release
llvmAotStepContainer: linux_x64_llvmaot
runtimeVariant: llvmaot
runtimeVariant: llvmaot
buildArgs: -s mono+libs+clr.hosts+clr.iltools -c $(_BuildConfig) -lc ${{ variables.debugOnPrReleaseOnRolling }} /p:MonoEnableLLVM=true
timeoutInMinutes: 360
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
eq(variables['isRollingBuild'], true))
postBuildSteps:
- template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
parameters:
creator: dotnet-bot
llvmAotStepContainer: linux_x64_llvmaot
testRunNamePrefixSuffix: Mono_Release
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml

#
# Mono CoreCLR runtime Test executions using live libraries and LLVM Full AOT
# Only when Mono is changed
# This job runs non-intrinsics runtime tests due to OOM issues
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
buildConfig: release
buildConfig: Release
runtimeFlavor: mono
platforms:
- linux_x64
- linux_arm64
- linux_x64
# Tracking issue: https://github.com/dotnet/runtime/issues/90427
# - linux_arm64
variables:
- name: timeoutPerTestInMinutes
value: 60
- name: timeoutPerTestCollectionInMinutes
value: 180
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono_LLVMFullAOT_RuntimeTests
buildArgs: -s mono+clr.iltools+clr.hosts+libs+host+packs -c $(_BuildConfig) -lc ${{ variables.debugOnPrReleaseOnRolling }}
/p:MonoEnableLLVM=true /p:MonoAOTEnableLLVM=true /p:MonoBundleLLVMOptimizer=true
nameSuffix: AllSubsets_Mono_LLVMFULLAOT_RuntimeTests
runtimeVariant: llvmfullaot
buildArgs: -s mono+libs+clr.hosts+clr.iltools -c $(_BuildConfig) -lc ${{ variables.debugOnPrReleaseOnRolling }} /p:MonoEnableLLVM=true
timeoutInMinutes: 360
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
eq(variables['isRollingBuild'], true))
postBuildSteps:
- template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
parameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_Release
llvmAotStepContainer: linux_x64_llvmaot
runtimeVariant: llvmfullaot
testRunNamePrefixSuffix: Mono_Release
testBuildArgs: >-
-tree:CoreMangLib -tree:Exceptions -tree:GC -tree:Interop -tree:Loader -tree:Regressions -tree:baseservices
-tree:ilasm -tree:ilverify -tree:managed -tree:profiler -tree:readytorun -tree:reflection -tree:tracing
-tree:JIT/BBT -tree:JIT/CodeGenBringUpTests -tree:JIT/Directed -tree:JIT/Generics -tree:JIT/IL_Conformance
-tree:JIT/Math -tree:JIT/Methodical -tree:JIT/PGO -tree:JIT/Performance -tree:JIT/Regression -tree:JIT/RyuJIT
-tree:JIT/Stress -tree:JIT/common -tree:JIT/jit64 -tree:JIT/opt -tree:JIT/superpmi
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml

#
# Mono CoreCLR runtime Test executions using live libraries and LLVM Full AOT
# Only when Mono is changed
# This job runs the runtime intrinsics tests due to OOM issues
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
buildConfig: Release
runtimeFlavor: mono
platforms:
- linux_x64
# Tracking issue: https://github.com/dotnet/runtime/issues/90427
# - linux_arm64
variables:
- name: timeoutPerTestInMinutes
value: 60
- name: timeoutPerTestCollectionInMinutes
value: 180
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono_LLVMFULLAOT_RuntimeIntrinsicsTests
runtimeVariant: llvmfullaot
buildArgs: -s mono+libs+clr.hosts+clr.iltools -c $(_BuildConfig) -lc ${{ variables.debugOnPrReleaseOnRolling }} /p:MonoEnableLLVM=true
timeoutInMinutes: 360
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
eq(variables['isRollingBuild'], true))
postBuildSteps:
- template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml
parameters:
creator: dotnet-bot
llvmAotStepContainer: linux_x64_llvmaot
testRunNamePrefixSuffix: Mono_Release
testBuildArgs: -tree:JIT/Intrinsics -tree:JIT/HardwareIntrinsics -tree:JIT/SIMD
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml
2 changes: 2 additions & 0 deletions src/tests/Interop/Interop.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- Tracking issue: https://github.com/dotnet/runtime/issues/90427 -->
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and '$(RuntimeVariant)' == 'llvmfullaot'">true</CLRTestTargetUnsupported>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Configurations>Debug;Release;Checked</Configurations>
<!-- Tracking issue: https://github.com/dotnet/runtime/issues/90427 -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>$(DefineConstants);ANSIBSTR</DefineConstants>
<!-- Tracking issue: https://github.com/dotnet/runtime/issues/90427 -->
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and '$(RuntimeVariant)' == 'minifullaot'">true</CLRTestTargetUnsupported>
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and ('$(RuntimeVariant)' == 'minifullaot' or '$(RuntimeVariant)' == 'llvmfullaot')">true</CLRTestTargetUnsupported>
</PropertyGroup>
<ItemGroup>
<Compile Include="*.cs" />
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Interop/StringMarshalling/BSTR/BSTRTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>$(DefineConstants);BSTR</DefineConstants>
<!-- Tracking issue: https://github.com/dotnet/runtime/issues/90427 -->
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and '$(RuntimeVariant)' == 'minifullaot'">true</CLRTestTargetUnsupported>
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and ('$(RuntimeVariant)' == 'minifullaot' or '$(RuntimeVariant)' == 'llvmfullaot')">true</CLRTestTargetUnsupported>
</PropertyGroup>
<ItemGroup>
<Compile Include="*.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>$(DefineConstants);LPTSTR</DefineConstants>
<!-- Tracking issue: https://github.com/dotnet/runtime/issues/90427 -->
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and '$(RuntimeVariant)' == 'minifullaot'">true</CLRTestTargetUnsupported>
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and ('$(RuntimeVariant)' == 'minifullaot' or '$(RuntimeVariant)' == 'llvmfullaot')">true</CLRTestTargetUnsupported>
</PropertyGroup>
<ItemGroup>
<Compile Include="*.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- Tracking issue: https://github.com/dotnet/runtime/issues/90427 -->
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and '$(RuntimeVariant)' == 'minifullaot'">true</CLRTestTargetUnsupported>
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and ('$(RuntimeVariant)' == 'minifullaot' or '$(RuntimeVariant)' == 'llvmfullaot')">true</CLRTestTargetUnsupported>
</PropertyGroup>
<ItemGroup>
<Compile Include="*.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<DebugType>PdbOnly</DebugType>
<!-- Tracking issue: https://github.com/dotnet/runtime/issues/90427 -->
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and '$(RuntimeVariant)' == 'minifullaot'">true</CLRTestTargetUnsupported>
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and ('$(RuntimeVariant)' == 'minifullaot' or '$(RuntimeVariant)' == 'llvmfullaot')">true</CLRTestTargetUnsupported>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
Expand Down
2 changes: 1 addition & 1 deletion src/tests/JIT/Methodical/Methodical_others.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- Tracking issue: https://github.com/dotnet/runtime/issues/90427 -->
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and '$(RuntimeVariant)' == 'minifullaot'">true</CLRTestTargetUnsupported>
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and ('$(RuntimeVariant)' == 'minifullaot' or '$(RuntimeVariant)' == 'llvmfullaot')">true</CLRTestTargetUnsupported>
</PropertyGroup>
<ItemGroup>
<MergedWrapperProjectReference Include="*/**/*.??proj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<!-- Tracking issue: https://github.com/dotnet/runtime/issues/90427 -->
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and '$(RuntimeVariant)' == 'minifullaot'">true</CLRTestTargetUnsupported>
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and ('$(RuntimeVariant)' == 'minifullaot' or '$(RuntimeVariant)' == 'llvmfullaot')">true</CLRTestTargetUnsupported>
</PropertyGroup>
<ItemGroup>
<Compile Include="GitHub_26491.il" />
Expand Down
2 changes: 1 addition & 1 deletion src/tests/JIT/Regression/Regression_3.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- Tracking issue: https://github.com/dotnet/runtime/issues/90427 -->
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and '$(RuntimeVariant)' == 'minifullaot'">true</CLRTestTargetUnsupported>
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and ('$(RuntimeVariant)' == 'minifullaot' or '$(RuntimeVariant)' == 'llvmfullaot')">true</CLRTestTargetUnsupported>
</PropertyGroup>
<ItemGroup>
<MergedWrapperProjectReference Include="JitBlue/**/*.??proj" />
Expand Down
Loading

0 comments on commit ddae9bd

Please sign in to comment.