From ba2b392a8258242c1b6b2a33f52def33c4dc8fd4 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Thu, 9 Feb 2023 15:37:16 -0800 Subject: [PATCH 01/11] Refactor common variables used for the "send runtime tests to helix" steps into a shared template that all of our pipelines that run runtime tests can use. --- eng/common/templates/job/job.yml | 10 +- eng/pipelines/common/global-build-job.yml | 13 ++- .../build-runtime-tests-and-send-to-helix.yml | 15 +-- .../templates/runtimes/run-test-job.yml | 87 ++------------- .../templates/runtimes/test-variables.yml | 100 ++++++++++++++++++ .../common/templates/wasm-runtime-tests.yml | 7 ++ .../runtime-extra-platforms-android.yml | 7 ++ ...untime-extra-platforms-androidemulator.yml | 14 +++ .../runtime-extra-platforms-other.yml | 9 +- eng/pipelines/runtime-staging.yml | 7 ++ eng/pipelines/runtime.yml | 46 +++++++- 11 files changed, 220 insertions(+), 95 deletions(-) create mode 100644 eng/pipelines/common/templates/runtimes/test-variables.yml diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index f0af425d9f68a8..586d9962d61fa8 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -83,7 +83,7 @@ jobs: - ${{ if ne(variable.name, '') }}: - name: ${{ variable.name }} value: ${{ variable.value }} - + # handle variable groups - ${{ if ne(variable.group, '') }}: - group: ${{ variable.group }} @@ -101,7 +101,7 @@ jobs: # handle key-value variable syntax. # example: # - [key]: [value] - - ${{ if and(eq(variable.name, ''), eq(variable.group, '')) }}: + - ${{ if and(eq(variable.name, ''), eq(variable.group, ''), eq(variable.template, '')) }}: - ${{ each pair in variable }}: - name: ${{ pair.key }} value: ${{ pair.value }} @@ -164,7 +164,7 @@ jobs: - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - task: MicroBuildCleanup@1 - displayName: Execute Microbuild cleanup tasks + displayName: Execute Microbuild cleanup tasks condition: and(always(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} env: @@ -214,7 +214,7 @@ jobs: displayName: Publish XUnit Test Results inputs: testResultsFormat: 'xUnit' - testResultsFiles: '*.xml' + testResultsFiles: '*.xml' searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-xunit mergeTestResults: ${{ parameters.mergeTestResults }} @@ -225,7 +225,7 @@ jobs: displayName: Publish TRX Test Results inputs: testResultsFormat: 'VSTest' - testResultsFiles: '*.trx' + testResultsFiles: '*.trx' searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx mergeTestResults: ${{ parameters.mergeTestResults }} diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml index 49a64403a2f384..45c3174f5fcf2d 100644 --- a/eng/pipelines/common/global-build-job.yml +++ b/eng/pipelines/common/global-build-job.yml @@ -29,6 +29,7 @@ parameters: testResultsFormat: '' extraStepsTemplate: '' extraStepsParameters: {} + extraVariablesTemplates: [] enableRichCodeNavigation: false richCodeNavigationLanguage: 'csharp' richCodeNavigationEnvironment: 'production' @@ -37,7 +38,7 @@ 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('{0}{1}-{2} {3} {4} {5}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.nameSuffix, parameters.runtimeVariant) }} ${{ if ne(parameters.hostedOs, '') }}: @@ -133,7 +134,15 @@ jobs: - ${{ if eq(parameters.archType, 'arm64') }}: - name: _monoAotCrossCompileArg value: 'cross' - + + - ${{ each variableTemplate in parameters.extraVariablesTemplates }}: + - template: ${{ variableTemplate.template }} + parameters: + ${{ each parameter in variableTemplate.forwardedParameters }}: + ${{ parameter }}: ${{ parameters[parameter] }} + ${{ if ne(variableTemplate.parameters, '') }}: + ${{ insert }}: ${{ variableTemplate.parameters }} + - ${{ each variable in parameters.variables }}: - ${{ variable }} diff --git a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml index e97a76cfd9e2ad..f25e4fe85ed933 100644 --- a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml +++ b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml @@ -1,5 +1,6 @@ parameters: buildConfig: '' + osGroup: '' osSubgroup: '' container: '' testBuildArgs: '' @@ -13,6 +14,8 @@ parameters: nativeAotTest: false runtimeFlavor: 'mono' runtimeVariant: 'monointerpreter' + scenarios: + - normal variables: {} pool: '' dependsOn: [] @@ -26,15 +29,15 @@ parameters: shouldContinueOnError: false steps: - - ${{ if eq(parameters.runtimeFlavor, 'mono') }}: - - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) /p:RuntimeVariant=${{ parameters.runtimeVariant }} ${{ parameters.testBuildArgs }} -mono os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) /p:LibrariesConfiguration=${{ parameters.buildConfig }} -ci + - ${{ if eq(parameters.osGroup, 'windows') }}: + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci ${{ parameters.archType }} $(buildConfigUpper) $(runtimeFlavorArgs) $(runtimeVariantArg) ${{ parameters.testBuildArgs }} /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} $(priorityArg) displayName: Build Tests - - - ${{ if ne(parameters.runtimeFlavor, 'mono') }}: - - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ${{ parameters.archType }} $(buildConfigUpper) ${{ parameters.testBuildArgs }} -ci + - ${{ if ne(parameters.osGroup, 'windows') }}: + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) $(runtimeFlavorArgs) $(runtimeVariantArg) ${{ parameters.testBuildArgs }} /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} $(priorityArg) 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') }}: @@ -114,4 +117,4 @@ steps: helixProjectArguments: '$(Build.SourcesDirectory)/src/tests/Common/helixpublishwitharcade.proj' - scenarios: normal + scenarios: ${{ parameters.scenarios }} diff --git a/eng/pipelines/common/templates/runtimes/run-test-job.yml b/eng/pipelines/common/templates/runtimes/run-test-job.yml index 12454418098e1c..dedbde9c61b413 100644 --- a/eng/pipelines/common/templates/runtimes/run-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/run-test-job.yml @@ -97,20 +97,6 @@ jobs: - name: monoAotBuildshCommand value: 'mono_fullaot' - - name: runtimeFlavorArgs - value: '' - - - ${{ if eq(parameters.runtimeFlavor, 'mono') }}: - - name: runtimeFlavorArgs - value: '-mono' - - - name: runtimeVariantArg - value: '' - - - ${{ if ne(parameters.runtimeVariant, '') }}: - - name: runtimeVariantArg - value: '/p:RuntimeVariant=${{ parameters.runtimeVariant }}' - - name: codeFlowEnforcementArg value: '' @@ -172,71 +158,14 @@ jobs: - name: SpmiLogsLocation value: '$(Build.SourcesDirectory)/artifacts/spmi_logs/' - # Set job timeouts - # - # "timeoutPerTestCollectionInMinutes" is the time needed for the "biggest" xUnit test collection to complete. - # In case xUnit test wrappers get refactored this number should also be adjusted. - # - # "timeoutPerTestInMinutes" corresponds to individual test running time. This is implemented by setting - # the __TestTimeout variable, which is later read by the coreclr xunit test wrapper code (the code in the - # xunit test dlls that invokes the actual tests). - # - # Note that "timeoutInMinutes" is an Azure DevOps Pipelines parameter for a "job" that specifies the - # total time allowed for a job, and is specified lower down. Make sure you set it properly for any new testGroup. - # - # Please note that for Crossgen2 R2R runs, the "test running time" also includes the - # time needed to compile the test into native code with the Crossgen2 compiler. - - - name: timeoutPerTestInMinutes - value: 10 - - name: timeoutPerTestCollectionInMinutes - value: 30 - - ${{ if in(parameters.testGroup, 'outerloop') }}: - - name: timeoutPerTestCollectionInMinutes - value: 120 - - ${{ if eq(parameters.readyToRun, true) }}: - - name: timeoutPerTestCollectionInMinutes - value: 90 - - name: timeoutPerTestInMinutes - value: 30 - - ${{ if in(parameters.testGroup, 'gc-longrunning', 'gc-simulator') }}: - - name: timeoutPerTestCollectionInMinutes - value: 360 - # gc reliability may take up to 2 hours to shutdown. Some scenarios have very long iteration times. - - name: timeoutPerTestInMinutes - value: 240 - - ${{ if in(parameters.testGroup, 'jitstress', 'jitstress-random', 'jitstress-isas-arm', 'jitstress-isas-x86', 'jitstress-isas-avx512', 'jitstressregs-x86', 'jitstressregs', 'jitstress2-jitstressregs', 'jitelthookenabled' ) }}: - - name: timeoutPerTestCollectionInMinutes - value: 120 - - name: timeoutPerTestInMinutes - value: 30 - - ${{ if in(parameters.testGroup, 'gcstress0x3-gcstress0xc') }}: - - name: timeoutPerTestCollectionInMinutes - value: 240 - - name: timeoutPerTestInMinutes - value: 60 - - ${{ if in(parameters.testGroup, 'gcstress-extra', 'r2r-extra') }}: - - name: timeoutPerTestCollectionInMinutes - value: 300 - - name: timeoutPerTestInMinutes - value: 90 - - ${{ if eq(parameters.testGroup, 'ilasm') }}: - # ilasm-ildasm round trip testing runs every test twice, plus runs ilasm and ildasm, so double the 'outerloop' timeout numbers. - - name: timeoutPerTestInMinutes - value: 20 - - name: timeoutPerTestCollectionInMinutes - value: 240 - - ${{ if in(parameters.testGroup, 'clrinterpreter') }}: - - name: timeoutPerTestCollectionInMinutes - value: 180 - - name: timeoutPerTestInMinutes - value: 30 - - ${{ if in(parameters.testGroup, 'pgo', 'pgostress') }}: - - name: timeoutPerTestCollectionInMinutes - value: 120 - - ${{ if in(parameters.testGroup, 'jit-cfg') }}: - - name: timeoutPerTestCollectionInMinutes - value: 120 + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + parameters: + osGroup: ${{ parameters.osGroup }} + osSubgroup: ${{ parameters.osSubgroup }} + testGroup: ${{ parameters.testGroup }} + readyToRun: ${{ parameters.readyToRun }} + runtimeFlavor: ${{ parameters.runtimeFlavor }} + runtimeVariant: ${{ parameters.runtimeVariant }} - ${{ if eq(parameters.compositeBuildMode, true) }}: - name: crossgenArg diff --git a/eng/pipelines/common/templates/runtimes/test-variables.yml b/eng/pipelines/common/templates/runtimes/test-variables.yml new file mode 100644 index 00000000000000..0518f85e4204ff --- /dev/null +++ b/eng/pipelines/common/templates/runtimes/test-variables.yml @@ -0,0 +1,100 @@ +parameters: + testGroup: '' + readyToRun: false + runtimeFlavor: '' + runtimeVariant: '' + +variables: + + # Set job timeouts + # + # "timeoutPerTestCollectionInMinutes" is the time needed for the "biggest" xUnit test collection to complete. + # In case xUnit test wrappers get refactored this number should also be adjusted. + # + # "timeoutPerTestInMinutes" corresponds to individual test running time. This is implemented by setting + # the __TestTimeout variable, which is later read by the coreclr xunit test wrapper code (the code in the + # xunit test dlls that invokes the actual tests). + # + # Note that "timeoutInMinutes" is an Azure DevOps Pipelines parameter for a "job" that specifies the + # total time allowed for a job, and is specified lower down. Make sure you set it properly for any new testGroup. + # + # Please note that for Crossgen2 R2R runs, the "test running time" also includes the + # time needed to compile the test into native code with the Crossgen2 compiler. + + - name: timeoutPerTestInMinutes + value: 10 + - name: timeoutPerTestCollectionInMinutes + value: 30 + - ${{ if in(parameters.testGroup, 'outerloop') }}: + - name: timeoutPerTestCollectionInMinutes + value: 120 + - ${{ if eq(parameters.readyToRun, true) }}: + - name: timeoutPerTestCollectionInMinutes + value: 90 + - name: timeoutPerTestInMinutes + value: 30 + - ${{ if in(parameters.testGroup, 'gc-longrunning', 'gc-simulator') }}: + - name: timeoutPerTestCollectionInMinutes + value: 360 + # gc reliability may take up to 2 hours to shutdown. Some scenarios have very long iteration times. + - name: timeoutPerTestInMinutes + value: 240 + - ${{ if in(parameters.testGroup, 'jitstress', 'jitstress-random', 'jitstress-isas-arm', 'jitstress-isas-x86', 'jitstress-isas-avx512', 'jitstressregs-x86', 'jitstressregs', 'jitstress2-jitstressregs', 'jitelthookenabled' ) }}: + - name: timeoutPerTestCollectionInMinutes + value: 120 + - name: timeoutPerTestInMinutes + value: 30 + - ${{ if in(parameters.testGroup, 'gcstress0x3-gcstress0xc') }}: + - name: timeoutPerTestCollectionInMinutes + value: 240 + - name: timeoutPerTestInMinutes + value: 60 + - ${{ if in(parameters.testGroup, 'gcstress-extra', 'r2r-extra') }}: + - name: timeoutPerTestCollectionInMinutes + value: 300 + - name: timeoutPerTestInMinutes + value: 90 + - ${{ if eq(parameters.testGroup, 'ilasm') }}: + # ilasm-ildasm round trip testing runs every test twice, plus runs ilasm and ildasm, so double the 'outerloop' timeout numbers. + - name: timeoutPerTestInMinutes + value: 20 + - name: timeoutPerTestCollectionInMinutes + value: 240 + - ${{ if in(parameters.testGroup, 'clrinterpreter') }}: + - name: timeoutPerTestCollectionInMinutes + value: 180 + - name: timeoutPerTestInMinutes + value: 30 + - ${{ if in(parameters.testGroup, 'pgo', 'pgostress') }}: + - name: timeoutPerTestCollectionInMinutes + value: 120 + - ${{ if in(parameters.testGroup, 'jit-cfg') }}: + - name: timeoutPerTestCollectionInMinutes + value: 120 + + - name: runtimeFlavorArgs + value: '' + + - ${{ if eq(parameters.runtimeFlavor, 'mono') }}: + - name: runtimeFlavorArgs + value: '-mono' + + - name: runtimeVariantArg + value: '' + + - ${{ if ne(parameters.runtimeVariant, '') }}: + - name: runtimeVariantArg + value: '/p:RuntimeVariant=${{ parameters.runtimeVariant }}' + + - name: priorityArg + value: '' + + # 'innerloop' and 'clrinterpreter' jobs run the Priority 0 tests; everything else runs the Priority 1 tests. + # 'gc-standalone' is forced to run pri0 as well to start with. + - ${{ if and(ne(parameters.testGroup, 'innerloop'), ne(parameters.testGroup, 'clrinterpreter'), ne(parameters.testGroup, 'gc-standalone'), ne(parameters.testGroup, 'gc-standalone-server') ) }}: + - ${{ if ne(parameters.osGroup, 'windows') }}: + - name: priorityArg + value: 'priority1' + - ${{ if eq(parameters.osGroup, 'windows') }}: + - name: priorityArg + value: '-priority=1' diff --git a/eng/pipelines/common/templates/wasm-runtime-tests.yml b/eng/pipelines/common/templates/wasm-runtime-tests.yml index 2808afd2f8b90f..c92aa584c20de9 100644 --- a/eng/pipelines/common/templates/wasm-runtime-tests.yml +++ b/eng/pipelines/common/templates/wasm-runtime-tests.yml @@ -44,3 +44,10 @@ jobs: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_$(_BuildConfig) + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml index 913b97751d01d1..aacf7c024fc822 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml @@ -48,6 +48,13 @@ jobs: # extraStepsParameters: # creator: dotnet-bot # testRunNamePrefixSuffix: Mono_$(_BuildConfig) + # extraVariablesTemplates: + # - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + # forwardedParameters: + # - osGroup + # - osSubgroup + # - runtimeFlavor + # - runtimeVariant # # Android devices diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml index 635455cb2e060d..28828a6475cc06 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml @@ -44,6 +44,13 @@ jobs: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_$(_BuildConfig) + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant # # Build the whole product using Mono for Android and run runtime tests with interpreter @@ -80,6 +87,13 @@ jobs: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_$(_BuildConfig) + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant # # Android emulators diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml index 60a18fc9b6f7da..43c14c7114edd6 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml @@ -276,7 +276,7 @@ jobs: 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 /p:MonoLLVMUseCxx11Abi=true + buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true /p:MonoLLVMUseCxx11Abi=true timeoutInMinutes: 300 condition: >- @@ -288,6 +288,13 @@ jobs: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_Release + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant # # Mono CoreCLR runtime Test executions using live libraries in interpreter mode diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml index 5d4de5af698682..3221d6c0fc21d6 100644 --- a/eng/pipelines/runtime-staging.yml +++ b/eng/pipelines/runtime-staging.yml @@ -102,3 +102,10 @@ extends: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_$(_BuildConfig) + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index f6772eb7f5b292..e4c7aff9209ee5 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -215,6 +215,13 @@ extends: creator: dotnet-bot testBuildArgs: nativeaot tree nativeaot testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -247,6 +254,13 @@ extends: creator: dotnet-bot testBuildArgs: nativeaot tree nativeaot /p:BuildNativeAotFrameworkObjects=true testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -281,6 +295,13 @@ extends: creator: dotnet-bot testBuildArgs: nativeaot tree nativeaot testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -750,7 +771,7 @@ extends: eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true), eq(variables['isRollingBuild'], true)) - + - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/mono/templates/build-job.yml @@ -1140,6 +1161,13 @@ extends: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_Release + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant # # Mono CoreCLR runtime Test executions using live libraries in interpreter mode @@ -1173,6 +1201,13 @@ extends: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_Release + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant # # Mono CoreCLR runtime Test executions using live libraries and LLVM AOT # Only when Mono is changed @@ -1196,7 +1231,7 @@ extends: testGroup: innerloop 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 + buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true /p:MonoLLVMUseCxx11Abi=true timeoutInMinutes: 180 condition: >- @@ -1208,6 +1243,13 @@ extends: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_Release + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant # # Libraries Release Test Execution against a release mono runtime. From 22e2c8ea88227cbaf15c57648d3c8a3d9c0c951f Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Thu, 9 Feb 2023 16:18:06 -0800 Subject: [PATCH 02/11] Move parameters around so all "processed/known" args are passed first before any MSBuild properties --- .../runtimes/build-runtime-tests-and-send-to-helix.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml index f25e4fe85ed933..d5424b167ef8df 100644 --- a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml +++ b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml @@ -30,10 +30,10 @@ parameters: steps: - ${{ if eq(parameters.osGroup, 'windows') }}: - - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci ${{ parameters.archType }} $(buildConfigUpper) $(runtimeFlavorArgs) $(runtimeVariantArg) ${{ parameters.testBuildArgs }} /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} $(priorityArg) + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) ${{ parameters.testBuildArgs }} $(runtimeFlavorArgs) $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} displayName: Build Tests - ${{ if ne(parameters.osGroup, 'windows') }}: - - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) $(runtimeFlavorArgs) $(runtimeVariantArg) ${{ parameters.testBuildArgs }} /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} $(priorityArg) + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) ${{ parameters.testBuildArgs }} $(runtimeFlavorArgs) $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} displayName: Build Tests From b63a81af11af73cc4aa02dd4f6b5d1c77bd2cd89 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Thu, 9 Feb 2023 16:21:24 -0800 Subject: [PATCH 03/11] Move runtimeFlavor before testBuildArgs so testBuildArgs can end with MSBuild properties --- .../runtimes/build-runtime-tests-and-send-to-helix.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml index d5424b167ef8df..651ecdeed5b4f6 100644 --- a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml +++ b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml @@ -30,10 +30,10 @@ parameters: steps: - ${{ if eq(parameters.osGroup, 'windows') }}: - - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) ${{ parameters.testBuildArgs }} $(runtimeFlavorArgs) $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} displayName: Build Tests - ${{ if ne(parameters.osGroup, 'windows') }}: - - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) ${{ parameters.testBuildArgs }} $(runtimeFlavorArgs) $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} displayName: Build Tests From 59c4e2a824e94daf099a707baffafe4cb66288e3 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Fri, 10 Feb 2023 14:58:41 -0800 Subject: [PATCH 04/11] Pass variables with the extra steps template. --- eng/pipelines/common/global-build-job.yml | 28 ++- .../build-runtime-tests-and-send-to-helix.yml | 192 +++++++++--------- .../coreclr/nativeaot-post-build-steps.yml | 58 ++++-- .../runtime-extra-platforms-android.yml | 8 +- ...untime-extra-platforms-androidemulator.yml | 16 +- .../runtime-extra-platforms-other.yml | 8 +- eng/pipelines/runtime-staging.yml | 8 +- eng/pipelines/runtime.yml | 48 +---- 8 files changed, 171 insertions(+), 195 deletions(-) diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml index 45c3174f5fcf2d..2073b1ce1676f7 100644 --- a/eng/pipelines/common/global-build-job.yml +++ b/eng/pipelines/common/global-build-job.yml @@ -29,7 +29,7 @@ parameters: testResultsFormat: '' extraStepsTemplate: '' extraStepsParameters: {} - extraVariablesTemplates: [] + extraStepsTemplateHasVariables: false enableRichCodeNavigation: false richCodeNavigationLanguage: 'csharp' richCodeNavigationEnvironment: 'production' @@ -135,13 +135,24 @@ jobs: - name: _monoAotCrossCompileArg value: 'cross' - - ${{ each variableTemplate in parameters.extraVariablesTemplates }}: - - template: ${{ variableTemplate.template }} - parameters: - ${{ each parameter in variableTemplate.forwardedParameters }}: - ${{ parameter }}: ${{ parameters[parameter] }} - ${{ if ne(variableTemplate.parameters, '') }}: - ${{ insert }}: ${{ variableTemplate.parameters }} + # If intended to send extra steps after regular build add variables for the steps here. + - ${{ if and(ne(parameters.extraStepsTemplate, ''), eq(parameters.extraStepsTemplateHasVariables, true)) }}: + - template: ${{ parameters.extraStepsTemplate }} + parameters: + templateKind: 'variables' + osGroup: ${{ parameters.osGroup }} + osSubgroup: ${{ parameters.osSubgroup }} + archType: ${{ parameters.archType }} + buildConfig: ${{ parameters.buildConfig }} + runtimeFlavor: ${{ parameters.runtimeFlavor }} + runtimeVariant: ${{ parameters.runtimeVariant }} + helixQueues: ${{ parameters.helixQueues }} + targetRid: ${{ parameters.targetRid }} + nameSuffix: ${{ parameters.nameSuffix }} + platform: ${{ parameters.platform }} + pgoType: ${{ parameters.pgoType }} + shouldContinueOnError: ${{ parameters.shouldContinueOnError }} + ${{ insert }}: ${{ parameters.extraStepsParameters }} - ${{ each variable in parameters.variables }}: - ${{ variable }} @@ -214,6 +225,7 @@ jobs: - ${{ if ne(parameters.extraStepsTemplate, '') }}: - template: ${{ parameters.extraStepsTemplate }} parameters: + templateKind: 'steps' osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} archType: ${{ parameters.archType }} diff --git a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml index 651ecdeed5b4f6..fb446072c78a3c 100644 --- a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml +++ b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml @@ -27,94 +27,104 @@ parameters: enableMicrobuild: '' gatherAssetManifests: false shouldContinueOnError: false - -steps: - - ${{ if eq(parameters.osGroup, 'windows') }}: - - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} - displayName: Build Tests - - ${{ if ne(parameters.osGroup, 'windows') }}: - - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} - 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: - displayName: Send tests to Helix - buildConfig: $(buildConfigUpper) - archType: ${{ parameters.archType }} - osGroup: ${{ parameters.osGroup }} - osSubgroup: ${{ parameters.osSubgroup}} - coreClrRepoRoot: $(Build.SourcesDirectory)/src/coreclr - shouldContinueOnError: ${{ parameters.shouldContinueOnError }} - runtimeFlavor: ${{ parameters.runtimeFlavor }} - runtimeVariant: ${{ parameters.runtimeVariant }} - - ${{ if eq(variables['System.TeamProject'], 'public') }}: - creator: $(Build.DefinitionName) - - helixBuild: $(Build.BuildNumber) - helixSource: $(_HelixSource) - - ${{ if ne(parameters.readyToRun, true) }}: - helixType: 'test/functional/cli/' - - helixQueues: ${{ parameters.helixQueues }} - - # This tests whether an array is empty - ${{ if eq(join('', parameters.helixQueues), '') }}: - condition: false - - publishTestResults: true - - timeoutPerTestInMinutes: $(timeoutPerTestInMinutes) - timeoutPerTestCollectionInMinutes: $(timeoutPerTestCollectionInMinutes) - - runCrossGen2: ${{ eq(parameters.readyToRun, true) }} - compositeBuildMode: ${{ parameters.compositeBuildMode }} - runInUnloadableContext: ${{ parameters.runInUnloadableContext }} - nativeAotTest: ${{ parameters.nativeAotTest }} - - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - # Access token variable for internal project from the - # DotNet-HelixApi-Access variable group - helixAccessToken: $(HelixApiAccessToken) - - helixProjectArguments: '$(Build.SourcesDirectory)/src/tests/Common/helixpublishwitharcade.proj' - - scenarios: ${{ parameters.scenarios }} + templateKind: '' + + +${{ if eq(parameters.templateKind, 'variables') }}: + variables: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + parameters: + osGroup: ${{ parameters.osGroup }} + osSubgroup: ${{ parameters.osSubgroup }} + runtimeFlavor: ${{ parameters.runtimeFlavor }} + runtimeVariant: ${{ parameters.runtimeVariant }} + +${{ if eq(parameters.templateKind, 'steps') }}: + steps: + - ${{ if eq(parameters.osGroup, 'windows') }}: + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} + displayName: Build Tests + - ${{ if ne(parameters.osGroup, 'windows') }}: + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} + 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: + displayName: Send tests to Helix + buildConfig: $(buildConfigUpper) + archType: ${{ parameters.archType }} + osGroup: ${{ parameters.osGroup }} + osSubgroup: ${{ parameters.osSubgroup}} + coreClrRepoRoot: $(Build.SourcesDirectory)/src/coreclr + shouldContinueOnError: ${{ parameters.shouldContinueOnError }} + runtimeFlavor: ${{ parameters.runtimeFlavor }} + runtimeVariant: ${{ parameters.runtimeVariant }} + + ${{ if eq(variables['System.TeamProject'], 'public') }}: + creator: $(Build.DefinitionName) + + helixBuild: $(Build.BuildNumber) + helixSource: $(_HelixSource) + + ${{ if ne(parameters.readyToRun, true) }}: + helixType: 'test/functional/cli/' + + helixQueues: ${{ parameters.helixQueues }} + + # This tests whether an array is empty + ${{ if eq(join('', parameters.helixQueues), '') }}: + condition: false + + publishTestResults: true + + timeoutPerTestInMinutes: $(timeoutPerTestInMinutes) + timeoutPerTestCollectionInMinutes: $(timeoutPerTestCollectionInMinutes) + + runCrossGen2: ${{ eq(parameters.readyToRun, true) }} + compositeBuildMode: ${{ parameters.compositeBuildMode }} + runInUnloadableContext: ${{ parameters.runInUnloadableContext }} + nativeAotTest: ${{ parameters.nativeAotTest }} + + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + # Access token variable for internal project from the + # DotNet-HelixApi-Access variable group + helixAccessToken: $(HelixApiAccessToken) + + helixProjectArguments: '$(Build.SourcesDirectory)/src/tests/Common/helixpublishwitharcade.proj' + + scenarios: ${{ parameters.scenarios }} diff --git a/eng/pipelines/coreclr/nativeaot-post-build-steps.yml b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml index 3864d28f4e06d6..fe77943f58ada6 100644 --- a/eng/pipelines/coreclr/nativeaot-post-build-steps.yml +++ b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml @@ -5,25 +5,45 @@ parameters: osSubgroup: '' testBuildArgs: '' helixQueues: '' + templateKind: '' -steps: -# Can't run arm/arm64 tests on x64 build machines -- ${{ if and(ne(parameters.archType, 'arm'), ne(parameters.archType, 'arm64')) }}: +${{ if eq(parameters.templateKind, 'variables') }}: + variables: + - ${{ if and(ne(parameters.archType, 'arm'), ne(parameters.archType, 'arm64')) }}: + # Include variables required for the build-runtime-tests-and-send-to-helix steps. + - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml + parameters: + buildConfig: ${{ parameters.buildConfig }} + archType: ${{ parameters.archType }} + osGroup: ${{ parameters.osGroup }} + osSubgroup: ${{ parameters.osSubgroup }} + runtimeFlavor: coreclr + runtimeVariant: '' + testBuildArgs: ${{ parameters.testBuildArgs }} + nativeAotTest: true + helixQueues: ${{ parameters.helixQueues }} + templateKind: ${{ parameters.templateKind }} - # Build coreclr native test output and send to helix - - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml - parameters: - buildConfig: ${{ parameters.buildConfig }} - archType: ${{ parameters.archType }} - osGroup: ${{ parameters.osGroup }} - osSubgroup: ${{ parameters.osSubgroup }} - runtimeFlavor: coreclr - runtimeVariant: '' - testBuildArgs: ${{ parameters.testBuildArgs }} - nativeAotTest: true - helixQueues: ${{ parameters.helixQueues }} +${{ if eq(parameters.templateKind, 'steps') }}: + steps: + # Can't run arm/arm64 tests on x64 build machines + - ${{ if and(ne(parameters.archType, 'arm'), ne(parameters.archType, 'arm64')) }}: - # Publishing tooling doesn't support different configs between runtime and libs, so only run tests in Release config - - ${{ if eq(parameters.buildConfig, 'release') }}: - - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) -s libs.tests -c $(_BuildConfig) /p:TestAssemblies=false /p:RunNativeAotTestApps=true $(_officialBuildParameter) $(_crossBuildPropertyArg) /bl:$(Build.SourcesDirectory)/artifacts/log/$(buildConfigUpper)/NativeAotTests.binlog ${{ parameters.extraTestArgs }} - displayName: Run NativeAot Library Tests + # Build coreclr native test output and send to helix + - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml + parameters: + buildConfig: ${{ parameters.buildConfig }} + archType: ${{ parameters.archType }} + osGroup: ${{ parameters.osGroup }} + osSubgroup: ${{ parameters.osSubgroup }} + runtimeFlavor: coreclr + runtimeVariant: '' + testBuildArgs: ${{ parameters.testBuildArgs }} + nativeAotTest: true + helixQueues: ${{ parameters.helixQueues }} + templateKind: ${{ parameters.templateKind }} + + # Publishing tooling doesn't support different configs between runtime and libs, so only run tests in Release config + - ${{ if eq(parameters.buildConfig, 'release') }}: + - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) -s libs.tests -c $(_BuildConfig) /p:TestAssemblies=false /p:RunNativeAotTestApps=true $(_officialBuildParameter) $(_crossBuildPropertyArg) /bl:$(Build.SourcesDirectory)/artifacts/log/$(buildConfigUpper)/NativeAotTests.binlog ${{ parameters.extraTestArgs }} + displayName: Run NativeAot Library Tests diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml index aacf7c024fc822..fee386f811544f 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml @@ -48,13 +48,7 @@ jobs: # extraStepsParameters: # creator: dotnet-bot # testRunNamePrefixSuffix: Mono_$(_BuildConfig) - # extraVariablesTemplates: - # - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - # forwardedParameters: - # - osGroup - # - osSubgroup - # - runtimeFlavor - # - runtimeVariant + # extraStepsTemplateHasVariables: true # # Android devices diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml index 28828a6475cc06..d20ee240004d3d 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml @@ -44,13 +44,7 @@ jobs: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_$(_BuildConfig) - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant + extraStepsTemplateHasVariables: true # # Build the whole product using Mono for Android and run runtime tests with interpreter @@ -87,13 +81,7 @@ jobs: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_$(_BuildConfig) - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant + extraStepsTemplateHasVariables: true # # Android emulators diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml index 43c14c7114edd6..8bf4c1366c6a35 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml @@ -288,13 +288,7 @@ jobs: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_Release - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant + extraStepsTemplateHasVariables: true # # Mono CoreCLR runtime Test executions using live libraries in interpreter mode diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml index 3221d6c0fc21d6..82c65362b460bf 100644 --- a/eng/pipelines/runtime-staging.yml +++ b/eng/pipelines/runtime-staging.yml @@ -102,10 +102,4 @@ extends: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_$(_BuildConfig) - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant + extraStepsTemplateHasVariables: true diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index e4c7aff9209ee5..5caca5b5411fe2 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -214,14 +214,8 @@ extends: extraStepsParameters: creator: dotnet-bot testBuildArgs: nativeaot tree nativeaot + extraStepsTemplateHasVariables: true testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -253,14 +247,8 @@ extends: extraStepsParameters: creator: dotnet-bot testBuildArgs: nativeaot tree nativeaot /p:BuildNativeAotFrameworkObjects=true + extraStepsTemplateHasVariables: true testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -294,14 +282,8 @@ extends: extraStepsParameters: creator: dotnet-bot testBuildArgs: nativeaot tree nativeaot + extraStepsTemplateHasVariables: true testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -1160,14 +1142,8 @@ extends: extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml extraStepsParameters: creator: dotnet-bot + extraStepsTemplateHasVariables: true testRunNamePrefixSuffix: Mono_Release - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant # # Mono CoreCLR runtime Test executions using live libraries in interpreter mode @@ -1200,14 +1176,8 @@ extends: extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml extraStepsParameters: creator: dotnet-bot + extraStepsTemplateHasVariables: true testRunNamePrefixSuffix: Mono_Release - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant # # Mono CoreCLR runtime Test executions using live libraries and LLVM AOT # Only when Mono is changed @@ -1242,14 +1212,8 @@ extends: extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml extraStepsParameters: creator: dotnet-bot + extraStepsTemplateHasVariables: true testRunNamePrefixSuffix: Mono_Release - extraVariablesTemplates: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant # # Libraries Release Test Execution against a release mono runtime. From 5be8aa381f56092edfad5a70a276beb4cb63af61 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Fri, 10 Feb 2023 15:02:03 -0800 Subject: [PATCH 05/11] Fix indentation --- eng/pipelines/common/global-build-job.yml | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml index 2073b1ce1676f7..1abec4100069d6 100644 --- a/eng/pipelines/common/global-build-job.yml +++ b/eng/pipelines/common/global-build-job.yml @@ -135,24 +135,24 @@ jobs: - name: _monoAotCrossCompileArg value: 'cross' - # If intended to send extra steps after regular build add variables for the steps here. - - ${{ if and(ne(parameters.extraStepsTemplate, ''), eq(parameters.extraStepsTemplateHasVariables, true)) }}: - - template: ${{ parameters.extraStepsTemplate }} - parameters: - templateKind: 'variables' - osGroup: ${{ parameters.osGroup }} - osSubgroup: ${{ parameters.osSubgroup }} - archType: ${{ parameters.archType }} - buildConfig: ${{ parameters.buildConfig }} - runtimeFlavor: ${{ parameters.runtimeFlavor }} - runtimeVariant: ${{ parameters.runtimeVariant }} - helixQueues: ${{ parameters.helixQueues }} - targetRid: ${{ parameters.targetRid }} - nameSuffix: ${{ parameters.nameSuffix }} - platform: ${{ parameters.platform }} - pgoType: ${{ parameters.pgoType }} - shouldContinueOnError: ${{ parameters.shouldContinueOnError }} - ${{ insert }}: ${{ parameters.extraStepsParameters }} + # If intended to send extra steps after regular build add variables for the steps here. + - ${{ if and(ne(parameters.extraStepsTemplate, ''), eq(parameters.extraStepsTemplateHasVariables, true)) }}: + - template: ${{ parameters.extraStepsTemplate }} + parameters: + templateKind: 'variables' + osGroup: ${{ parameters.osGroup }} + osSubgroup: ${{ parameters.osSubgroup }} + archType: ${{ parameters.archType }} + buildConfig: ${{ parameters.buildConfig }} + runtimeFlavor: ${{ parameters.runtimeFlavor }} + runtimeVariant: ${{ parameters.runtimeVariant }} + helixQueues: ${{ parameters.helixQueues }} + targetRid: ${{ parameters.targetRid }} + nameSuffix: ${{ parameters.nameSuffix }} + platform: ${{ parameters.platform }} + pgoType: ${{ parameters.pgoType }} + shouldContinueOnError: ${{ parameters.shouldContinueOnError }} + ${{ insert }}: ${{ parameters.extraStepsParameters }} - ${{ each variable in parameters.variables }}: - ${{ variable }} From 857d96e81007eac7384fa65be56165ac30c66cc0 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Fri, 10 Feb 2023 15:08:54 -0800 Subject: [PATCH 06/11] Revert "Fix indentation" This reverts commit 5be8aa381f56092edfad5a70a276beb4cb63af61. --- eng/pipelines/common/global-build-job.yml | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml index 1abec4100069d6..2073b1ce1676f7 100644 --- a/eng/pipelines/common/global-build-job.yml +++ b/eng/pipelines/common/global-build-job.yml @@ -135,24 +135,24 @@ jobs: - name: _monoAotCrossCompileArg value: 'cross' - # If intended to send extra steps after regular build add variables for the steps here. - - ${{ if and(ne(parameters.extraStepsTemplate, ''), eq(parameters.extraStepsTemplateHasVariables, true)) }}: - - template: ${{ parameters.extraStepsTemplate }} - parameters: - templateKind: 'variables' - osGroup: ${{ parameters.osGroup }} - osSubgroup: ${{ parameters.osSubgroup }} - archType: ${{ parameters.archType }} - buildConfig: ${{ parameters.buildConfig }} - runtimeFlavor: ${{ parameters.runtimeFlavor }} - runtimeVariant: ${{ parameters.runtimeVariant }} - helixQueues: ${{ parameters.helixQueues }} - targetRid: ${{ parameters.targetRid }} - nameSuffix: ${{ parameters.nameSuffix }} - platform: ${{ parameters.platform }} - pgoType: ${{ parameters.pgoType }} - shouldContinueOnError: ${{ parameters.shouldContinueOnError }} - ${{ insert }}: ${{ parameters.extraStepsParameters }} + # If intended to send extra steps after regular build add variables for the steps here. + - ${{ if and(ne(parameters.extraStepsTemplate, ''), eq(parameters.extraStepsTemplateHasVariables, true)) }}: + - template: ${{ parameters.extraStepsTemplate }} + parameters: + templateKind: 'variables' + osGroup: ${{ parameters.osGroup }} + osSubgroup: ${{ parameters.osSubgroup }} + archType: ${{ parameters.archType }} + buildConfig: ${{ parameters.buildConfig }} + runtimeFlavor: ${{ parameters.runtimeFlavor }} + runtimeVariant: ${{ parameters.runtimeVariant }} + helixQueues: ${{ parameters.helixQueues }} + targetRid: ${{ parameters.targetRid }} + nameSuffix: ${{ parameters.nameSuffix }} + platform: ${{ parameters.platform }} + pgoType: ${{ parameters.pgoType }} + shouldContinueOnError: ${{ parameters.shouldContinueOnError }} + ${{ insert }}: ${{ parameters.extraStepsParameters }} - ${{ each variable in parameters.variables }}: - ${{ variable }} From f1ee4362a09b0d2e4cf2ad8e06c676b8d55e2b25 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Fri, 10 Feb 2023 15:09:00 -0800 Subject: [PATCH 07/11] Revert "Pass variables with the extra steps template." This reverts commit 59c4e2a824e94daf099a707baffafe4cb66288e3. --- eng/pipelines/common/global-build-job.yml | 28 +-- .../build-runtime-tests-and-send-to-helix.yml | 192 +++++++++--------- .../coreclr/nativeaot-post-build-steps.yml | 58 ++---- .../runtime-extra-platforms-android.yml | 8 +- ...untime-extra-platforms-androidemulator.yml | 16 +- .../runtime-extra-platforms-other.yml | 8 +- eng/pipelines/runtime-staging.yml | 8 +- eng/pipelines/runtime.yml | 48 ++++- 8 files changed, 195 insertions(+), 171 deletions(-) diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml index 2073b1ce1676f7..45c3174f5fcf2d 100644 --- a/eng/pipelines/common/global-build-job.yml +++ b/eng/pipelines/common/global-build-job.yml @@ -29,7 +29,7 @@ parameters: testResultsFormat: '' extraStepsTemplate: '' extraStepsParameters: {} - extraStepsTemplateHasVariables: false + extraVariablesTemplates: [] enableRichCodeNavigation: false richCodeNavigationLanguage: 'csharp' richCodeNavigationEnvironment: 'production' @@ -135,24 +135,13 @@ jobs: - name: _monoAotCrossCompileArg value: 'cross' - # If intended to send extra steps after regular build add variables for the steps here. - - ${{ if and(ne(parameters.extraStepsTemplate, ''), eq(parameters.extraStepsTemplateHasVariables, true)) }}: - - template: ${{ parameters.extraStepsTemplate }} - parameters: - templateKind: 'variables' - osGroup: ${{ parameters.osGroup }} - osSubgroup: ${{ parameters.osSubgroup }} - archType: ${{ parameters.archType }} - buildConfig: ${{ parameters.buildConfig }} - runtimeFlavor: ${{ parameters.runtimeFlavor }} - runtimeVariant: ${{ parameters.runtimeVariant }} - helixQueues: ${{ parameters.helixQueues }} - targetRid: ${{ parameters.targetRid }} - nameSuffix: ${{ parameters.nameSuffix }} - platform: ${{ parameters.platform }} - pgoType: ${{ parameters.pgoType }} - shouldContinueOnError: ${{ parameters.shouldContinueOnError }} - ${{ insert }}: ${{ parameters.extraStepsParameters }} + - ${{ each variableTemplate in parameters.extraVariablesTemplates }}: + - template: ${{ variableTemplate.template }} + parameters: + ${{ each parameter in variableTemplate.forwardedParameters }}: + ${{ parameter }}: ${{ parameters[parameter] }} + ${{ if ne(variableTemplate.parameters, '') }}: + ${{ insert }}: ${{ variableTemplate.parameters }} - ${{ each variable in parameters.variables }}: - ${{ variable }} @@ -225,7 +214,6 @@ jobs: - ${{ if ne(parameters.extraStepsTemplate, '') }}: - template: ${{ parameters.extraStepsTemplate }} parameters: - templateKind: 'steps' osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} archType: ${{ parameters.archType }} diff --git a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml index fb446072c78a3c..651ecdeed5b4f6 100644 --- a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml +++ b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml @@ -27,104 +27,94 @@ parameters: enableMicrobuild: '' gatherAssetManifests: false shouldContinueOnError: false - templateKind: '' - - -${{ if eq(parameters.templateKind, 'variables') }}: - variables: - - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - parameters: - osGroup: ${{ parameters.osGroup }} - osSubgroup: ${{ parameters.osSubgroup }} - runtimeFlavor: ${{ parameters.runtimeFlavor }} - runtimeVariant: ${{ parameters.runtimeVariant }} - -${{ if eq(parameters.templateKind, 'steps') }}: - steps: - - ${{ if eq(parameters.osGroup, 'windows') }}: - - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} - displayName: Build Tests - - ${{ if ne(parameters.osGroup, 'windows') }}: - - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} - 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: - displayName: Send tests to Helix - buildConfig: $(buildConfigUpper) - archType: ${{ parameters.archType }} - osGroup: ${{ parameters.osGroup }} - osSubgroup: ${{ parameters.osSubgroup}} - coreClrRepoRoot: $(Build.SourcesDirectory)/src/coreclr - shouldContinueOnError: ${{ parameters.shouldContinueOnError }} - runtimeFlavor: ${{ parameters.runtimeFlavor }} - runtimeVariant: ${{ parameters.runtimeVariant }} - - ${{ if eq(variables['System.TeamProject'], 'public') }}: - creator: $(Build.DefinitionName) - - helixBuild: $(Build.BuildNumber) - helixSource: $(_HelixSource) - - ${{ if ne(parameters.readyToRun, true) }}: - helixType: 'test/functional/cli/' - - helixQueues: ${{ parameters.helixQueues }} - - # This tests whether an array is empty - ${{ if eq(join('', parameters.helixQueues), '') }}: - condition: false - - publishTestResults: true - - timeoutPerTestInMinutes: $(timeoutPerTestInMinutes) - timeoutPerTestCollectionInMinutes: $(timeoutPerTestCollectionInMinutes) - - runCrossGen2: ${{ eq(parameters.readyToRun, true) }} - compositeBuildMode: ${{ parameters.compositeBuildMode }} - runInUnloadableContext: ${{ parameters.runInUnloadableContext }} - nativeAotTest: ${{ parameters.nativeAotTest }} - - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - # Access token variable for internal project from the - # DotNet-HelixApi-Access variable group - helixAccessToken: $(HelixApiAccessToken) - - helixProjectArguments: '$(Build.SourcesDirectory)/src/tests/Common/helixpublishwitharcade.proj' - - scenarios: ${{ parameters.scenarios }} + +steps: + - ${{ if eq(parameters.osGroup, 'windows') }}: + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} + displayName: Build Tests + - ${{ if ne(parameters.osGroup, 'windows') }}: + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) ci os ${{ parameters.osGroup }} ${{ parameters.archType }} $(buildConfigUpper) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }} + 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: + displayName: Send tests to Helix + buildConfig: $(buildConfigUpper) + archType: ${{ parameters.archType }} + osGroup: ${{ parameters.osGroup }} + osSubgroup: ${{ parameters.osSubgroup}} + coreClrRepoRoot: $(Build.SourcesDirectory)/src/coreclr + shouldContinueOnError: ${{ parameters.shouldContinueOnError }} + runtimeFlavor: ${{ parameters.runtimeFlavor }} + runtimeVariant: ${{ parameters.runtimeVariant }} + + ${{ if eq(variables['System.TeamProject'], 'public') }}: + creator: $(Build.DefinitionName) + + helixBuild: $(Build.BuildNumber) + helixSource: $(_HelixSource) + + ${{ if ne(parameters.readyToRun, true) }}: + helixType: 'test/functional/cli/' + + helixQueues: ${{ parameters.helixQueues }} + + # This tests whether an array is empty + ${{ if eq(join('', parameters.helixQueues), '') }}: + condition: false + + publishTestResults: true + + timeoutPerTestInMinutes: $(timeoutPerTestInMinutes) + timeoutPerTestCollectionInMinutes: $(timeoutPerTestCollectionInMinutes) + + runCrossGen2: ${{ eq(parameters.readyToRun, true) }} + compositeBuildMode: ${{ parameters.compositeBuildMode }} + runInUnloadableContext: ${{ parameters.runInUnloadableContext }} + nativeAotTest: ${{ parameters.nativeAotTest }} + + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + # Access token variable for internal project from the + # DotNet-HelixApi-Access variable group + helixAccessToken: $(HelixApiAccessToken) + + helixProjectArguments: '$(Build.SourcesDirectory)/src/tests/Common/helixpublishwitharcade.proj' + + scenarios: ${{ parameters.scenarios }} diff --git a/eng/pipelines/coreclr/nativeaot-post-build-steps.yml b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml index fe77943f58ada6..3864d28f4e06d6 100644 --- a/eng/pipelines/coreclr/nativeaot-post-build-steps.yml +++ b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml @@ -5,45 +5,25 @@ parameters: osSubgroup: '' testBuildArgs: '' helixQueues: '' - templateKind: '' -${{ if eq(parameters.templateKind, 'variables') }}: - variables: - - ${{ if and(ne(parameters.archType, 'arm'), ne(parameters.archType, 'arm64')) }}: - # Include variables required for the build-runtime-tests-and-send-to-helix steps. - - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml - parameters: - buildConfig: ${{ parameters.buildConfig }} - archType: ${{ parameters.archType }} - osGroup: ${{ parameters.osGroup }} - osSubgroup: ${{ parameters.osSubgroup }} - runtimeFlavor: coreclr - runtimeVariant: '' - testBuildArgs: ${{ parameters.testBuildArgs }} - nativeAotTest: true - helixQueues: ${{ parameters.helixQueues }} - templateKind: ${{ parameters.templateKind }} +steps: +# Can't run arm/arm64 tests on x64 build machines +- ${{ if and(ne(parameters.archType, 'arm'), ne(parameters.archType, 'arm64')) }}: -${{ if eq(parameters.templateKind, 'steps') }}: - steps: - # Can't run arm/arm64 tests on x64 build machines - - ${{ if and(ne(parameters.archType, 'arm'), ne(parameters.archType, 'arm64')) }}: + # Build coreclr native test output and send to helix + - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml + parameters: + buildConfig: ${{ parameters.buildConfig }} + archType: ${{ parameters.archType }} + osGroup: ${{ parameters.osGroup }} + osSubgroup: ${{ parameters.osSubgroup }} + runtimeFlavor: coreclr + runtimeVariant: '' + testBuildArgs: ${{ parameters.testBuildArgs }} + nativeAotTest: true + helixQueues: ${{ parameters.helixQueues }} - # Build coreclr native test output and send to helix - - template: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml - parameters: - buildConfig: ${{ parameters.buildConfig }} - archType: ${{ parameters.archType }} - osGroup: ${{ parameters.osGroup }} - osSubgroup: ${{ parameters.osSubgroup }} - runtimeFlavor: coreclr - runtimeVariant: '' - testBuildArgs: ${{ parameters.testBuildArgs }} - nativeAotTest: true - helixQueues: ${{ parameters.helixQueues }} - templateKind: ${{ parameters.templateKind }} - - # Publishing tooling doesn't support different configs between runtime and libs, so only run tests in Release config - - ${{ if eq(parameters.buildConfig, 'release') }}: - - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) -s libs.tests -c $(_BuildConfig) /p:TestAssemblies=false /p:RunNativeAotTestApps=true $(_officialBuildParameter) $(_crossBuildPropertyArg) /bl:$(Build.SourcesDirectory)/artifacts/log/$(buildConfigUpper)/NativeAotTests.binlog ${{ parameters.extraTestArgs }} - displayName: Run NativeAot Library Tests + # Publishing tooling doesn't support different configs between runtime and libs, so only run tests in Release config + - ${{ if eq(parameters.buildConfig, 'release') }}: + - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) -s libs.tests -c $(_BuildConfig) /p:TestAssemblies=false /p:RunNativeAotTestApps=true $(_officialBuildParameter) $(_crossBuildPropertyArg) /bl:$(Build.SourcesDirectory)/artifacts/log/$(buildConfigUpper)/NativeAotTests.binlog ${{ parameters.extraTestArgs }} + displayName: Run NativeAot Library Tests diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml index fee386f811544f..aacf7c024fc822 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml @@ -48,7 +48,13 @@ jobs: # extraStepsParameters: # creator: dotnet-bot # testRunNamePrefixSuffix: Mono_$(_BuildConfig) - # extraStepsTemplateHasVariables: true + # extraVariablesTemplates: + # - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + # forwardedParameters: + # - osGroup + # - osSubgroup + # - runtimeFlavor + # - runtimeVariant # # Android devices diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml index d20ee240004d3d..28828a6475cc06 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml @@ -44,7 +44,13 @@ jobs: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_$(_BuildConfig) - extraStepsTemplateHasVariables: true + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant # # Build the whole product using Mono for Android and run runtime tests with interpreter @@ -81,7 +87,13 @@ jobs: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_$(_BuildConfig) - extraStepsTemplateHasVariables: true + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant # # Android emulators diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml index 8bf4c1366c6a35..43c14c7114edd6 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml @@ -288,7 +288,13 @@ jobs: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_Release - extraStepsTemplateHasVariables: true + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant # # Mono CoreCLR runtime Test executions using live libraries in interpreter mode diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml index 82c65362b460bf..3221d6c0fc21d6 100644 --- a/eng/pipelines/runtime-staging.yml +++ b/eng/pipelines/runtime-staging.yml @@ -102,4 +102,10 @@ extends: extraStepsParameters: creator: dotnet-bot testRunNamePrefixSuffix: Mono_$(_BuildConfig) - extraStepsTemplateHasVariables: true + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 5caca5b5411fe2..e4c7aff9209ee5 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -214,8 +214,14 @@ extends: extraStepsParameters: creator: dotnet-bot testBuildArgs: nativeaot tree nativeaot - extraStepsTemplateHasVariables: true testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -247,8 +253,14 @@ extends: extraStepsParameters: creator: dotnet-bot testBuildArgs: nativeaot tree nativeaot /p:BuildNativeAotFrameworkObjects=true - extraStepsTemplateHasVariables: true testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -282,8 +294,14 @@ extends: extraStepsParameters: creator: dotnet-bot testBuildArgs: nativeaot tree nativeaot - extraStepsTemplateHasVariables: true testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -1142,8 +1160,14 @@ extends: extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml extraStepsParameters: creator: dotnet-bot - extraStepsTemplateHasVariables: true testRunNamePrefixSuffix: Mono_Release + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant # # Mono CoreCLR runtime Test executions using live libraries in interpreter mode @@ -1176,8 +1200,14 @@ extends: extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml extraStepsParameters: creator: dotnet-bot - extraStepsTemplateHasVariables: true testRunNamePrefixSuffix: Mono_Release + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant # # Mono CoreCLR runtime Test executions using live libraries and LLVM AOT # Only when Mono is changed @@ -1212,8 +1242,14 @@ extends: extraStepsTemplate: /eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml extraStepsParameters: creator: dotnet-bot - extraStepsTemplateHasVariables: true testRunNamePrefixSuffix: Mono_Release + extraVariablesTemplates: + - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + forwardedParameters: + - osGroup + - osSubgroup + - runtimeFlavor + - runtimeVariant # # Libraries Release Test Execution against a release mono runtime. From 22b774ce9bad57e1835713e1d17001e48eee5942 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Fri, 10 Feb 2023 15:13:06 -0800 Subject: [PATCH 08/11] Foward common parameters by default to extra variable templates. --- eng/pipelines/common/global-build-job.yml | 17 +++++++++-- .../common/templates/wasm-runtime-tests.yml | 5 ---- .../runtime-extra-platforms-android.yml | 5 ---- ...untime-extra-platforms-androidemulator.yml | 10 ------- .../runtime-extra-platforms-other.yml | 5 ---- eng/pipelines/runtime-staging.yml | 5 ---- eng/pipelines/runtime.yml | 30 ------------------- 7 files changed, 15 insertions(+), 62 deletions(-) diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml index 45c3174f5fcf2d..2e38bcd3856727 100644 --- a/eng/pipelines/common/global-build-job.yml +++ b/eng/pipelines/common/global-build-job.yml @@ -138,8 +138,21 @@ jobs: - ${{ each variableTemplate in parameters.extraVariablesTemplates }}: - template: ${{ variableTemplate.template }} parameters: - ${{ each parameter in variableTemplate.forwardedParameters }}: - ${{ parameter }}: ${{ parameters[parameter] }} + osGroup: ${{ parameters.osGroup }} + osSubgroup: ${{ parameters.osSubgroup }} + archType: ${{ parameters.archType }} + buildConfig: ${{ parameters.buildConfig }} + runtimeFlavor: ${{ parameters.runtimeFlavor }} + runtimeVariant: ${{ parameters.runtimeVariant }} + helixQueues: ${{ parameters.helixQueues }} + targetRid: ${{ parameters.targetRid }} + nameSuffix: ${{ parameters.nameSuffix }} + platform: ${{ parameters.platform }} + pgoType: ${{ parameters.pgoType }} + shouldContinueOnError: ${{ parameters.shouldContinueOnError }} + ${{ if ne(variableTemplate.forwardedParameters, '') }}: + ${{ each parameter in variableTemplate.forwardedParameters }}: + ${{ parameter }}: ${{ parameters[parameter] }} ${{ if ne(variableTemplate.parameters, '') }}: ${{ insert }}: ${{ variableTemplate.parameters }} diff --git a/eng/pipelines/common/templates/wasm-runtime-tests.yml b/eng/pipelines/common/templates/wasm-runtime-tests.yml index c92aa584c20de9..5f7818922297d4 100644 --- a/eng/pipelines/common/templates/wasm-runtime-tests.yml +++ b/eng/pipelines/common/templates/wasm-runtime-tests.yml @@ -46,8 +46,3 @@ jobs: testRunNamePrefixSuffix: Mono_$(_BuildConfig) extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml index aacf7c024fc822..2b1b26964ba40e 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml @@ -50,11 +50,6 @@ jobs: # testRunNamePrefixSuffix: Mono_$(_BuildConfig) # extraVariablesTemplates: # - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - # forwardedParameters: - # - osGroup - # - osSubgroup - # - runtimeFlavor - # - runtimeVariant # # Android devices diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml index 28828a6475cc06..65a890976e7396 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml @@ -46,11 +46,6 @@ jobs: testRunNamePrefixSuffix: Mono_$(_BuildConfig) extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant # # Build the whole product using Mono for Android and run runtime tests with interpreter @@ -89,11 +84,6 @@ jobs: testRunNamePrefixSuffix: Mono_$(_BuildConfig) extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant # # Android emulators diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml index 43c14c7114edd6..b64b9f2a1eac9b 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml @@ -290,11 +290,6 @@ jobs: testRunNamePrefixSuffix: Mono_Release extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant # # Mono CoreCLR runtime Test executions using live libraries in interpreter mode diff --git a/eng/pipelines/runtime-staging.yml b/eng/pipelines/runtime-staging.yml index 3221d6c0fc21d6..95c380a22dba56 100644 --- a/eng/pipelines/runtime-staging.yml +++ b/eng/pipelines/runtime-staging.yml @@ -104,8 +104,3 @@ extends: testRunNamePrefixSuffix: Mono_$(_BuildConfig) extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index e4c7aff9209ee5..03ad45d2a0f6c1 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -217,11 +217,6 @@ extends: testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -256,11 +251,6 @@ extends: testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -297,11 +287,6 @@ extends: testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -1163,11 +1148,6 @@ extends: testRunNamePrefixSuffix: Mono_Release extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant # # Mono CoreCLR runtime Test executions using live libraries in interpreter mode @@ -1203,11 +1183,6 @@ extends: testRunNamePrefixSuffix: Mono_Release extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant # # Mono CoreCLR runtime Test executions using live libraries and LLVM AOT # Only when Mono is changed @@ -1245,11 +1220,6 @@ extends: testRunNamePrefixSuffix: Mono_Release extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml - forwardedParameters: - - osGroup - - osSubgroup - - runtimeFlavor - - runtimeVariant # # Libraries Release Test Execution against a release mono runtime. From 658b4678ecd490e3143f6778cc90cf198b2e788b Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Mon, 13 Feb 2023 11:16:33 -0800 Subject: [PATCH 09/11] Pass through the live libraries build configuration --- eng/pipelines/coreclr/nativeaot-post-build-steps.yml | 1 + eng/pipelines/runtime.yml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/eng/pipelines/coreclr/nativeaot-post-build-steps.yml b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml index 3864d28f4e06d6..7595bc97d336a4 100644 --- a/eng/pipelines/coreclr/nativeaot-post-build-steps.yml +++ b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml @@ -5,6 +5,7 @@ parameters: osSubgroup: '' testBuildArgs: '' helixQueues: '' + liveLibrariesBuildConfig: '' steps: # Can't run arm/arm64 tests on x64 build machines diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 03ad45d2a0f6c1..81a0f55d88cba4 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -214,6 +214,7 @@ extends: extraStepsParameters: creator: dotnet-bot testBuildArgs: nativeaot tree nativeaot + liveLibrariesBuildConfig: Release testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml @@ -248,6 +249,7 @@ extends: extraStepsParameters: creator: dotnet-bot testBuildArgs: nativeaot tree nativeaot /p:BuildNativeAotFrameworkObjects=true + liveLibrariesBuildConfig: Release testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml @@ -284,6 +286,7 @@ extends: extraStepsParameters: creator: dotnet-bot testBuildArgs: nativeaot tree nativeaot + liveLibrariesBuildConfig: Release testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml From 97edfc4f0f38baa1878b606dedd39c6190bed06b Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Mon, 13 Feb 2023 12:01:29 -0800 Subject: [PATCH 10/11] Actually pass through the config and set the test group in the right place. --- eng/pipelines/coreclr/nativeaot-post-build-steps.yml | 1 + eng/pipelines/runtime.yml | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/coreclr/nativeaot-post-build-steps.yml b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml index 7595bc97d336a4..c971d239edc9e4 100644 --- a/eng/pipelines/coreclr/nativeaot-post-build-steps.yml +++ b/eng/pipelines/coreclr/nativeaot-post-build-steps.yml @@ -23,6 +23,7 @@ steps: testBuildArgs: ${{ parameters.testBuildArgs }} nativeAotTest: true helixQueues: ${{ parameters.helixQueues }} + liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }} # Publishing tooling doesn't support different configs between runtime and libs, so only run tests in Release config - ${{ if eq(parameters.buildConfig, 'release') }}: diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 81a0f55d88cba4..37c783939133e3 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -206,7 +206,6 @@ extends: - name: timeoutPerTestCollectionInMinutes value: 180 jobParameters: - testGroup: innerloop timeoutInMinutes: 120 nameSuffix: NativeAOT buildArgs: -s clr.aot+host.native+libs -rc $(_BuildConfig) -lc Release -hc Release @@ -218,6 +217,8 @@ extends: testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + parameters: + testGroup: innerloop condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -241,7 +242,6 @@ extends: - name: timeoutPerTestCollectionInMinutes value: 180 jobParameters: - testGroup: innerloop timeoutInMinutes: 120 nameSuffix: NativeAOT buildArgs: -s clr.aot+host.native+libs -rc $(_BuildConfig) -lc Release -hc Release @@ -253,6 +253,8 @@ extends: testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + parameters: + testGroup: innerloop condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), @@ -290,6 +292,8 @@ extends: testRunNamePrefixSuffix: NativeAOT_$(_BuildConfig) extraVariablesTemplates: - template: /eng/pipelines/common/templates/runtimes/test-variables.yml + parameters: + testGroup: innerloop condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), From 9676ec4ff005dc78483e40f81e48dd725132e741 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Tue, 14 Feb 2023 16:51:09 -0800 Subject: [PATCH 11/11] Default test group to innerloop as that best represents the expected default. --- eng/pipelines/common/templates/runtimes/test-variables.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/common/templates/runtimes/test-variables.yml b/eng/pipelines/common/templates/runtimes/test-variables.yml index 0518f85e4204ff..108b9f03ddb139 100644 --- a/eng/pipelines/common/templates/runtimes/test-variables.yml +++ b/eng/pipelines/common/templates/runtimes/test-variables.yml @@ -1,5 +1,5 @@ parameters: - testGroup: '' + testGroup: 'innerloop' readyToRun: false runtimeFlavor: '' runtimeVariant: ''