-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Use platform-matrix and split jobs by steps for libraries pipelines #274
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e02dfd4
Initial work to make corefx templates re-usable for live live
safern 6733081
Support building and running tests
safern 2e79ad4
First try to use platform-matrix
safern bdcd457
Add a common layer in libraries build and a job/test template
safern 2121faa
Removed unused yaml and projects
safern 253034b
Flow test scope and move testScope arg to base template
safern 3fa0328
Fix dependencies
safern d28afe2
Remove excluded paths
safern 0dc03a2
Fix download asset errors in run step
safern 592dc9d
Fix bug in build-job when runtests:true
safern 029c37f
Fix issue where build configurations.props are not present
safern ab2c0cb
Fix nano queues syntax
safern 4957317
Don't split jobs until we make tests Configuration agnostic
safern f985105
Include missing parameter
safern File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| parameters: | ||
| buildConfig: '' | ||
| osGroup: '' | ||
| archType: '' | ||
| osSubgroup: '' | ||
| framework: '' | ||
| isOfficialBuild: false | ||
| timeoutInMinutes: 150 | ||
| container: '' | ||
| steps: [] | ||
| dependsOn: [] | ||
| variables: {} | ||
| name: '' | ||
| 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) }} | ||
| ${{ if eq(parameters.framework, 'netcoreapp') }}: | ||
| displayName: ${{ format('{0} {1}{2} {3} {4}', parameters.stepName, 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) }} | ||
|
|
||
| enableTelemetry: ${{ parameters.isOfficialBuild }} # TODO: figure out if it's needed | ||
| container: ${{ parameters.container }} | ||
| helixRepo: dotnet/runtime | ||
| pool: ${{ parameters.pool }} | ||
| variables: | ||
| - _BuildConfig: ${{ parameters.buildConfig }} | ||
| - _msbuildCommonParameters: '' | ||
| - _stripSymbolsArg: '' | ||
| - _runtimeOSArg: '' | ||
| - _portableArg: '' | ||
| - _finalFrameworkArg: -framework ${{ parameters.framework }} | ||
| - _buildScript: $(buildScriptFileName)$(scriptExt) | ||
| - _warnAsErrorArg: '' | ||
| - _testScopeArg: '' | ||
|
|
||
| - ${{ if ne(parameters.testScope, '') }}: | ||
| - _testScopeArg: -testscope ${{ parameters.testScope }} | ||
|
|
||
| - ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, '_rhel6')) }}: | ||
| - _runtimeOSArg: /p:RuntimeOS=rhel.6 | ||
| - _portableArg: /p:PortableBuild=false | ||
|
|
||
| - ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, '_musl')) }}: | ||
| - _runtimeOSArg: /p:RuntimeOS=linux-musl | ||
|
|
||
| - ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, ''), eq(parameters.archType, 'arm')) }}: | ||
| - _runtimeOSArg: /p:RuntimeOS=ubuntu.16.04 | ||
|
|
||
| - ${{ if and(or(eq(parameters.osGroup, 'Linux'), eq(parameters.osGroup, 'WebAssembly')), ne(parameters.container, '')) }}: | ||
| - _warnAsErrorArg: '-warnAsError false' | ||
|
|
||
| - ${{ if eq(parameters.osGroup, 'WebAssembly') }}: | ||
| - _runtimeOSArg: -os ${{ parameters.osGroup }} | ||
|
|
||
| - ${{ if eq(parameters.framework, 'allConfigurations' ) }}: | ||
| - _finalFrameworkArg: -allConfigurations | ||
|
|
||
| - ${{ if eq(parameters.isOfficialBuild, 'true') }}: | ||
| - _msbuildCommonParameters: /p:OfficialBuildId=$(Build.BuildNumber) | ||
|
|
||
| # 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) | ||
| - ${{ if eq(parameters.isOfficialBuild, 'true') }}: | ||
| - _stripSymbolsArg: -stripSymbols | ||
|
|
||
| - _buildArguments: -configuration ${{ parameters.buildConfig }} -ci -arch ${{ parameters.archType }} $(_finalFrameworkArg) $(_stripSymbolsArg) $(_testScopeArg) $(_warnAsErrorArg) $(_runtimeOSArg) $(_portableArg) $(_msbuildCommonParameters) | ||
| - ${{ parameters.variables }} | ||
|
|
||
| dependsOn: | ||
| - checkout | ||
| - ${{ parameters.dependsOn }} | ||
| workspace: | ||
| clean: all | ||
|
|
||
| enablePublishBuildArtifacts: true | ||
| timeoutInMinutes: ${{ parameters.timeoutInMinutes }} | ||
|
|
||
| steps: | ||
| - checkout: none | ||
| clean: true | ||
|
|
||
| - download: current | ||
| artifact: Checkout_bundle | ||
| displayName: Download Checkout.bundle | ||
|
|
||
| - script: | | ||
| git clone $(Pipeline.Workspace)/Checkout_bundle/Checkout.bundle . | ||
| git remote set-url origin $(Build.Repository.Uri) | ||
| displayName: Clone the repository from Checkout.bundle | ||
|
|
||
| - ${{ parameters.steps }} | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need warnaserror false here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this was ported to xplat-setup and I can remove it. And I also think it was added for a reason I can’t remember anymore. So I will remove it in a follow up PR.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
That's exactly what I was referring to above with "lack of context" :)