1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-10 18:11:04 +09:00

Collapse mono runtime pack builds in official build (#37511)

* Collapse mono runtime pack builds in official build

* Minor cleanups
This commit is contained in:
Santiago Fernandez Madero 2020-06-08 10:56:36 -07:00 committed by GitHub
parent a021db003a
commit 797dc08c9f
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 66 additions and 133 deletions

View file

@ -6,10 +6,12 @@ parameters:
osGroup: ''
osSubgroup: ''
container: ''
crossrootfsDir: ''
variables: {}
timeoutInMinutes: ''
pool: ''
condition: true
isOfficialBuild: false
extraStepsTemplate: ''
extraStepsParameters: {}
@ -34,11 +36,24 @@ jobs:
- name: _osParameter
value: /p:RuntimeOS=linux-musl /p:OutputRid=linux-musl-${{ parameters.archType }}
# Do not rename as it clashes with MSBuild property in libraries/build-native.proj
- name: _crossBuildPropertyArg
value: /p:CrossBuild=${{ ne(parameters.crossrootfsDir, '') }}
- name: _officialBuildParameter
$ {{ if eq(parameters.isOfficialBuild, true) }}:
value: /p:OfficialBuildId=$(Build.BuildNumber)
$ {{ if ne(parameters.isOfficialBuild, true) }}:
value: ''
- ${{ parameters.variables }}
steps:
- template: /eng/pipelines/common/clone-checkout-bundle-step.yml
- ${{ if eq(parameters.isOfficialBuild, true) }}:
- template: /eng/pipelines/common/restore-internal-tools.yml
- ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }}
displayName: Install Build Dependencies
@ -49,7 +64,7 @@ jobs:
displayName: Disk Usage before Build
# Build
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) ${{ parameters.buildArgs }}
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_crossBuildPropertyArg)
displayName: Build product
- ${{ if in(parameters.osGroup, 'OSX', 'iOS','tvOS') }}:
@ -58,15 +73,6 @@ jobs:
df -h
displayName: Disk Usage after Build
- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/'
PublishLocation: Container
ArtifactName: Logs_Build_${{ parameters.osGroup }}_${{ parameters.osSubGroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }}
continueOnError: true
condition: always()
# If intended to send extra steps after regular build add them here.
- ${{ if ne(parameters.extraStepsTemplate, '') }}:
- template: ${{ parameters.extraStepsTemplate }}
@ -76,3 +82,12 @@ jobs:
archType: ${{ parameters.archType }}
buildConfig: ${{ parameters.buildConfig }}
${{ insert }}: ${{ parameters.extraStepsParameters }}
- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/'
PublishLocation: Container
ArtifactName: Logs_Build_${{ parameters.osGroup }}_${{ parameters.osSubGroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}_${{ parameters.nameSuffix }}
continueOnError: true
condition: always()

View file

@ -27,7 +27,6 @@ parameters:
jobs:
# Linux arm
- ${{ if or(containsValue(parameters.platforms, 'Linux_arm'), in(parameters.platformGroup, 'all', 'gcstress')) }}:
- template: xplat-setup.yml
parameters:

View file

@ -77,14 +77,6 @@ jobs:
- name: SignType
value: test
- ${{ if eq(parameters.runtimeVariant, 'llvmjit') }}:
- name: llvmParameter
value: /p:MonoEnableLLVM=true
- ${{ if eq(parameters.runtimeVariant, 'llvmaot') }}:
- name: llvmParameter
value: /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true
# Set up non-PR build from internal project
- ${{ if eq(parameters.isOfficialBuild, true) }}:
- name: SignType
@ -405,9 +397,11 @@ jobs:
buildType: current
downloadType: specific
downloadPath: '$(Build.SourcesDirectory)/__download__/AllPlatforms/'
allowPartiallySucceededBuilds: true
itemPattern: |
$(runtimeFlavorName)Product_*/**
libraries_bin_*/**
!*Logs*
- ${{ if eq(parameters.buildFullPlatformManifest, true) }}:
- ${{ each platform in parameters.platforms }}:

View file

@ -62,13 +62,13 @@ stages:
isOfficialBuild: ${{ variables.isOfficialBuild }}
#
# Build Mono release
# Build Mono runtime packs
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/mono/templates/build-job.yml
runtimeFlavor: mono
jobTemplate: /eng/pipelines/common/global-build-job.yml
buildConfig: release
runtimeFlavor: mono
platforms:
- Android_x64
- Android_x86
@ -92,16 +92,18 @@ stages:
# - Windows_NT_arm
# - Windows_NT_arm64
jobParameters:
buildArgs: -s mono+libs+installer -c $(_BuildConfig)
nameSuffix: AllSubsets_Mono
isOfficialBuild: ${{ variables.isOfficialBuild }}
extraStepsTemplate: /eng/pipelines/common/upload-unsigned-artifacts-step.yml
extraStepsParameters:
name: MonoRuntimePacks
#
# Build Mono LLVM release
# Build Mono LLVM runtime packs
#
- template: /eng/pipelines/common/platform-matrix.yml
- template: /eng/pipelines/common/platform-matrix-multijob.yml
parameters:
jobTemplate: /eng/pipelines/mono/templates/build-job.yml
runtimeFlavor: mono
buildConfig: release
platforms:
- OSX_x64
- Linux_x64
@ -113,29 +115,32 @@ stages:
# - Windows_NT_x86
# - Windows_NT_arm
# - Windows_NT_arm64
jobParameters:
runtimeVariant: LLVMJIT
isOfficialBuild: ${{ variables.isOfficialBuild }}
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/mono/templates/build-job.yml
runtimeFlavor: mono
buildConfig: release
platforms:
- OSX_x64
- Linux_x64
# - Linux_arm
# - Linux_arm64
# - Linux_musl_x64
# - Linux_musl_arm64
# - Windows_NT_x64
# - Windows_NT_x86
# - Windows_NT_arm
# - Windows_NT_arm64
jobParameters:
runtimeVariant: LLVMAOT
isOfficialBuild: ${{ variables.isOfficialBuild }}
jobTemplates:
# LLVMJIT
- jobTemplate: /eng/pipelines/common/global-build-job.yml
buildConfig: release
runtimeFlavor: mono
jobParameters:
buildArgs: -s mono+libs+installer -c $(_BuildConfig) /p:MonoEnableLLVM=true
nameSuffix: AllSubsets_Mono_LLVMJIT
runtimeVariant: LLVMJIT
isOfficialBuild: ${{ variables.isOfficialBuild }}
extraStepsTemplate: /eng/pipelines/common/upload-unsigned-artifacts-step.yml
extraStepsParameters:
name: MonoRuntimePacks
#LLVMAOT
- jobTemplate: /eng/pipelines/common/global-build-job.yml
buildConfig: release
runtimeFlavor: mono
jobParameters:
buildArgs: -s mono+libs+installer -c $(_BuildConfig)
/p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true
nameSuffix: AllSubsets_Mono_LLVMAOT
runtimeVariant: LLVMAOT
isOfficialBuild: ${{ variables.isOfficialBuild }}
extraStepsTemplate: /eng/pipelines/common/upload-unsigned-artifacts-step.yml
extraStepsParameters:
name: MonoRuntimePacks
#
# Build libraries using live CoreLib from CoreCLR
@ -159,30 +164,6 @@ stages:
isOfficialBuild: ${{ variables.isOfficialBuild }}
liveRuntimeBuildConfig: release
#
# Build libraries using live CoreLib from Mono
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/libraries/build-job.yml
buildConfig: Release
runtimeFlavor: mono
platforms:
- Android_x64
- Android_x86
- Android_arm
- Android_arm64
- tvOS_x64
- tvOS_arm64
- iOS_x64
- iOS_x86
- iOS_arm
- iOS_arm64
- Browser_wasm
jobParameters:
isOfficialBuild: ${{ variables.isOfficialBuild }}
liveRuntimeBuildConfig: release
#
# Build libraries AllConfigurations for packages
#
@ -221,64 +202,6 @@ stages:
- Windows_NT_arm
- Windows_NT_arm64
#
# Installer Build for platforms using Mono
#
- template: /eng/pipelines/installer/installer-matrix.yml
parameters:
jobParameters:
liveRuntimeBuildConfig: release
liveLibrariesBuildConfig: Release
isOfficialBuild: ${{ variables.isOfficialBuild }}
useOfficialAllConfigurations: false
buildFullPlatformManifest: false
runtimeFlavor: mono
platforms:
- OSX_x64
- Linux_x64
- tvOS_x64
- tvOS_arm64
- iOS_arm
- iOS_arm64
- iOS_x64
- iOS_x86
- Android_arm
- Android_arm64
- Android_x64
- Android_x86
- Browser_wasm
#
# Installer Build for platforms using Mono
#
- template: /eng/pipelines/installer/installer-matrix.yml
parameters:
jobParameters:
liveRuntimeBuildConfig: release
liveLibrariesBuildConfig: Release
isOfficialBuild: ${{ variables.isOfficialBuild }}
useOfficialAllConfigurations: false
buildFullPlatformManifest: false
runtimeVariant: LLVMJIT
runtimeFlavor: mono
platforms:
- OSX_x64
- Linux_x64
- template: /eng/pipelines/installer/installer-matrix.yml
parameters:
jobParameters:
liveRuntimeBuildConfig: release
liveLibrariesBuildConfig: Release
isOfficialBuild: ${{ variables.isOfficialBuild }}
useOfficialAllConfigurations: false
buildFullPlatformManifest: false
runtimeVariant: LLVMAOT
runtimeFlavor: mono
platforms:
- OSX_x64
- Linux_x64
- ${{ if eq(variables.isOfficialBuild, true) }}:
- template: /eng/pipelines/official/stages/publish.yml
parameters:

View file

@ -3,6 +3,8 @@
<PropertyGroup>
<FrameworkPackageName>Microsoft.NETCore.App</FrameworkPackageName>
<BuildFullPlatformManifest>false</BuildFullPlatformManifest>
<!-- Workaround for https://github.com/dotnet/runtime/issues/37503 -->
<PermitDllAndExeFilesLackingFileVersion Condition="'$(OS)' == 'Windows_NT' and '$(RuntimeFlavor)' == 'Mono'">true</PermitDllAndExeFilesLackingFileVersion>
</PropertyGroup>
<ItemGroup>

View file

@ -15,7 +15,7 @@
<!-- Packages opt-in to automatic RID-specific builds by placing a *.RID.props next to their project
that defines the OfficialBuildRID item: all RIDs targeted by the package -->
<Import Project="$(MSBuildProjectDirectory)\*.rids.props" />
<Import Project="$(MSBuildProjectDirectory)\*.rids.props" Condition="'$(BuildingAnOfficialBuildLeg)' != 'true' or '$(RuntimeFlavor)' != 'Mono'"/>
<!-- create the "BuildRID" item which is the set of all supported RIDs, with metadata.
We'll add a RID for the current platform even if it isn't in the officially supported set -->