Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions eng/common/templates/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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, '')) }}:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arcade PR is here: dotnet/arcade#12524

- ${{ each pair in variable }}:
- name: ${{ pair.key }}
value: ${{ pair.value }}
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
26 changes: 24 additions & 2 deletions eng/pipelines/common/global-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ parameters:
testResultsFormat: ''
extraStepsTemplate: ''
extraStepsParameters: {}
extraVariablesTemplates: []
isManualCodeQLBuild: false

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, '') }}:
Expand Down Expand Up @@ -121,7 +122,28 @@ jobs:
- ${{ if eq(parameters.archType, 'arm64') }}:
- name: _monoAotCrossCompileArg
value: 'cross'


- ${{ each variableTemplate in parameters.extraVariablesTemplates }}:
- template: ${{ variableTemplate.template }}
parameters:
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 }}

- ${{ each variable in parameters.variables }}:
- ${{ variable }}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
parameters:
buildConfig: ''
osGroup: ''
osSubgroup: ''
container: ''
testBuildArgs: ''
Expand All @@ -13,6 +14,8 @@ parameters:
nativeAotTest: false
runtimeFlavor: 'mono'
runtimeVariant: 'monointerpreter'
scenarios:
- normal
variables: {}
pool: ''
dependsOn: []
Expand All @@ -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) $(priorityArg) $(runtimeFlavorArgs) ${{ parameters.testBuildArgs }} $(runtimeVariantArg) /p:LibrariesConfiguration=${{ coalesce(parameters.liveLibrariesBuildConfig, parameters.buildConfig) }}
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) $(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') }}:
Expand Down Expand Up @@ -114,4 +117,4 @@ steps:

helixProjectArguments: '$(Build.SourcesDirectory)/src/tests/Common/helixpublishwitharcade.proj'

scenarios: normal
scenarios: ${{ parameters.scenarios }}
87 changes: 8 additions & 79 deletions eng/pipelines/common/templates/runtimes/run-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ''

Expand Down Expand Up @@ -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
Expand Down
100 changes: 100 additions & 0 deletions eng/pipelines/common/templates/runtimes/test-variables.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
parameters:
testGroup: 'innerloop'
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'
2 changes: 2 additions & 0 deletions eng/pipelines/common/templates/wasm-runtime-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ jobs:
extraStepsParameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml
2 changes: 2 additions & 0 deletions eng/pipelines/coreclr/nativeaot-post-build-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parameters:
osSubgroup: ''
testBuildArgs: ''
helixQueues: ''
liveLibrariesBuildConfig: ''

steps:
# Can't run arm/arm64 tests on x64 build machines
Expand All @@ -22,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') }}:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
# extraStepsParameters:
# creator: dotnet-bot
# testRunNamePrefixSuffix: Mono_$(_BuildConfig)
# extraVariablesTemplates:
# - template: /eng/pipelines/common/templates/runtimes/test-variables.yml

#
# Android devices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
extraStepsParameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml

#
# Build the whole product using Mono for Android and run runtime tests with interpreter
Expand Down Expand Up @@ -80,6 +82,8 @@ jobs:
extraStepsParameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml

#
# Android emulators
Expand Down
Loading