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

Adding a ci leg for Source build #36141

Merged
merged 9 commits into from
May 19, 2020
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
6 changes: 5 additions & 1 deletion eng/notSupported.SourceBuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
BeforeTargets="BeforeCompile"
Condition="'$(DotNetBuildFromSource)' == 'true' and
('$(GeneratePlatformNotSupportedAssembly)' == 'true' or '$(GeneratePlatformNotSupportedAssemblyMessage)' != '')">


<PropertyGroup>
<DotNetSourceBuildIntermediatePath Condition="'$(DotNetSourceBuildIntermediatePath)' == '' and '$(ContinuousIntegrationBuild)' == 'true'">$(IntermediateOutputPath)</DotNetSourceBuildIntermediatePath>
</PropertyGroup>

<Error Condition="'$(DotNetSourceBuildIntermediatePath)' == ''"
Text="'DotNetSourceBuildIntermediatePath' must be specified when 'DotNetBuildFromSource' is true" />

Expand Down
12 changes: 10 additions & 2 deletions eng/pipelines/libraries/base-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ parameters:
framework: ''
isOfficialBuild: false
isOfficialAllConfigurations: false
isSourceBuild: false
liveRuntimeBuildConfig: ''
runtimeFlavor: 'coreclr'
timeoutInMinutes: 150
Expand All @@ -24,8 +25,12 @@ jobs:
- template: /eng/common/templates/job/job.yml
parameters:
${{ if notIn(parameters.framework, 'allConfigurations', 'net472') }}:
displayName: ${{ format('Libraries {0} {1}{2} {3} {4}', parameters.displayName, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
name: ${{ format('libraries_{0}_{1}{2}_{3}_{4}', parameters.name, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
${{ if eq(parameters.isSourceBuild, false) }}:
displayName: ${{ format('Libraries {0} {1}{2} {3} {4}', parameters.displayName, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
name: ${{ format('libraries_{0}_{1}{2}_{3}_{4}', parameters.name, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
${{ if eq(parameters.isSourceBuild, true) }}:
displayName: ${{ format('Libraries {0} {1}{2} {3} {4}', 'Source Build', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
name: ${{ format('libraries_{0}_{1}{2}_{3}_{4}', 'sourcebuild', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
${{ if in(parameters.framework, 'allConfigurations', 'net472') }}:
displayName: ${{ format('Libraries {0} {1} {2} {3} {4}', parameters.displayName, parameters.osGroup, parameters.framework, 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) }}
Expand Down Expand Up @@ -75,6 +80,9 @@ jobs:
- _finalFrameworkArg: -allConfigurations
- _extraHelixArguments: /p:BuildAllConfigurations=true

- ${{ if eq(parameters.isSourceBuild, true) }}:
- _finalFrameworkArg: /p:DotnetBuildFromSource=true

- ${{ if eq(parameters.isOfficialAllConfigurations, true) }}:
- librariesBuildArtifactName: 'libraries_bin_official_allconfigurations'

Expand Down
4 changes: 3 additions & 1 deletion eng/pipelines/libraries/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parameters:
archType: ''
crossrootfsDir: ''
framework: ''
isSourceBuild: false
isOfficialBuild: false
isOfficialAllConfigurations: false

Expand Down Expand Up @@ -36,6 +37,7 @@ jobs:
framework: ${{ parameters.framework }}
isOfficialBuild: ${{ parameters.isOfficialBuild }}
isOfficialAllConfigurations: ${{ parameters.isOfficialAllConfigurations }}
isSourceBuild: ${{ parameters.isSourceBuild }}
liveRuntimeBuildConfig: ${{ parameters.liveRuntimeBuildConfig }}
runtimeFlavor: ${{ parameters.runtimeFlavor }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
Expand Down Expand Up @@ -94,7 +96,7 @@ jobs:
df -h
displayName: Disk Usage after Build

- ${{ if eq(parameters.runTests, false) }}:
- ${{ if and(eq(parameters.runTests, false), ne(parameters.isSourceBuild, true)) }}:
- ${{ if ne(parameters.isOfficialBuild, true) }}:
- task: CopyFiles@2
displayName: Prepare testhost folder to publish
Expand Down
18 changes: 18 additions & 0 deletions eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,24 @@ jobs:
eq(dependencies.checkout.outputs['SetPathVars_libraries.containsChange'], true),
eq(variables['isFullMatrix'], true))

#
# Libraries Sourcebuild Build
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/libraries/build-job.yml
buildConfig: Release
platforms:
- Linux_x64
jobParameters:
runTests: false
liveRuntimeBuildConfig: release
isSourceBuild: true
condition: >-
or(
eq(dependencies.checkout.outputs['SetPathVars_libraries.containsChange'], true),
eq(variables['isFullMatrix'], true))

#
# Installer Build and Test
# These are always built since they only take like 15 minutes
Expand Down