Skip to content

Commit

Permalink
Move all of our pipelines to use the global-build-job to build CoreCL…
Browse files Browse the repository at this point in the history
…R, Mono, and Libraries assets (#99179)
  • Loading branch information
jkoritzinsky authored Mar 15, 2024
1 parent c52c808 commit 663839e
Show file tree
Hide file tree
Showing 98 changed files with 2,329 additions and 3,855 deletions.
53 changes: 0 additions & 53 deletions eng/pipelines/common/build-coreclr-and-libraries-job.yml

This file was deleted.

3 changes: 3 additions & 0 deletions eng/pipelines/common/global-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ parameters:
preBuildSteps: []
enableRichCodeNavigation: false
richCodeNavigationLanguage: 'csharp'
disableComponentGovernance: false

jobs:
- template: /eng/common/templates/job/job.yml
Expand All @@ -55,6 +56,8 @@ jobs:
# Component governance does not work on musl machines
${{ if eq(parameters.osSubGroup, '_musl') }}:
disableComponentGovernance: true
${{ else }}:
disableComponentGovernance: ${{ parameters.disableComponentGovernance }}

workspace:
clean: all
Expand Down
3 changes: 0 additions & 3 deletions eng/pipelines/common/platform-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ jobs:
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
crossBuild: true
disableClrTest: true
${{ insert }}: ${{ parameters.jobParameters }}

# Runtime-dev-innerloop build
Expand Down Expand Up @@ -463,7 +462,6 @@ jobs:
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
crossBuild: true
disableClrTest: true
${{ insert }}: ${{ parameters.jobParameters }}

# WASI WebAssembly
Expand Down Expand Up @@ -920,7 +918,6 @@ jobs:
buildConfig: ${{ parameters.buildConfig }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
crossBuild: true
disableClrTest: true
${{ insert }}: ${{ parameters.jobParameters }}

# Windows x64
Expand Down
3 changes: 3 additions & 0 deletions eng/pipelines/common/templates/global-build-step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ parameters:
shouldContinueOnError: false
archParameter: $(_archParameter)
displayName: Build product
container: ''

steps:
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci ${{ parameters.archParameter }} $(_osParameter) $(crossArg) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_buildDarwinFrameworksParameter) $(_overrideTestScriptWindowsCmdParameter)
displayName: ${{ parameters.displayName }}
${{ if eq(parameters.useContinueOnErrorDuringBuild, true) }}:
continueOnError: ${{ parameters.shouldContinueOnError }}
${{ if ne(parameters.container, '') }}:
target: ${{ parameters.container }}
19 changes: 8 additions & 11 deletions eng/pipelines/common/templates/runtimes/build-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,8 @@ parameters:
### Build managed test components (native components are getting built as part
### of the product build job).

### TODO: As of today, build of managed test components requires the product build
### as a prerequisite due to dependency on System.Private.Corelib. After switching
### over to its reference assembly we should be able to remove this dependency and
### run managed test builds in parallel with the product build job.


jobs:
- template: /eng/pipelines/${{ parameters.runtimeFlavor }}/templates/xplat-pipeline-job.yml
- template: /eng/pipelines/common/templates/runtimes/xplat-job.yml
parameters:
buildConfig: ${{ parameters.buildConfig }}
archType: ${{ parameters.archType }}
Expand All @@ -37,7 +31,6 @@ jobs:
testGroup: ${{ parameters.testGroup }}
pool: ${{ parameters.pool }}
dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}
compilerArg: ''

# Test jobs should continue on error for internal builds
${{ if eq(variables['System.TeamProject'], 'internal') }}:
Expand Down Expand Up @@ -69,8 +62,6 @@ jobs:
- ${{ variable }}
- name: liveRuntimeBuildParams
value: 'libs+clr.iltools -c Release -ci'
- name: compilerArg
value: ''

- name: runtimeFlavorArgs
value: ''
Expand All @@ -91,6 +82,12 @@ jobs:
- name: testTreeFilterArg
value: 'tree GC/Scenarios/GCSimulator'

- template: /eng/pipelines/common/templates/runtimes/native-test-assets-variables.yml
parameters:
runtimeFlavor: coreclr
testGroup: ${{ parameters.testGroup }}
liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }}

steps:

# Install test build dependencies
Expand All @@ -99,7 +96,7 @@ jobs:
displayName: Install native dependencies

# Build core/libraries dependencies of test build
- script: $(Build.SourcesDirectory)/build$(scriptExt) $(liveRuntimeBuildParams) $(crossArg) $(compilerArg)
- script: $(Build.SourcesDirectory)/build$(scriptExt) $(liveRuntimeBuildParams) $(crossArg)
displayName: Build coreclr/libs components needed by test build

- ${{ if in(parameters.osGroup, 'osx', 'ios', 'tvos') }}:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Variables to resolve the paths and artifact names for the test assets used and produced to run the tests
# in the src/tests tree.
parameters:
runtimeFlavor: 'coreclr'
runtimeVariant: ''
liveLibrariesBuildConfig: ''
testGroup: 'innerloop'
configOverride: ''

variables:
- name: binTestsPath
value: '$(Build.SourcesDirectory)/artifacts/tests/coreclr'

# Build product defines what we are trying to build, either coreclr or mono
- name: buildProductRootFolderPath
value: '$(Build.SourcesDirectory)/artifacts/bin/${{ parameters.runtimeFlavor }}/$(osGroup).$(archType).$(buildConfigUpper)'

- ${{ if ne(parameters.runtimeFlavor, 'mono') }}:
- name: managedGenericTestArtifactName
value: 'CoreCLRManagedTestArtifacts_AnyOS_AnyCPU_$(buildConfig)'
- ${{ else }}:
- name: managedGenericTestArtifactName
value: 'MonoManagedTestArtifacts_AnyOS_AnyCPU_$(buildConfig)'

- name: managedTestArtifactRootFolderPath
value: '$(binTestsPath)/$(osGroup).$(archType).$(buildConfigUpper)'

- name: nativeTestArtifactConfig
value: $(_BuildConfig)

- ${{ if ne(parameters.configOverride, '') }}:
- name: nativeTestArtifactConfig
value: ${{ parameters.configOverride }}

- name: nativeTestArtifactName
value: 'CoreCLRNativeTestArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(nativeTestArtifactConfig)'

- name: nativeTestArtifactRootFolderPath
value: '$(binTestsPath)/obj/$(osGroup).$(archType).$(nativeTestArtifactConfig)'

- name: microsoftNetSdkIlFolderPath
value: '$(Build.SourcesDirectory)/.packages/microsoft.net.sdk.il'

- name: microsoftNetSdkIlArtifactName
value: 'MicrosoftNetSdkIlPackage_AnyOS_AnyCPU_$(buildConfig)'

- name: librariesOverrideArg
value : ''

- ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}:
- name: librariesOverrideArg
value : ' /p:LibrariesConfiguration=${{ parameters.liveLibrariesBuildConfig }}'

- 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'
Loading

0 comments on commit 663839e

Please sign in to comment.