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

Add support for building S.P.CoreLib in a separate job #34166

Merged
merged 31 commits into from
Apr 2, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
74cb414
Add support for building S.P.CoreLib in a separate job
mangod9 Mar 26, 2020
def5d70
PR Comments.
mangod9 Mar 27, 2020
fc99faa
fix deletion typo
mangod9 Mar 27, 2020
de8f012
Adding step to upload output directory.
mangod9 Mar 27, 2020
34a19e8
update libraries job to depend on corelib instead of product
mangod9 Mar 27, 2020
eb1ee34
reverting libraries dependency change
mangod9 Mar 27, 2020
478b77f
Add OSX and musl_arm64 corelib builds + use full product for mono
mangod9 Mar 28, 2020
a6a2a3b
Another attempt to fix mono iOS case
mangod9 Mar 28, 2020
fbfb35e
propagating runtimeFlavor to libraries base-job.yml
mangod9 Mar 28, 2020
46efc4d
updating DependsOn for libraries job to use corelib
mangod9 Mar 28, 2020
4fb3931
Merge remote-tracking branch 'upstream/master'
mangod9 Mar 28, 2020
57b5d81
Make LIbraries Test Build also depend on Product
mangod9 Mar 28, 2020
6436fb6
download product dependency when testScope is not null
mangod9 Mar 28, 2020
0683d82
reverting a change which is not required
mangod9 Mar 28, 2020
f21a514
Adding runtime.depproj to libraries restore, and pretest.proj to test…
mangod9 Mar 30, 2020
19e6701
Fixing run_test_job to download product artifact
mangod9 Mar 30, 2020
6b73ed5
run pretest.proj on test runs as well.
mangod9 Mar 30, 2020
bb09589
Add libraries -restore to test run
mangod9 Mar 30, 2020
2ec1f5a
Updating pretest to use TargetArchitecture
mangod9 Mar 30, 2020
77dfbcf
Merge remote-tracking branch 'upstream/master'
mangod9 Mar 30, 2020
e6d4882
Moving runtime restore from \restore\dirs.proj
mangod9 Mar 31, 2020
afe6717
fix -allConfigurations build
mangod9 Mar 31, 2020
a082f9c
Adding corelib job to coreclr=and=Libraries.
mangod9 Mar 31, 2020
fec325d
Add corelib to other pipelines.
mangod9 Mar 31, 2020
dfef8c3
libraries test should depend on full product
mangod9 Mar 31, 2020
2e4d00a
remove upload unsigned artifacts step from official build
mangod9 Mar 31, 2020
42dfd0d
Merge remote-tracking branch 'upstream/master'
mangod9 Apr 1, 2020
56bf4c0
PR Comments
mangod9 Apr 1, 2020
18e5190
typo fix :(
mangod9 Apr 1, 2020
e76db3a
Fix run-test-job pretest build
mangod9 Apr 2, 2020
e3c15b0
removed some unused corelib configs.
mangod9 Apr 2, 2020
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
163 changes: 163 additions & 0 deletions eng/pipelines/coreclr/templates/build-corelib-job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
parameters:
archType: ''
buildConfig: ''
compilerName: 'clang'
mangod9 marked this conversation as resolved.
Show resolved Hide resolved
condition: true
container: ''
crossrootfsDir: ''
mangod9 marked this conversation as resolved.
Show resolved Hide resolved
isOfficialBuild: false
osGroup: ''
osSubgroup: ''
platform: ''
pool: ''
signBinaries: false
stagedBuild: false
testGroup: ''
timeoutInMinutes: ''
variables: {}

### Product build
jobs:
- template: xplat-pipeline-job.yml
parameters:
buildConfig: ${{ parameters.buildConfig }}
_BuildConfig: ${{ parameters.buildConfig }}
archType: ${{ parameters.archType }}
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
testGroup: ${{ parameters.testGroup }}
helixType: 'build/product/'
enableMicrobuild: true
stagedBuild: ${{ parameters.stagedBuild }}
pool: ${{ parameters.pool }}
condition: ${{ parameters.condition }}

# Compute job name from template parameters
mangod9 marked this conversation as resolved.
Show resolved Hide resolved
${{ if eq(parameters.compilerName, 'gcc') }}:
name: ${{ format('coreclr_{0}_corelib_build_{1}{1}_{3}_{4}', parameters.compilerName, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
displayName: ${{ format('CoreCLR GCC Product Build {0}{1} {2} {3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
${{ if eq(parameters.compilerName, 'clang') }}:
name: ${{ format('coreclr_corelib_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
displayName: ${{ format('CoreCLR Product Build {0}{1} {2} {3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}

# Run all steps in the container.
# Note that the containers are defined in platform-matrix.yml
container: ${{ parameters.container }}

timeoutInMinutes: ${{ parameters.timeoutInMinutes }}

crossrootfsDir: ${{ parameters.crossrootfsDir }}

gatherAssetManifests: true
variables:
- name: osGroup
value: ${{ parameters.osGroup }}
- name: osSubgroup
value: ${{ parameters.osSubgroup }}
- name: stripSymbolsArg
value: ''
# Strip symbols only on the release build
- ${{ if eq(parameters.buildConfig, 'Release') }}:
- name: stripSymbolsArg
value: '-stripsymbols'
mangod9 marked this conversation as resolved.
Show resolved Hide resolved
- name: compilerArg
value: ''
- name: publishLogsArtifactPrefix
value: 'BuildLogs_CoreCLR'
- ${{ if eq(parameters.compilerName, 'gcc') }}:
- name: compilerArg
value: '-gcc'
- name: publishLogsArtifactPrefix
value: 'BuildLogs_CoreCLR_GCC'
# workaround for gcc directory not in PATH
mangod9 marked this conversation as resolved.
Show resolved Hide resolved
- name: CLR_CC
value: /opt/rh/devtoolset-7/root/usr/bin/gcc
- name: CLR_CXX
value: /opt/rh/devtoolset-7/root/usr/bin/g++
- ${{ if and(ne(parameters.osGroup, 'Windows_NT'), eq(parameters.compilerName, 'clang')) }}:
- name: compilerArg
value: '-clang9'
# Our FreeBSD doesn't yet detect available clang versions, so pass it explicitly.
- ${{ if eq(parameters.osGroup, 'FreeBSD') }}:
- name: compilerArg
value: '-clang6.0'
# Building for x64 MUSL happens on Alpine Linux and we need to use the stable version available there
- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'), eq(parameters.archType, 'x64')) }}:
mangod9 marked this conversation as resolved.
Show resolved Hide resolved
- name: compilerArg
value: ''
# AppleClang has different version scheme, so we let complier introspection pick up the available clang from PATH
- ${{ if eq(parameters.osGroup, 'OSX') }}:
- name: compilerArg
value: ''
- ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
# Variables used to publish packages to blob feed
- name: dotnetfeedUrl
value: https://dotnetfeed.blob.core.windows.net/dotnet-coreclr/index.json
- name: dotnetfeedPAT
value: $(dotnetfeed-storage-access-key-1)
# Variables used by arcade to gather asset manifests
- name: _DotNetPublishToBlobFeed
mangod9 marked this conversation as resolved.
Show resolved Hide resolved
value: true
- name: officialBuildIdArg
value: ''
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- name: officialBuildIdArg
value: '/p:OfficialBuildId=$(Build.BuildNumber)'
- name: enforcePgoArg
value: ''
# The EnforcePGO script is only supported on Windows and is not supported on arm or arm64.
- ${{ if and(eq(parameters.buildConfig, 'Release'), and(eq(parameters.osGroup, 'Windows_NT'), not(or(eq(parameters.archType, 'arm64'), eq(parameters.archType, 'arm'))))) }}:
- name: enforcePgoArg
value: '-enforcepgo'

- ${{ parameters.variables }}

steps:

# Install native dependencies
mangod9 marked this conversation as resolved.
Show resolved Hide resolved
# Linux builds use docker images with dependencies preinstalled,
# and FreeBSD builds use a build agent with dependencies
# preinstalled, so we only need this step for OSX and Windows.
- ${{ if eq(parameters.osGroup, 'OSX') }}:
- script: sh $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup)
displayName: Install native dependencies
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
# Necessary to install python
- script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force
displayName: Install native dependencies

# # Install internal tools on official builds
# # Since our internal tools are behind an authenticated feed,
# # we need to use the DotNetCli AzDO task to restore from the feed using a service connection.
# # We can't do this from within the build, so we need to do this as a separate step.
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/pipelines/common/restore-internal-tools.yml
parameters:
installDotnet: true

# Build Private CoreLib
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subsetCategory coreclr -subset corelib $(crossArg) -arch $(archType) -c $(buildConfig) $(officialBuildIdArg) -ci
mangod9 marked this conversation as resolved.
Show resolved Hide resolved
displayName: Build System.Private.CoreLib only
mangod9 marked this conversation as resolved.
Show resolved Hide resolved

# Get key vault secrets for publishing
mangod9 marked this conversation as resolved.
Show resolved Hide resolved
- ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- task: AzureKeyVault@1
inputs:
azureSubscription: 'DotNet-Engineering-Services_KeyVault'
KeyVaultName: EngKeyVault
SecretsFilter: 'dotnetfeed-storage-access-key-1,microsoft-symbol-server-pat,symweb-symbol-server-pat'

# Save packages using the prepare-signed-artifacts format.
mangod9 marked this conversation as resolved.
Show resolved Hide resolved
- ${{ if eq(parameters.isOfficialBuild, true) }}:
- template: /eng/pipelines/common/upload-unsigned-artifacts-step.yml
parameters:
name: ${{ parameters.platform }}

# Publish Logs
- task: PublishPipelineArtifact@1
displayName: Publish Logs
inputs:
targetPath: $(Build.SourcesDirectory)/artifacts/log
artifactName: '$(publishLogsArtifactPrefix)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)'
continueOnError: true
condition: always()
38 changes: 38 additions & 0 deletions eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,44 @@ jobs:
- eng/pipelines/mono/*
- eng/pipelines/libraries/*

#
mangod9 marked this conversation as resolved.
Show resolved Hide resolved
# Build CoreLib checked
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/build-corelib-job.yml
buildConfig: checked
mangod9 marked this conversation as resolved.
Show resolved Hide resolved
platforms:
- Linux_x64
- Linux_arm
- Linux_arm64
- Linux_musl_x64
- Windows_NT_x86
- Windows_NT_x64
- Windows_NT_arm
- Windows_NT_arm64
jobParameters:
testGroup: innerloop

#
# Build CoreLib release
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/build-corelib-job.yml
buildConfig: release
platforms:
- Linux_x64
- Linux_arm
- Linux_arm64
- Linux_musl_x64
- Windows_NT_x86
- Windows_NT_x64
- Windows_NT_arm
- Windows_NT_arm64
jobParameters:
testGroup: innerloop

#
# Build CoreCLR checked
# Only when CoreCLR is changed
Expand Down