From 73a10ccd4a5d84ceac914966e70900c776cf0d2f Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Fri, 17 Apr 2020 13:46:30 -0400 Subject: [PATCH] Adds support for generating Mono named NETCore.App Runtime Packs (#34980) Starting with osx, we will produce a uniquely named runtime pack with Mono. The intent is to give the sdk an easier way to identify the mono runtime. We will now publish Microsoft.NETCore.App.Mono.Runtime..nupg --- eng/Subsets.props | 22 ++++++++++--------- eng/pipelines/installer/jobs/base-job.yml | 10 ++++++--- .../jobs/steps/upload-job-artifacts.yml | 5 +++-- eng/pipelines/runtime-official.yml | 1 + eng/pipelines/runtime.yml | 1 + src/installer/Directory.Build.props | 3 +++ .../pkg/projects/Directory.Build.targets | 17 ++++++++++---- .../pkg/Microsoft.NETCore.App.Runtime.pkgproj | 5 +---- .../Microsoft.NETCore.App.Internal.pkgproj | 1 + .../pkg/legacy/Microsoft.NETCore.App.pkgproj | 1 + .../workaround/Microsoft.NETCore.App.pkgproj | 1 + 11 files changed, 44 insertions(+), 23 deletions(-) diff --git a/eng/Subsets.props b/eng/Subsets.props index d33944f97ddbd..690edad4a8f9f 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -39,10 +39,20 @@ clr+mono+libs+installer mono+libs+installer - mono+libs + mono+libs + + <_subset Condition="'$(Subset)' != ''">+$(Subset.ToLowerInvariant())+ + <_subset Condition="'$(Subset)' == ''">+$(DefaultSubsets)+ + + + + Mono + Mono + CoreCLR + clr.runtime+linuxdac+clr.corelib+clr.nativecorelib+clr.tools+clr.buildtools+clr.packages mono.llvm+ @@ -51,12 +61,10 @@ libs.depprojs+libs.native+libs.ref+libs.src+libs.pretest+libs.packages corehost+installer.managed+installer.depprojs+installer.pkgprojs+bundles+installers+installer.tests - installer.depprojs+installer.pkgprojs + installer.pkgprojs - <_subset Condition="'$(Subset)' != ''">+$(Subset.ToLowerInvariant())+ - <_subset Condition="'$(Subset)' == ''">+$(DefaultSubsets)+ <_subset>$(_subset.Replace('+clr+', '+$(DefaultCoreClrSubsets)+')) <_subset>$(_subset.Replace('+mono+', '+$(DefaultMonoSubsets)+')) <_subset>$(_subset.Replace('+libs+', '+$(DefaultLibrariesSubsets)+')) @@ -66,12 +74,6 @@ <_subset>+$(_subset.Trim('+'))+ - - Mono - Mono - CoreCLR - - diff --git a/eng/pipelines/installer/jobs/base-job.yml b/eng/pipelines/installer/jobs/base-job.yml index 3a6494b0b23df..23a0f95367460 100644 --- a/eng/pipelines/installer/jobs/base-job.yml +++ b/eng/pipelines/installer/jobs/base-job.yml @@ -38,8 +38,8 @@ parameters: platforms: [] jobs: -- job: ${{ format('installer_{0}_{1}', coalesce(parameters.name, parameters.platform), parameters.buildConfig) }} - displayName: ${{ format('Installer Build and Test {0} {1}', coalesce(parameters.name, parameters.platform), parameters.buildConfig) }} +- job: ${{ format('installer_{0}_{1}_{2}', parameters.runtimeFlavor, coalesce(parameters.name, parameters.platform), parameters.buildConfig) }} + displayName: ${{ format('Installer Build and Test {0} {1} {2}', parameters.runtimeFlavor, coalesce(parameters.name, parameters.platform), parameters.buildConfig) }} condition: and(succeeded(), ${{ parameters.condition }}) pool: ${{ parameters.pool }} @@ -65,7 +65,7 @@ jobs: - name: SkipTests value: ${{ or( not(in(parameters.archType, 'x64', 'x86')), - in(parameters.osGroup, 'iOS', 'tvOS', 'Android'), + eq(parameters.runtimeFlavor, 'mono'), eq(parameters.isOfficialBuild, true), ne(parameters.crossrootfsDir, '')) }} @@ -97,6 +97,7 @@ jobs: /p:TargetArchitecture=${{ parameters.archType }} /p:PortableBuild=true /p:SkipTests=$(SkipTests) + /p:RuntimeFlavor=${{ parameters.runtimeFlavor }} $(OfficialBuildArg) - name: MsbuildSigningArguments value: >- @@ -119,6 +120,7 @@ jobs: value: >- /p:PortableBuild=true /p:SkipTests=$(SkipTests) + /p:RuntimeFlavor=${{ parameters.runtimeFlavor }} - name: BaseJobBuildCommand value: >- @@ -184,6 +186,7 @@ jobs: value: >- /p:Configuration=$(_BuildConfig) /p:TargetArchitecture=${{ parameters.archType }} + /p:RuntimeFlavor=${{ parameters.runtimeFlavor }} $(OfficialBuildArg) - name: _PortableBuild @@ -496,6 +499,7 @@ jobs: - template: steps/upload-job-artifacts.yml parameters: name: ${{ coalesce(parameters.name, parameters.platform) }} + runtimeFlavor: ${{ parameters.runtimeFlavor }} skipTests: $(SkipTests) isOfficialBuild: ${{ eq(parameters.isOfficialBuild, true) }} diff --git a/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml b/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml index 05232836e569c..672a12aa61be7 100644 --- a/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml +++ b/eng/pipelines/installer/jobs/steps/upload-job-artifacts.yml @@ -1,5 +1,6 @@ parameters: name: '' + runtimeFlavor: 'coreclr' isOfficialBuild: false @@ -17,7 +18,7 @@ steps: testResultsFiles: '*.xml' searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' mergeTestResults: true - testRunTitle: Installer-${{ parameters.name }}-$(_BuildConfig) + testRunTitle: Installer-${{ parameters.runtimeFlavor }}-${{ parameters.name }}-$(_BuildConfig) continueOnError: true condition: eq(variables.SkipTests, false) @@ -37,6 +38,6 @@ steps: displayName: Publish BuildLogs inputs: targetPath: '$(Build.StagingDirectory)/BuildLogs' - artifactName: Installer-Logs-${{ parameters.name }}-$(_BuildConfig) + artifactName: Installer-Logs-${{ parameters.runtimeFlavor }}-${{ parameters.name }}-$(_BuildConfig) continueOnError: true condition: succeededOrFailed() diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index e2cd3a2d67d96..528535fd4083d 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -186,6 +186,7 @@ stages: buildFullPlatformManifest: false runtimeFlavor: mono platforms: + - OSX_x64 - tvOS_x64 - tvOS_arm64 # - iOS_arm # https://github.com/dotnet/runtime/issues/34465 diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 9a7b6d8ef5ea4..4b3f2c2e43513 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -521,6 +521,7 @@ jobs: - Android_arm64 - tvOS_x64 - iOS_arm64 + - OSX_x64 jobParameters: liveRuntimeBuildConfig: release liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} diff --git a/src/installer/Directory.Build.props b/src/installer/Directory.Build.props index 2a99c0661a485..364b1f92b9955 100644 --- a/src/installer/Directory.Build.props +++ b/src/installer/Directory.Build.props @@ -197,12 +197,14 @@ true true + true true true + true @@ -210,6 +212,7 @@ true true true + true diff --git a/src/installer/pkg/projects/Directory.Build.targets b/src/installer/pkg/projects/Directory.Build.targets index 55c28ef3d5deb..4e85dd7682cc5 100644 --- a/src/installer/pkg/projects/Directory.Build.targets +++ b/src/installer/pkg/projects/Directory.Build.targets @@ -15,17 +15,26 @@ - true + + + + BaseId=$(MSBuildProjectName)$(RuntimeSpecificFrameworkSuffix).Mono.$(PackageBuildRID);IdPrefix= + + + - true - true - true + true - diff --git a/src/installer/pkg/projects/netcoreapp/pkg/legacy/Microsoft.NETCore.App.Internal.pkgproj b/src/installer/pkg/projects/netcoreapp/pkg/legacy/Microsoft.NETCore.App.Internal.pkgproj index bea575e85c83b..bf4c13e02e050 100644 --- a/src/installer/pkg/projects/netcoreapp/pkg/legacy/Microsoft.NETCore.App.Internal.pkgproj +++ b/src/installer/pkg/projects/netcoreapp/pkg/legacy/Microsoft.NETCore.App.Internal.pkgproj @@ -3,6 +3,7 @@ $(MSBuildThisFileDirectory)Microsoft.NETCore.App.pkgproj + true diff --git a/src/installer/pkg/projects/netcoreapp/pkg/legacy/Microsoft.NETCore.App.pkgproj b/src/installer/pkg/projects/netcoreapp/pkg/legacy/Microsoft.NETCore.App.pkgproj index a797eccbbcf61..4ca074396a538 100644 --- a/src/installer/pkg/projects/netcoreapp/pkg/legacy/Microsoft.NETCore.App.pkgproj +++ b/src/installer/pkg/projects/netcoreapp/pkg/legacy/Microsoft.NETCore.App.pkgproj @@ -8,6 +8,7 @@ false data/ + true diff --git a/src/installer/pkg/projects/netcoreapp/pkg/workaround/Microsoft.NETCore.App.pkgproj b/src/installer/pkg/projects/netcoreapp/pkg/workaround/Microsoft.NETCore.App.pkgproj index d9d6f3423c3dd..d5ae432d189a4 100644 --- a/src/installer/pkg/projects/netcoreapp/pkg/workaround/Microsoft.NETCore.App.pkgproj +++ b/src/installer/pkg/projects/netcoreapp/pkg/workaround/Microsoft.NETCore.App.pkgproj @@ -17,6 +17,7 @@ false false + true