Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live-live CI pipeline #294

Merged
merged 25 commits into from
Dec 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7f2b903
Live-live pipeline rebased against Santiago's CoreFX build change
trylek Nov 28, 2019
275ee15
Fix library script name
trylek Nov 28, 2019
8336382
One more configuration mapping fix for CoreFX build
trylek Nov 28, 2019
1626467
Fix Windows build-test script, expand build matrix
trylek Nov 28, 2019
9247827
Add jobs for CoreFX test execution, experimentally downgrade Python
trylek Nov 29, 2019
ac47a03
Move download of live CoreCLR artifacts to base-job
trylek Nov 29, 2019
d2c0c82
Don't clean up unpack folder in build-test-job as that nukes CoreCLR …
trylek Nov 29, 2019
36b9784
Fix path to sendtohelix.proj script
trylek Nov 30, 2019
1c04de4
Specify libraries run more precisely to hopefully get some queues
trylek Nov 30, 2019
8048966
Instrumentation for chasing down missing Helix artifact (test runtime)
trylek Dec 1, 2019
c8820f2
Experimentally import Directory.Build.props from sendtohelix.proj
trylek Dec 2, 2019
7284d22
Bump up msbuild diagnostics for the sendtohelix script
trylek Dec 2, 2019
daa935d
Fix configuration ID in calls to helix.yml
trylek Dec 2, 2019
052313e
Remove instrumentation; hopefully fix the coreclr-libraries pipeline
trylek Dec 2, 2019
3b23c9a
Addressing most of PR feedback
trylek Dec 2, 2019
58f8c52
Fix unification of archiveExtension
trylek Dec 2, 2019
b8d1264
Santiago's feedback - rename coreFx to libraries in the new code
trylek Dec 3, 2019
f69fca7
Introduce liveCoreClrBuildConfig and liveLibrariesBuildConfig
trylek Dec 3, 2019
91ce5a4
Rename root.yml to runtime.yml per PR feedback
trylek Dec 3, 2019
b1bf69b
Add build-test argument to specify CoreFX configuration
trylek Dec 3, 2019
5ec9607
Remove msbuild verbosity instrumentation; fix YAML typo
trylek Dec 3, 2019
b668b57
Address PR feedback
trylek Dec 3, 2019
7674b40
Latest bits of PR feedback and disabling test runs for now
trylek Dec 3, 2019
7402ce7
Stop passing testScope: empty to libraries build
trylek Dec 3, 2019
28a52c4
Sigh - one last bit, propagation of condition wasn't working properly
trylek Dec 3, 2019
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
28 changes: 26 additions & 2 deletions eng/pipelines/coreclr/templates/build-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ parameters:
osSubgroup: ''
container: ''
testGroup: ''

# When set to a non-empty value (Debug / Release), it determines libraries
# build configuration to use for the tests. Setting this property implies
# a dependency of this job on the appropriate libraries build and is used
# to construct the name of the Azure artifact representing libraries build
# to use for building the tests.
liveLibrariesBuildConfig: ''

displayNameArgs: ''
condition: true
stagedBuild: false
Expand All @@ -31,6 +39,7 @@ jobs:
container: ${{ parameters.container }}
testGroup: ${{ parameters.testGroup }}
stagedBuild: ${{ parameters.stagedBuild }}
liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }}
variables: ${{ parameters.variables }}
pool: ${{ parameters.pool }}

Expand All @@ -55,7 +64,11 @@ jobs:
# because it needs System.Private.Corelib; we should be able to remove this dependency
# by switching over to using reference assembly.
${{ if ne(parameters.stagedBuild, true) }}:
dependsOn: ${{ format('coreclr_product_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
dependsOn:
- ${{ format('coreclr_product_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
- ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}:
- ${{ format('libraries_build_{0}_{1}{2}_{3}_{4}', 'netcoreapp', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveLibrariesBuildConfig) }}
Copy link
Member

Choose a reason for hiding this comment

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

It might make sense to remove netcoreapp from the libraries build names when target framework is netcoreapp as libraries is the only subset that builds for other frameworks. That way we don't need to hard code it here. Something to consider on a follow up PR.



${{ if eq(parameters.testGroup, 'innerloop') }}:
timeoutInMinutes: 90
Expand All @@ -75,6 +88,17 @@ jobs:
displayName: Install native dependencies


# Optionally download live-built libraries
- ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}:
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(librariesDownloadDir)
cleanUnpackFolder: false
artifactFileName: '$(librariesArtifactName)$(archiveExtension)'
artifactName: '$(librariesArtifactName)'
displayName: 'live-built libraries'


# Download product binaries directory
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
Expand All @@ -85,7 +109,7 @@ jobs:


# Build managed test components
- script: $(coreClrRepoRootDir)build-test$(scriptExt) skipnative skipgeneratelayout $(buildConfig) $(archType) $(crossArg) $(priorityArg) ci
- script: $(coreClrRepoRootDir)build-test$(scriptExt) skipnative skipgeneratelayout $(buildConfig) $(archType) $(crossArg) $(priorityArg) ci $(librariesOverrideArg)
displayName: Build managed test components


Expand Down
20 changes: 17 additions & 3 deletions eng/pipelines/coreclr/templates/run-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ parameters:
testGroup: ''
crossrootfsDir: ''
readyToRun: false
liveLibrariesBuildConfig: ''
crossgen2: false
helixQueues: ''
# If true, run the corefx tests instead of the coreclr ones
corefxTests: false
condition: true
stagedBuild: false
displayNameArgs: ''
runInUnloadableContext: false
Expand All @@ -38,6 +40,7 @@ jobs:
crossrootfsDir: ${{ parameters.crossrootfsDir }}
corefxTests: ${{ parameters.corefxTests }}
stagedBuild: ${{ parameters.stagedBuild }}
liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }}
helixType: 'build/tests/'
pool: ${{ parameters.pool }}

Expand Down Expand Up @@ -105,6 +108,17 @@ jobs:

steps:

# Optionally download live-built libraries
- ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}:
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(librariesDownloadDir)
cleanUnpackFolder: false
artifactFileName: '$(librariesArtifactName)$(archiveExtension)'
artifactName: '$(librariesArtifactName)'
displayName: 'live-built libraries'


# Download and unzip managed test artifacts
- ${{ if ne(parameters.corefxTests, true) }}:
- template: /eng/pipelines/common/download-artifact-step.yml
Expand Down Expand Up @@ -151,19 +165,19 @@ jobs:
# the native artifacts to the final test folders is dependent on availability of the
# managed test artifacts.
- ${{ if ne(parameters.corefxTests, true) }}:
- script: $(coreClrRepoRootDir)build-test$(scriptExt) copynativeonly $(buildConfig) $(archType) $(priorityArg)
- script: $(coreClrRepoRootDir)build-test$(scriptExt) copynativeonly $(buildConfig) $(archType) $(priorityArg) $(librariesOverrideArg)
displayName: Copy native test components to test output folder


# Generate test host
- ${{ if eq(parameters.corefxTests, true) }}:
- script: $(coreClrRepoRootDir)build-test$(scriptExt) skipmanaged skipnative $(testhostArg) $(buildConfig) $(archType) $(crossArg) $(priorityArg)
- script: $(coreClrRepoRootDir)build-test$(scriptExt) skipmanaged skipnative $(testhostArg) $(buildConfig) $(archType) $(crossArg) $(priorityArg) $(librariesOverrideArg)
displayName: Generate test host


# Crossgen framework assemblies prior to triggering readyToRun execution runs.
- ${{ if eq(parameters.readyToRun, true) }}:
- script: $(coreClrRepoRootDir)build-test$(scriptExt) skipmanaged skipnative $(crossgenArg) $(buildConfig) $(archType) $(crossArg) $(priorityArg)
- script: $(coreClrRepoRootDir)build-test$(scriptExt) skipmanaged skipnative $(crossgenArg) $(buildConfig) $(archType) $(crossArg) $(priorityArg) $(librariesOverrideArg)
displayName: Crossgen framework assemblies


Expand Down
13 changes: 13 additions & 0 deletions eng/pipelines/coreclr/templates/xplat-pipeline-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ parameters:
testGroup: ''
crossrootfsDir: ''
corefxTests: false
liveLibrariesBuildConfig: ''
stagedBuild: false
strategy: ''
pool: ''
Expand Down Expand Up @@ -103,6 +104,18 @@ jobs:
- name: priorityArg
value: '-priority=1'

- librariesArtifactName: ''
- librariesOverrideArg: ''
- librariesDownloadDir: ''

- ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}:
- librariesArtifactName: ${{ format('libraries_bin_{0}_{1}{2}_{3}_{4}', 'netcoreapp', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveLibrariesBuildConfig) }}
Copy link
Member

Choose a reason for hiding this comment

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

It might make sense to move these artifactName variables to xplat-setup template as it is used to upload and download and we already have all the required parameters at that point. Anyway, that can be done in a follow up PR, just calling it out so that we don't forget.

- librariesDownloadDir: $(Build.SourcesDirectory)/artifacts
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
- librariesOverrideArg: ' localcorefxpath $(Build.SourcesDirectory) localcorefxconfig ${{ parameters.liveLibrariesBuildConfig }}'
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- librariesOverrideArg: ' localcorefxpath=$(Build.SourcesDirectory) localcorefxconfig=${{ parameters.liveLibrariesBuildConfig }}'

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

Expand Down
37 changes: 28 additions & 9 deletions eng/pipelines/libraries/base-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ parameters:
osSubgroup: ''
framework: ''
isOfficialBuild: false
liveCoreClrBuildConfig: ''
timeoutInMinutes: 150
condition: true
container: ''
steps: []
dependsOn: []
Expand All @@ -14,29 +16,31 @@ parameters:
displayName: ''
testScope: ''
pool: ''
stepName: ''

jobs:
- template: /eng/common/templates/job/job.yml
parameters:
name: ${{ format('libraries_{0}_{1}_{2}{3}_{4}_{5}', parameters.stepName, parameters.framework, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
name: ${{ format('libraries_{0}_{1}_{2}{3}_{4}_{5}', parameters.name, parameters.framework, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
${{ if eq(parameters.framework, 'netcoreapp') }}:
displayName: ${{ format('{0} {1}{2} {3} {4}', parameters.stepName, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
displayName: ${{ format('Libraries {0} {1}{2} {3} {4}', parameters.displayName, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
${{ if ne(parameters.framework, 'netcoreapp') }}:
displayName: ${{ format('{0} {1} {2} {3} {4}', parameters.stepName, parameters.osGroup, parameters.framework, parameters.archType, parameters.buildConfig) }}
displayName: ${{ format('Libraries {0} {1} {2} {3} {4}', parameters.displayName, parameters.osGroup, parameters.framework, parameters.archType, parameters.buildConfig) }}

enableTelemetry: ${{ parameters.isOfficialBuild }} # TODO: figure out if it's needed
container: ${{ parameters.container }}
condition: ${{ parameters.condition }}
helixRepo: dotnet/runtime
pool: ${{ parameters.pool }}
variables:
- _buildScriptFileName: libraries
- _BuildConfig: ${{ parameters.buildConfig }}

- _msbuildCommonParameters: ''
- _stripSymbolsArg: ''
- _runtimeOSArg: ''
- _portableArg: ''
- _finalFrameworkArg: -framework ${{ parameters.framework }}
- _buildScript: $(buildScriptFileName)$(scriptExt)
- _buildScript: $(_buildScriptFileName)$(scriptExt)
- _warnAsErrorArg: ''
- _testScopeArg: ''

Expand Down Expand Up @@ -65,19 +69,26 @@ jobs:
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- _msbuildCommonParameters: /p:OfficialBuildId=$(Build.BuildNumber)

- _coreClrArtifactName: ''
- _coreClrDownloadPath: ''
- _coreClrOverridePathArg: ''

- ${{ if ne(parameters.liveCoreClrBuildConfig, '') }}:
- _coreClrDownloadPath: '$(Build.SourcesDirectory)/artifacts/transport/coreclr'
- _coreClrArtifactName: 'CoreCLRProduct_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.liveCoreClrBuildConfig }}'
- _coreClrOverridePathArg: ' /p:CoreCLROverridePath=$(_coreClrDownloadPath)'

# Windows variables
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
- _msbuildCommand: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 -warnaserror:0 -ci
- _runtimeOSArg: /p:RuntimeOS=win10

# Non-Windows variables
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- _msbuildCommand: ./eng/common/msbuild.sh --warnaserror false --ci
- _buildScript: ./$(buildScriptFileName)$(scriptExt)
- _buildScript: ./$(_buildScriptFileName)$(scriptExt)
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- _stripSymbolsArg: -stripSymbols

- _buildArguments: -configuration ${{ parameters.buildConfig }} -ci -arch ${{ parameters.archType }} $(_finalFrameworkArg) $(_stripSymbolsArg) $(_testScopeArg) $(_warnAsErrorArg) $(_runtimeOSArg) $(_portableArg) $(_msbuildCommonParameters)
- _buildArguments: -configuration ${{ parameters.buildConfig }} -ci -arch ${{ parameters.archType }} $(_finalFrameworkArg) $(_stripSymbolsArg) $(_testScopeArg) $(_warnAsErrorArg) $(_runtimeOSArg) $(_portableArg) $(_msbuildCommonParameters) $(_coreClrOverridePathArg)
- ${{ parameters.variables }}

dependsOn:
Expand All @@ -102,4 +113,12 @@ jobs:
git remote set-url origin $(Build.Repository.Uri)
displayName: Clone the repository from Checkout.bundle

- ${{ if ne(parameters.liveCoreClrBuildConfig, '') }}:
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(_coreClrDownloadPath)
artifactFileName: '$(_coreClrArtifactName)$(archiveExtension)'
artifactName: '$(_coreClrArtifactName)'
displayName: 'CoreCLR build drop'

- ${{ parameters.steps }}
18 changes: 17 additions & 1 deletion eng/pipelines/libraries/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ parameters:
archType: ''
framework: netcoreapp
isOfficialBuild: false

# When set to a non-empty value (Debug / Release), it determines CoreCLR
# build configuration to use for building libraries and tests. Setting this
# property implies a dependency of this job on the appropriate CoreCLR build
# and is used to construct the name of the Azure artifact representing
# CoreCLR build to use for building the libraries and library tests.
liveCoreClrBuildConfig: ''
Copy link
Member

Choose a reason for hiding this comment

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

Does liveCoreClrBuildConfig represent the version of CoreCLR we should be building and using or simply using? Or stated differently does this control whether we build CoreCLR here or merely which already built CoreCLR we should be consuming?

Copy link
Member

Choose a reason for hiding this comment

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

The intention of this is to tell the Libraries build which CoreCLR build it should depend on. This way we can build CoreCLR for Release and then Libraries for Debug and depend on the CoreCLR release build, that way configurations are decoupled.

Copy link
Member

Choose a reason for hiding this comment

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

Gotcha. @trylek consider adding a comment clarifying this.


timeoutInMinutes: 150
preBuildSteps: []
container: ''
Expand All @@ -22,12 +30,18 @@ jobs:
archType: ${{ parameters.archType }}
framework: ${{ parameters.framework }}
isOfficialBuild: ${{ parameters.isOfficialBuild }}
liveCoreClrBuildConfig: ${{ parameters.liveCoreClrBuildConfig }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
preBuildSteps: ${{ parameters.preBuildSteps }}
container: ${{ parameters.container }}
pool: ${{ parameters.pool }}
testScope: ${{ parameters.testScope }}
stepName: Build
name: build
displayName: 'Build'

${{ if ne(parameters.liveCoreClrBuildConfig, '') }}:
dependsOn:
- ${{ format('coreclr_product_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveCoreClrBuildConfig) }}

variables:
- _skipTestRestoreArg: /p:SkipTestRestore=true
Expand All @@ -40,6 +54,8 @@ jobs:
- ${{ if ne(parameters.framework, 'allConfigurations') }}:
- _skipTestRestoreArg: /p:SkipTestRestore=false

- ${{ parameters.variables }}

steps:
- script: $(_buildScript) -restore $(_buildArguments) $(_skipTestRestoreArg)
displayName: Restore
Expand Down
10 changes: 8 additions & 2 deletions eng/pipelines/libraries/build-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ parameters:
archType: ''
framework: netcoreapp
isOfficialBuild: false
liveCoreClrBuildConfig: ''
timeoutInMinutes: 150
container: ''
publishTestArtifacs: true
pool: ''
testScope: ''
variables: {}
condition: true
runTests: false

jobs:
Expand All @@ -22,14 +24,17 @@ jobs:
archType: ${{ parameters.archType }}
framework: ${{ parameters.framework }}
isOfficialBuild: ${{ parameters.isOfficialBuild }}
condition: ${{ parameters.condition }}
liveCoreClrBuildConfig: ${{ parameters.liveCoreClrBuildConfig }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
container: ${{ parameters.container }}
pool: ${{ parameters.pool }}
testScope: ${{ parameters.testScope }}
stepName: Test
name: test_build
displayName: 'Test Build'

dependsOn:
- ${{ format('libraries_Build_{0}_{1}{2}_{3}_{4}', parameters.framework, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
- ${{ format('libraries_build_{0}_{1}{2}_{3}_{4}', parameters.framework, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}

variables:
- _archiveTestsParameter: /p:ArchiveTests=true
Expand All @@ -44,6 +49,7 @@ jobs:
artifactName: ${{ format('libraries_bin_{0}_{1}{2}_{3}_{4}', parameters.framework, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
artifactFileName: ${{ format('libraries_bin_{0}_{1}{2}_{3}_{4}', parameters.framework, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}$(archiveExtension)
unpackFolder: $(Build.SourcesDirectory)/artifacts
cleanUnpackFolder: false

- script: $(_buildScript) -restore $(_buildArguments) $(_skipTestRestoreArg)
displayName: Restore
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/libraries/helix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ parameters:

steps:
- script: ${{ parameters.msbuildScript }}
$(sourcesRoot)/sendtohelix.proj
$(Build.SourcesDirectory)/src/libraries/sendtohelix.proj
/t:test
/p:ArchGroup=${{ parameters.archGroup }}
/p:ConfigurationGroup=${{ parameters.configuration }}
Expand Down
13 changes: 9 additions & 4 deletions eng/pipelines/libraries/run-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ parameters:
archType: ''
framework: netcoreapp
isOfficialBuild: false
liveCoreClrBuildConfig: ''
timeoutInMinutes: 150
pool: ''
testScope: ''
helixQueues: []
dependsOnBuildConfiguration: Debug
condition: true
variables: {}

jobs:
Expand All @@ -21,14 +23,17 @@ jobs:
archType: ${{ parameters.archType }}
framework: ${{ parameters.framework }}
isOfficialBuild: ${{ parameters.isOfficialBuild }}
liveCoreClrBuildConfig: ${{ parameters.liveCoreClrBuildConfig }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
container: '' # we just send to helix, no need to use a container.
condition: ${{ parameters.condition }}
pool: ${{ parameters.pool }}
stepName: Run
name: test_run
displayName: 'Test Run'

dependsOn:
- ${{ format('libraries_Build_{0}_{1}{2}_{3}_{4}', parameters.framework, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
- ${{ format('libraries_Test_{0}_{1}_x64_{2}', parameters.framework, parameters.osGroup, parameters.dependsOnBuildConfiguration) }}
- ${{ format('libraries_build_{0}_{1}{2}_{3}_{4}', parameters.framework, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
- ${{ format('libraries_test_build_{0}_{1}_x64_{2}', parameters.framework, parameters.osGroup, parameters.dependsOnBuildConfiguration) }}

variables:
- _archiveTestsParameter: /p:ArchiveTests=true
Expand Down Expand Up @@ -61,4 +66,4 @@ jobs:
framework: ${{ parameters.framework }}
testScope: ${{ parameters.testScope }}
creator: dotnet-bot
helixToken: ''
helixToken: ''
Loading