diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml index 82e413d936e92a..5818ed10d01459 100644 --- a/eng/pipelines/common/global-build-job.yml +++ b/eng/pipelines/common/global-build-job.yml @@ -37,12 +37,12 @@ parameters: jobs: - template: /eng/common/templates/job/job.yml parameters: - ${{ if eq(parameters.hostedOs, '') }}: + ${{ if eq(parameters.hostedOs, '') }}: name: ${{ format('build_{0}{1}_{2}_{3}_{4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.nameSuffix) }} - displayName: ${{ format('Build {0}{1} {2} {3} {4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.nameSuffix) }} + displayName: ${{ format('Build {0}{1} {2} {3} {4} {5}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.nameSuffix, parameters.runtimeVariant) }} ${{ if ne(parameters.hostedOs, '') }}: name: ${{ format('build_{0}{1}_{2}_{3}_{4}_{5}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.hostedOs, parameters.buildConfig, parameters.nameSuffix) }} - displayName: ${{ format('Build {0}{1} {2} {3} {4} {5}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.hostedOs, parameters.buildConfig, parameters.nameSuffix) }} + displayName: ${{ format('Build {0}{1} {2} {3} {4} {5} {6}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.hostedOs, parameters.buildConfig, parameters.nameSuffix, parameters.runtimeVariant) }} pool: ${{ parameters.pool }} container: ${{ parameters.container }} condition: and(succeeded(), ${{ parameters.condition }}) @@ -119,6 +119,21 @@ jobs: ${{ if ne(parameters.isSourceBuild, true) }}: value: '' + - name: _monoAotBuildshCommand + value: '' + + - ${{ if eq(parameters.runtimeVariant, 'llvmaot') }}: + - name: _monoAotBuildshCommand + value: 'mono_aot' + + - ${{ if eq(parameters.runtimeVariant, 'llvmfullaot') }}: + - name: _monoAotBuildshCommand + value: 'mono_fullaot' + + - ${{ if eq(parameters.archType, 'arm64') }}: + - name: _monoAotCrossCompileArg + value: 'cross' + - ${{ each variable in parameters.variables }}: - ${{ variable }} diff --git a/eng/pipelines/common/templates/runtimes/wasm-runtime-and-send-to-helix.yml b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml similarity index 50% rename from eng/pipelines/common/templates/runtimes/wasm-runtime-and-send-to-helix.yml rename to eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml index 66a634c5f74181..ea8f45aba34f09 100644 --- a/eng/pipelines/common/templates/runtimes/wasm-runtime-and-send-to-helix.yml +++ b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml @@ -13,7 +13,7 @@ parameters: stagedBuild: false displayNameArgs: '' runInUnloadableContext: false - runtimeVariant: '' + runtimeVariant: 'monointerpreter' variables: {} pool: '' dependsOn: [] @@ -26,11 +26,45 @@ parameters: gatherAssetManifests: false shouldContinueOnError: false - steps: - - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) /p:RuntimeVariant=${{ parameters.runtimeVariant }} /p:LibrariesConfiguration=${{ parameters.buildConfig }} -ci -mono os Browser wasm $(buildConfigUpper) + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) /p:RuntimeVariant=${{ parameters.runtimeVariant }} /p:LibrariesConfiguration=${{ parameters.buildConfig }} -mono -ci os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) displayName: Build Tests + + # Build a Mono LLVM AOT cross-compiler for non-amd64 targets (in this case, just arm64) + - ${{ if and(eq(parameters.runtimeFlavor, 'mono'), or(eq(parameters.runtimeVariant, 'llvmaot'), eq(parameters.runtimeVariant, 'llvmfullaot'))) }}: + - ${{ if eq(parameters.archType, 'arm64') }}: + - script: ./build.sh + -subset mono + -c ${{ parameters.buildConfig }} + -arch ${{ parameters.archType }} + /p:BuildMonoAotCrossCompiler=true + /p:BuildMonoAotCrossCompilerOnly=true + /p:MonoLibClang="/usr/lib/llvm-9/lib/libclang-9.so.1" + /p:MonoAOTEnableLLVM=true + /p:MonoAOTLLVMUseCxx11Abi=true + /p:CrossBuild=true + displayName: "Build Mono LLVM AOT cross compiler" + + - ${{ if eq(parameters.archType, 'x64') }}: + - ${{ if eq(parameters.runtimeVariant, 'llvmaot') }}: + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)MonoAot mono_aot ${{ parameters.buildConfig }} ${{ parameters.archType }} + displayName: "LLVM AOT compile CoreCLR tests" + - ${{ if eq(parameters.runtimeVariant, 'llvmfullaot') }}: + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)MonoAot mono_fullaot ${{ parameters.buildConfig }} ${{ parameters.archType }} + displayName: "LLVM AOT compile CoreCLR tests" + - ${{ if eq(parameters.archType, 'arm64') }}: + - ${{ if eq(parameters.runtimeVariant, 'llvmaot') }}: + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)MonoAot mono_aot ${{ parameters.buildConfig }} ${{ parameters.archType }} $(_monoAotCrossCompileArg) /p:RuntimeVariant=llvmfullaot -maxcpucount:2 + displayName: "LLVM AOT cross-compile CoreCLR tests" + env: + __MonoToolPrefix: aarch64-linux-gnu- + - ${{ if eq(parameters.runtimeVariant, 'llvmfullaot') }}: + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) $(logRootNameArg)MonoAot mono_fullaot ${{ parameters.buildConfig }} ${{ parameters.archType }} $(_monoAotCrossCompileArg) /p:RuntimeVariant=llvmfullaot -maxcpucount:2 + displayName: "LLVM AOT cross-compile CoreCLR tests" + env: + __MonoToolPrefix: aarch64-linux-gnu- + # Send tests to Helix - template: /eng/pipelines/common/templates/runtimes/send-to-helix-step.yml parameters: diff --git a/eng/pipelines/common/templates/wasm-runtime-tests.yml b/eng/pipelines/common/templates/wasm-runtime-tests.yml index 8c091c165debfa..7a9aa31e48d8de 100644 --- a/eng/pipelines/common/templates/wasm-runtime-tests.yml +++ b/eng/pipelines/common/templates/wasm-runtime-tests.yml @@ -47,7 +47,7 @@ jobs: or( eq(variables['alwaysRunVar'], true), eq(variables['isDefaultPipeline'], variables['shouldRunOnDefaultPipelines'])) - extraStepsTemplate: /eng/pipelines/common/templates/runtimes/wasm-runtime-and-send-to-helix.yml + extraStepsTemplate: //eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_$(_BuildConfig) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 261f3058a297e3..bfd14f29cbaada 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -1022,16 +1022,12 @@ extends: eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), eq(variables['isRollingBuild'], true)) - # - # Mono CoreCLR runtime Test executions using live libraries in jit mode - # Only when Mono is changed - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml buildConfig: release runtimeFlavor: mono platforms: - - OSX_x64 - windows_x64 helixQueueGroup: pr helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml @@ -1046,53 +1042,106 @@ extends: eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), eq(variables['isRollingBuild'], true)) + # + # Build the whole product using Mono and run runtime tests + # + - 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: + - OSX_x64 + variables: + - name: timeoutPerTestInMinutes + value: 60 + - name: timeoutPerTestCollectionInMinutes + value: 180 + jobParameters: + testGroup: innerloop + nameSuffix: AllSubsets_Mono_Minijit_RuntimeTests + runtimeVariant: minijit + buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release + timeoutInMinutes: 180 + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), + eq(variables['isRollingBuild'], true)) + + extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_Release + # # Mono CoreCLR runtime Test executions using live libraries in interpreter mode # Only when Mono is changed + - template: /eng/pipelines/common/platform-matrix.yml parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - buildConfig: release + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + buildConfig: Release runtimeFlavor: mono platforms: - - OSX_x64 - helixQueueGroup: pr - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + - OSX_x64 + variables: + - name: timeoutPerTestInMinutes + value: 60 + - name: timeoutPerTestCollectionInMinutes + value: 180 jobParameters: testGroup: innerloop - liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - liveRuntimeBuildConfig: release + nameSuffix: AllSubsets_Mono_Interpreter_RuntimeTests runtimeVariant: monointerpreter + buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release + timeoutInMinutes: 180 condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), eq(variables['isRollingBuild'], true)) + extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_Release # # Mono CoreCLR runtime Test executions using live libraries and LLVM AOT # Only when Mono is changed # - template: /eng/pipelines/common/platform-matrix.yml parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - buildConfig: release + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + buildConfig: Release runtimeFlavor: mono platforms: - - Linux_x64 - # Disabled pending outcome of https://github.com/dotnet/runtime/issues/60234 investigation - #- Linux_arm64 - helixQueueGroup: pr - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + - 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 - liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - liveRuntimeBuildConfig: release + nameSuffix: AllSubsets_Mono_LLVMAot_RuntimeTests runtimeVariant: llvmaot + buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true /p:MonoLLVMUseCxx11Abi=true + timeoutInMinutes: 180 + condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), eq(variables['isRollingBuild'], true)) + extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_Release # # Mono CoreCLR runtime Test executions using live libraries and LLVM Full AOT @@ -1100,24 +1149,34 @@ extends: # - template: /eng/pipelines/common/platform-matrix.yml parameters: - jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml - buildConfig: release + 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 - helixQueueGroup: pr - helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + - Linux_x64 + - Linux_arm64 + variables: + - name: timeoutPerTestInMinutes + value: 60 + - name: timeoutPerTestCollectionInMinutes + value: 180 jobParameters: testGroup: innerloop - liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - liveRuntimeBuildConfig: release + nameSuffix: AllSubsets_Mono_LLVMFullAot_RuntimeTests runtimeVariant: llvmfullaot + buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true /p:MonoLLVMUseCxx11Abi=true + timeoutInMinutes: 300 + condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true), eq(variables['isRollingBuild'], true)) + extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Mono_Release # # Libraries Release Test Execution against a release mono runtime. diff --git a/src/tests/Common/helixpublishwitharcade.proj b/src/tests/Common/helixpublishwitharcade.proj index 57d12bab0134ec..8a0edff8334877 100644 --- a/src/tests/Common/helixpublishwitharcade.proj +++ b/src/tests/Common/helixpublishwitharcade.proj @@ -115,6 +115,7 @@ + @@ -548,6 +549,7 @@ DestinationFile="$(MergedPayloadsRootDirectory)\%(MergedPayloads.PayloadGroup).zip" /> + $(PublishTestResults) false diff --git a/src/tests/Directory.Build.props b/src/tests/Directory.Build.props index 45d0c1ee26c874..281c43fd390f08 100644 --- a/src/tests/Directory.Build.props +++ b/src/tests/Directory.Build.props @@ -83,9 +83,11 @@ false true + llvmaot false true + llvmfullaot $(__MonoBinDir) diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets index 815d023fe212b4..7fde247fea586a 100644 --- a/src/tests/Directory.Build.targets +++ b/src/tests/Directory.Build.targets @@ -96,6 +96,7 @@ <_WillCLRTestProjectBuild Condition="'$(CLRTestBuildAllTargets)' != 'allTargets' And '$(CLRTestTargetUnsupported)' == 'true'">false <_WillCLRTestProjectBuild Condition="'$(DisableProjectBuild)' == 'true'">false <_WillCLRTestProjectBuild Condition="'$(NativeAotIncompatible)' == 'true' and '$(TestBuildMode)' == 'nativeaot'">false + <_WillCLRTestProjectBuild Condition="'$(RuntimeFlavor)' == 'mono' And '$(AlwaysUseCrossgen2)' == 'true'">false <_CopyNativeProjectBinaries Condition="'$(__CopyNativeTestBinaries)' != '1'">$(__CopyNativeProjectsAfterCombinedTestBuild) diff --git a/src/tests/issues.targets b/src/tests/issues.targets index 89b275a5427297..3af4ee76ea214b 100644 --- a/src/tests/issues.targets +++ b/src/tests/issues.targets @@ -2663,6 +2663,90 @@ https://github.com/dotnet/runtime/issues/75359 + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + + + https://github.com/dotnet/runtime/issues/75767 + @@ -2958,6 +3042,50 @@ https://github.com/dotnet/runtime/issues/75359 + + + Needs coreclr build + + + Needs coreclr build + + + Needs coreclr build + + + Needs coreclr build + + + Needs coreclr build + + + Needs coreclr build + + + Needs coreclr build + + + Needs coreclr build + + + Needs coreclr build + + + Needs coreclr build + + + Needs coreclr build + + + Needs coreclr build + + + Needs coreclr build + + + Needs coreclr build + + @@ -3027,6 +3155,12 @@ Doesn't compile with LLVM AOT. + + Fails after removing patching step: https://github.com/dotnet/runtime/pull/62863 + + + Needs coreclr build +