From 68438edabab1c2eb578d830112dd10752548a3b2 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Fri, 14 Jun 2024 10:26:16 -0700 Subject: [PATCH] Revert "[release/6.0-staging] Merge #92901 (#102862)" (#103484) This reverts commit f71677a0b37458856dbf2fd5fcfdadd0c68e846d. --- eng/pipelines/common/global-build-job.yml | 11 +- .../common/templates/global-build-step.yml | 12 - .../common/templates/runtimes/xplat-job.yml | 9 + eng/pipelines/common/xplat-setup.yml | 9 - eng/pipelines/coreclr/templates/build-job.yml | 8 + .../coreclr/templates/crossdac-build.yml | 54 ++++ .../coreclr/templates/crossdac-hostarch.yml | 9 - .../coreclr/templates/crossdac-pack.yml | 79 ++++++ .../coreclr/templates/xplat-pipeline-job.yml | 6 + eng/pipelines/global-build.yml | 10 +- eng/pipelines/installer/installer-matrix.yml | 22 ++ eng/pipelines/installer/jobs/base-job.yml | 29 +- eng/pipelines/runtime-official.yml | 262 ++++++++---------- eng/pipelines/runtime.yml | 40 +-- eng/pipelines/runtimelab.yml | 3 +- src/coreclr/build-runtime.cmd | 9 +- src/native/corehost/build.cmd | 11 +- 17 files changed, 334 insertions(+), 249 deletions(-) delete mode 100644 eng/pipelines/common/templates/global-build-step.yml create mode 100644 eng/pipelines/coreclr/templates/crossdac-build.yml delete mode 100644 eng/pipelines/coreclr/templates/crossdac-hostarch.yml create mode 100644 eng/pipelines/coreclr/templates/crossdac-pack.yml create mode 100644 eng/pipelines/installer/installer-matrix.yml diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml index 5f2dc62fee36ee..56fa7022289fc9 100644 --- a/eng/pipelines/common/global-build-job.yml +++ b/eng/pipelines/common/global-build-job.yml @@ -171,12 +171,11 @@ jobs: displayName: Install native dependencies # Build - - template: /eng/pipelines/common/templates/global-build-step.yml - parameters: - buildArgs: ${{ parameters.buildArgs }} - useContinueOnErrorDuringBuild: ${{ parameters.useContinueOnErrorDuringBuild }} - shouldContinueOnError: ${{ parameters.shouldContinueOnError }} - archType: ${{ parameters.archType }} + - ${{ if eq(parameters.buildingOnSourceBuildImage, false) }}: + - script: $(_sclEnableCommand) $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_crossBuildPropertyArg) $(_cxx11Parameter) $(_richCodeNavigationParam) $(_buildDarwinFrameworksParameter) + displayName: Build product + ${{ if eq(parameters.useContinueOnErrorDuringBuild, true) }}: + continueOnError: ${{ parameters.shouldContinueOnError }} - ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS', 'Android') }}: - script: | diff --git a/eng/pipelines/common/templates/global-build-step.yml b/eng/pipelines/common/templates/global-build-step.yml deleted file mode 100644 index 59fde17fb5a060..00000000000000 --- a/eng/pipelines/common/templates/global-build-step.yml +++ /dev/null @@ -1,12 +0,0 @@ -parameters: - buildArgs: '' - useContinueOnErrorDuringBuild: false - shouldContinueOnError: false - archType: '' - displayName: Build product - -steps: - - script: $(_sclEnableCommand) $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci -arch ${{ parameters.archType }} $(_osParameter) ${{ parameters.buildArgs }} $(_officialBuildParameter) $(_crossBuildPropertyArg) $(_cxx11Parameter) $(_richCodeNavigationParam) $(_buildDarwinFrameworksParameter) - displayName: ${{ parameters.displayName }} - ${{ if eq(parameters.useContinueOnErrorDuringBuild, true) }}: - continueOnError: ${{ parameters.shouldContinueOnError }} diff --git a/eng/pipelines/common/templates/runtimes/xplat-job.yml b/eng/pipelines/common/templates/runtimes/xplat-job.yml index c3f67f2cd515fb..6e5d208f37937b 100644 --- a/eng/pipelines/common/templates/runtimes/xplat-job.yml +++ b/eng/pipelines/common/templates/runtimes/xplat-job.yml @@ -74,6 +74,15 @@ jobs: - name: buildConfig value: ${{ parameters.buildConfig }} + - name: archType + value: ${{ parameters.archType }} + + - name: osGroup + value: ${{ parameters.osGroup }} + + - name: osSubgroup + value: ${{ parameters.osSubgroup }} + - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}: - name: _HelixSource value: official/dotnet/runtime/$(Build.SourceBranch) diff --git a/eng/pipelines/common/xplat-setup.yml b/eng/pipelines/common/xplat-setup.yml index 019df96eea5dcd..58338384ec8496 100644 --- a/eng/pipelines/common/xplat-setup.yml +++ b/eng/pipelines/common/xplat-setup.yml @@ -48,15 +48,6 @@ jobs: - name: _BuildConfig value: $(buildConfigUpper) - - name: archType - value: ${{ parameters.archType }} - - - name: osGroup - value: ${{ parameters.osGroup }} - - - name: osSubgroup - value: ${{ parameters.osSubgroup }} - - ${{ if or(eq(parameters.osGroup, 'windows'), eq(parameters.hostedOs, 'windows')) }}: - name: archiveExtension value: '.zip' diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 2ee72bec5a4df1..1fe647f427f5c3 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -267,6 +267,14 @@ jobs: artifactName: $(buildProductArtifactName) displayName: 'product build' + - ${{ if and(in(parameters.osGroup, 'windows', 'Linux'), ne(parameters.archType, 'x86'), ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, 'clrTools')) }}: + - template: /eng/pipelines/coreclr/templates/crossdac-build.yml + parameters: + archType: ${{ parameters.archType }} + osGroup: ${{ parameters.osGroup }} + osSubgroup: ${{ parameters.osSubgroup }} + isOfficialBuild: ${{ parameters.isOfficialBuild }} + - ${{ if and(ne(parameters.compilerName, 'gcc'), ne(parameters.testGroup, ''), ne(parameters.testGroup, 'clrTools')) }}: # Publish test native components for consumption by test execution. - ${{ if ne(parameters.isOfficialBuild, true) }}: diff --git a/eng/pipelines/coreclr/templates/crossdac-build.yml b/eng/pipelines/coreclr/templates/crossdac-build.yml new file mode 100644 index 00000000000000..98cc123878ebb9 --- /dev/null +++ b/eng/pipelines/coreclr/templates/crossdac-build.yml @@ -0,0 +1,54 @@ +parameters: + archType: '' + osGroup: '' + osSubgroup: '' + isOfficialBuild: false + +steps: + # Always build the crossdac, that way we know in CI/PR if things break to build. + - ${{ if and(eq(parameters.osGroup, 'windows'), notin(parameters.archType, 'x86')) }}: + - script: set __TestIntermediateDir=int&&$(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -ci -linuxdac -ninja $(officialBuildIdArg) + displayName: Build Cross OS Linux DAC for Windows + + - script: set __TestIntermediateDir=int&&$(Build.SourcesDirectory)/src/coreclr/build-runtime$(scriptExt) $(buildConfig) $(archType) -ci -alpinedac -ninja $(officialBuildIdArg) + displayName: Build Cross OS Linux-musl DAC for Windows + + - task: CopyFiles@2 + displayName: Gather CrossDac Artifacts (Linux) + inputs: + SourceFolder: $(buildLinuxDacRootFolderPath) + Contents: | + **/* + !**/sharedFramework/**/* + TargetFolder: $(buildLinuxDacStagingPath) + + - task: CopyFiles@2 + displayName: Gather CrossDac Artifacts (Linux_musl) + inputs: + SourceFolder: $(buildMuslDacRootFolderPath) + Contents: | + **/* + !**/sharedFramework/**/* + TargetFolder: '$(buildMuslDacStagingPath)' + + - template: /eng/pipelines/coreclr/templates/sign-diagnostic-files.yml + parameters: + basePath: $(crossDacArtifactPath) + isOfficialBuild: ${{ parameters.isOfficialBuild }} + timeoutInMinutes: 30 + + - ${{ if eq(parameters.osGroup, 'Linux') }}: + - task: CopyFiles@2 + displayName: Gather runtime for CrossDac + inputs: + SourceFolder: $(coreClrProductRootFolderPath) + Contents: libcoreclr.so + TargetFolder: '$(crossDacArtifactPath)/${{ parameters.osGroup }}${{ parameters.osSubgroup }}.$(archType).$(buildConfigUpper)/$(crossDacHostArch)' + + # Make the assets available in a single container for the packaging job. + - task: PublishBuildArtifacts@1 + displayName: Publish runtime for CrossDac + inputs: + pathtoPublish: $(crossDacArtifactPath) + PublishLocation: Container + artifactName: $(buildCrossDacArtifactName) diff --git a/eng/pipelines/coreclr/templates/crossdac-hostarch.yml b/eng/pipelines/coreclr/templates/crossdac-hostarch.yml deleted file mode 100644 index da97f322a80b3d..00000000000000 --- a/eng/pipelines/coreclr/templates/crossdac-hostarch.yml +++ /dev/null @@ -1,9 +0,0 @@ -parameters: - archType: '' - -variables: - - name: crossDacHostArch - value: x64 - - ${{ if eq(parameters.archType, 'arm') }}: - - name: crossDacHostArch - value: x86 diff --git a/eng/pipelines/coreclr/templates/crossdac-pack.yml b/eng/pipelines/coreclr/templates/crossdac-pack.yml new file mode 100644 index 00000000000000..fc3ef404c171a9 --- /dev/null +++ b/eng/pipelines/coreclr/templates/crossdac-pack.yml @@ -0,0 +1,79 @@ +parameters: + archType: '' + buildConfig: '' + container: '' + crossDacPlatforms: {} + dependOnEvaluatePaths: false + isOfficialBuild: false + osGroup: '' + osSubgroup: '' + platform: '' + pool: '' + runtimeVariant: '' + stagedBuild: false + testGroup: '' + timeoutInMinutes: '' + variables: {} + +jobs: +- template: xplat-pipeline-job.yml + parameters: + archType: ${{ parameters.archType }} + buildConfig: ${{ parameters.buildConfig }} + container: ${{ parameters.container }} + condition: ${{ parameters.isOfficialBuild }} + helixType: 'build/product/' + osGroup: ${{ parameters.osGroup }} + osSubgroup: ${{ parameters.osSubgroup }} + pool: ${{ parameters.pool }} + runtimeVariant: ${{ parameters.runtimeVariant }} + stagedBuild: ${{ parameters.stagedBuild }} + timeoutInMinutes: ${{ parameters.timeoutInMinutes }} + dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }} + + name: crossdacpack + displayName: CrossDac Packaging + + variables: + - name: officialBuildIdArg + value: '' + - name: crossDacArgs + value: '' + - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}: + - name: officialBuildIdArg + value: '/p:OfficialBuildId=$(Build.BuildNumber)' + - name: crossDacArgs + value: '/p:CrossDacArtifactsDir=$(crossDacArtifactPath)/$(buildCrossDacArtifactName)' + - name: SignType + value: $[ coalesce(variables.OfficialSignType, 'real') ] + - ${{ parameters.variables }} + + dependsOn: + - ${{ if ne(parameters.crossDacPlatforms, '') }}: + - ${{ each platform in parameters.crossDacPlatforms }}: + - ${{ parameters.runtimeFlavor }}_${{ parameters.runtimeVariant }}_product_build_${{ platform }}_${{ parameters.buildConfig }} + + steps: + - task: DownloadBuildArtifacts@0 + displayName: Download CrossDac artifacts + inputs: + artifactName: $(buildCrossDacArtifactName) + downloadPath: $(crossDacArtifactPath) + checkDownloadedFiles: true + + - script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset crossdacpack -arch $(archType) $(osArg) -c $(buildConfig) $(officialBuildIdArg) $(crossDacArgs) -ci + displayName: Build crossdac packaging + + # Save packages using the prepare-signed-artifacts format. + - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml + parameters: + name: ${{ parameters.platform }} + + # Upload to artifacts to be signed + - task: PublishPipelineArtifact@1 + displayName: Publish Logs + inputs: + targetPath: $(Build.SourcesDirectory)/artifacts/log + artifactName: 'CrossDacPackagingLogs' + continueOnError: true + condition: always() diff --git a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml index fd9c0085f1495a..7a57236ee14067 100644 --- a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml @@ -71,6 +71,12 @@ jobs: - name: buildProductRootFolderPath value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(buildConfigUpper)' + - name: buildCrossDacArtifactName + value: CoreCLRCrossDacArtifacts + + - name: crossDacArtifactPath + value: $(Build.SourcesDirectory)/artifacts/$(buildCrossDacArtifactName) + - name: buildMuslDacRootFolderPath value: '$(Build.SourcesDirectory)/artifacts/bin/coreclr/alpine.$(archType).$(buildConfigUpper)' diff --git a/eng/pipelines/global-build.yml b/eng/pipelines/global-build.yml index aee67ca820e236..420ba301ad12ee 100644 --- a/eng/pipelines/global-build.yml +++ b/eng/pipelines/global-build.yml @@ -128,11 +128,9 @@ jobs: - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: Release + buildConfig: release platforms: - - SourceBuild_linux_x64 + - SourceBuild_Linux_x64 jobParameters: - nameSuffix: PortableSourceBuild - timeoutInMinutes: 95 - condition: - eq(dependencies.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true) + nameSuffix: SourceBuild + timeoutInMinutes: 90 diff --git a/eng/pipelines/installer/installer-matrix.yml b/eng/pipelines/installer/installer-matrix.yml new file mode 100644 index 00000000000000..e9ae06bf267690 --- /dev/null +++ b/eng/pipelines/installer/installer-matrix.yml @@ -0,0 +1,22 @@ +parameters: + runtimeFlavor: 'coreclr' + platforms: [] + jobParameters: [] + buildConfig: Release + runtimeVariant: '' + +jobs: + +# +# Build and Test +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/installer/jobs/base-job.yml + buildConfig: ${{ parameters.buildConfig }} + platforms: ${{ parameters.platforms }} + passPlatforms: true + runtimeFlavor: ${{ parameters.runtimeFlavor }} + runtimeVariant: ${{ parameters.runtimeVariant }} + jobParameters: + ${{ insert }}: ${{ parameters.jobParameters }} diff --git a/eng/pipelines/installer/jobs/base-job.yml b/eng/pipelines/installer/jobs/base-job.yml index ddc8d7f3dc91b1..6a2d1f919f22ce 100644 --- a/eng/pipelines/installer/jobs/base-job.yml +++ b/eng/pipelines/installer/jobs/base-job.yml @@ -397,9 +397,32 @@ jobs: env: Token: $(dn-bot-dnceng-artifact-feeds-rw) - - script: $(BaseJobBuildCommand) - displayName: Build - continueOnError: ${{ and(eq(variables.SkipTests, false), eq(parameters.shouldContinueOnError, true)) }} + # Build the default subset non-MacOS platforms + - ${{ if ne(parameters.osGroup, 'OSX') }}: + - script: $(BaseJobBuildCommand) + displayName: Build + continueOnError: ${{ and(eq(variables.SkipTests, false), eq(parameters.shouldContinueOnError, true)) }} + + # Build corehost, sign and add entitlements to MacOS binaries + - ${{ if eq(parameters.osGroup, 'OSX') }}: + - script: $(BaseJobBuildCommand) -subset host.native + displayName: Build CoreHost + continueOnError: ${{ and(eq(variables.SkipTests, false), eq(parameters.shouldContinueOnError, true)) }} + + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: /eng/pipelines/common/macos-sign-with-entitlements.yml + parameters: + filesToSign: + - name: dotnet + path: $(Build.SourcesDirectory)/artifacts/bin/osx-${{ parameters.archType }}.$(_BuildConfig)/corehost + entitlementsFile: $(Build.SourcesDirectory)/eng/pipelines/common/entitlements.plist + - name: apphost + path: $(Build.SourcesDirectory)/artifacts/bin/osx-${{ parameters.archType }}.$(_BuildConfig)/corehost + entitlementsFile: $(Build.SourcesDirectory)/eng/pipelines/common/entitlements.plist + + - script: $(BaseJobBuildCommand) -subset host.pkg+host.tools+host.tests+packs + displayName: Build and Package + continueOnError: ${{ and(eq(variables.SkipTests, false), eq(parameters.shouldContinueOnError, true)) }} - ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}: - script: | diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index 5bf83132801934..5079f67b772c2c 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -60,139 +60,49 @@ stages: sourceIndexBuildCommand: build.cmd -subset libs.ref+libs.src -binarylog -os Linux -ci # - # Build CoreCLR runtime packs - # Windows x64/x86/arm64/arm - # Sign diagnostic files after native build + # Build CoreCLR # - template: /eng/pipelines/common/platform-matrix.yml parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml + jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml buildConfig: release platforms: - - windows_x64 + - OSX_arm64 + - OSX_x64 + - Linux_x64 + - Linux_arm + - Linux_arm64 + - Linux_musl_x64 + - Linux_musl_arm + - Linux_musl_arm64 - windows_x86 - - windows_arm64 + - windows_x64 - windows_arm + - windows_arm64 jobParameters: - buildArgs: -s clr.runtime+clr.alljits -c $(_BuildConfig) /bl:$(Build.SourcesDirectory)/artifacts/logs/$(_BuildConfig)/CoreClrNativeBuild.binlog - nameSuffix: CoreCLR isOfficialBuild: ${{ variables.isOfficialBuild }} + signBinaries: ${{ variables.isOfficialBuild }} timeoutInMinutes: 120 - postBuildSteps: - - template: /eng/pipelines/coreclr/templates/sign-diagnostic-files.yml - parameters: - basePath: $(Build.SourcesDirectory)/artifacts/bin/coreclr - isOfficialBuild: ${{ variables.isOfficialBuild }} - timeoutInMinutes: 30 - # Now that we've signed the diagnostic files, do the rest of the build. - - template: /eng/pipelines/common/templates/global-build-step.yml - parameters: - buildArgs: -s clr.corelib+clr.nativecorelib+clr.tools+clr.packages+clr.paltestlist+libs+host+packs -c $(_BuildConfig) - displayName: Build managed CoreCLR components, all libraries, hosts, and packs - - # Upload the results. - - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml - parameters: - name: $(osGroup)$(osSubgroup)_$(archType) - # - # Build CoreCLR runtime packs - # Mac x64/arm64 - # Sign and entitle createdump and corerun after native build. - # - template: /eng/pipelines/common/platform-matrix.yml parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml + jobTemplate: /eng/pipelines/coreclr/templates/crossdac-pack.yml buildConfig: release platforms: - - osx_arm64 - - osx_x64 + - windows_x64 jobParameters: - buildArgs: -s clr.runtime+clr.alljits+host.native -c $(_BuildConfig) /bl:$(Build.SourcesDirectory)/artifacts/logs/$(_BuildConfig)/CoreClrNativeBuild.binlog - nameSuffix: CoreCLR isOfficialBuild: ${{ variables.isOfficialBuild }} timeoutInMinutes: 120 - postBuildSteps: - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - template: /eng/pipelines/common/macos-sign-with-entitlements.yml - parameters: - filesToSign: - - name: createdump - path: $(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(_BuildConfig) - entitlementsFile: $(Build.SourcesDirectory)/eng/pipelines/common/createdump-entitlements.plist - - name: corerun - path: $(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(_BuildConfig) - entitlementsFile: $(Build.SourcesDirectory)/eng/pipelines/common/entitlements.plist - - name: dotnet - path: $(Build.SourcesDirectory)/artifacts/bin/$(osGroup)-$(archType).$(_BuildConfig)/corehost - entitlementsFile: $(Build.SourcesDirectory)/eng/pipelines/common/entitlements.plist - - name: apphost - path: $(Build.SourcesDirectory)/artifacts/bin/$(osGroup)-$(archType).$(_BuildConfig)/corehost - entitlementsFile: $(Build.SourcesDirectory)/eng/pipelines/common/entitlements.plist - - - task: CopyFiles@2 - displayName: 'Copy signed createdump to sharedFramework' - inputs: - contents: createdump - sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(_BuildConfig) - targetFolder: $(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(_BuildConfig)/sharedFramework - overWrite: true - - # Now that we've entitled and signed createdump, we can build the rest. - - template: /eng/pipelines/common/templates/global-build-step.yml - parameters: - buildArgs: -s clr.corelib+clr.nativecorelib+clr.tools+clr.packages+libs+host.tools+host.pkg+packs -c $(_BuildConfig) - displayName: Build managed CoreCLR and host components, all libraries, and packs - - # Upload the results. - - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml - parameters: - name: $(osGroup)$(osSubgroup)_$(archType) - - # - # Build CoreCLR runtime packs - # Linux and Linux_musl - # CoreCLR runtime for CrossDac packaging - # Create Linux installers - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: - - linux_x64 - - linux_arm - - linux_arm64 - - linux_musl_x64 - - linux_musl_arm - - linux_musl_arm64 - jobParameters: - buildArgs: -s clr.runtime+clr.alljits+clr.corelib+clr.nativecorelib+clr.tools+clr.packages+libs+host+packs -c $(_BuildConfig) - nameSuffix: CoreCLR - isOfficialBuild: ${{ variables.isOfficialBuild }} - timeoutInMinutes: 120 - postBuildSteps: - # Upload libcoreclr.so for CrossDac packaging - - task: CopyFiles@2 - displayName: Gather runtime for CrossDac - inputs: - SourceFolder: $(Build.SourcesDirectory)/artifacts/bin/coreclr/$(osGroup).$(archType).$(_BuildConfig) - Contents: libcoreclr.so - TargetFolder: $(Build.SourcesDirectory)/artifacts/CoreCLRCrossDacArtifacts/$(osGroup)$(osSubgroup).$(archType).$(_BuildConfig)/$(crossDacHostArch) - - task: PublishBuildArtifacts@1 - displayName: Publish runtime for CrossDac - inputs: - pathToPublish: $(Build.SourcesDirectory)/artifacts/CoreCLRCrossDacArtifacts - PublishLocation: Container - artifactName: CoreCLRCrossDacArtifacts - - # Upload the results. - - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml - parameters: - name: $(osGroup)$(osSubgroup)_$(archType) - extraVariablesTemplates: - - template: /eng/pipelines/coreclr/templates/crossdac-hostarch.yml - + crossDacPlatforms: + - Linux_x64 + - Linux_arm + - Linux_arm64 + - Linux_musl_x64 + - Linux_musl_arm + - Linux_musl_arm64 + - windows_x64 + - windows_arm + - windows_arm64 # # Build Mono runtime packs # @@ -231,7 +141,7 @@ stages: # - windows_arm64 jobParameters: buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) - nameSuffix: Mono + nameSuffix: AllSubsets_Mono isOfficialBuild: ${{ variables.isOfficialBuild }} postBuildSteps: - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml @@ -358,7 +268,7 @@ stages: jobParameters: buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=false - nameSuffix: Mono_LLVMJIT + nameSuffix: AllSubsets_Mono_LLVMJIT runtimeVariant: LLVMJIT isOfficialBuild: ${{ variables.isOfficialBuild }} postBuildSteps: @@ -372,7 +282,7 @@ stages: jobParameters: buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true - nameSuffix: Mono_LLVMAOT + nameSuffix: AllSubsets_Mono_LLVMAOT runtimeVariant: LLVMAOT isOfficialBuild: ${{ variables.isOfficialBuild }} postBuildSteps: @@ -380,6 +290,30 @@ stages: parameters: name: MonoRuntimePacks + # + # Build libraries using live CoreLib from CoreCLR + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/libraries/build-job.yml + buildConfig: Release + platforms: + - OSX_arm64 + - OSX_x64 + - Linux_x64 + - Linux_arm + - Linux_arm64 + - Linux_musl_x64 + - Linux_musl_arm + - Linux_musl_arm64 + - windows_x86 + - windows_x64 + - windows_arm + - windows_arm64 + jobParameters: + isOfficialBuild: ${{ variables.isOfficialBuild }} + liveRuntimeBuildConfig: release + # # Build libraries AllConfigurations for packages # @@ -400,22 +334,46 @@ stages: timeoutInMinutes: 95 # - # Build SourceBuild leg + # Build Sourcebuild leg + # +# - template: /eng/pipelines/common/platform-matrix.yml +# parameters: +# jobTemplate: /eng/pipelines/common/global-build-job.yml +# buildConfig: Release +# helixQueueGroup: ci +# platforms: +# - SourceBuild_Linux_x64 +# jobParameters: +# nameSuffix: SourceBuild +# postBuildSteps: +# - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml +# parameters: +# name: SourceBuildPackages +# timeoutInMinutes: 95 + + + # + # Installer Build # - # - template: /eng/pipelines/common/platform-matrix.yml - # parameters: - # jobTemplate: /eng/pipelines/common/global-build-job.yml - # buildConfig: Release - # helixQueueGroup: ci - # platforms: - # - SourceBuild_Linux_x64 - # jobParameters: - # nameSuffix: PortableSourceBuild - # postBuildSteps: - # - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml - # parameters: - # name: SourceBuildPackages - # timeoutInMinutes: 95 + - template: /eng/pipelines/installer/installer-matrix.yml + parameters: + jobParameters: + liveRuntimeBuildConfig: release + liveLibrariesBuildConfig: Release + isOfficialBuild: ${{ variables.isOfficialBuild }} + platforms: + - OSX_arm64 + - OSX_x64 + - Linux_x64 + - Linux_arm + - Linux_arm64 + - Linux_musl_x64 + - Linux_musl_arm + - Linux_musl_arm64 + - windows_x86 + - windows_x64 + - windows_arm + - windows_arm64 # # Build PGO Instrumented CoreCLR Release @@ -452,26 +410,26 @@ stages: isOfficialBuild: ${{ variables.isOfficialBuild }} timeoutInMinutes: 120 dependsOn: - - Build_Android_arm_release_Mono - - Build_Android_arm64_release_Mono - - Build_Android_x86_release_Mono - - Build_Android_x64_release_Mono - - Build_Browser_wasm_release_Mono - - Build_iOS_arm_release_Mono - - Build_iOS_arm64_release_Mono - - Build_iOSSimulator_x64_release_Mono - - Build_iOSSimulator_x86_release_Mono - - Build_iOSSimulator_arm64_release_Mono - - Build_MacCatalyst_arm64_release_Mono - - Build_MacCatalyst_x64_release_Mono - - Build_tvOS_arm64_release_Mono - - Build_tvOSSimulator_arm64_release_Mono - - Build_tvOSSimulator_x64_release_Mono + - Build_Android_arm_release_AllSubsets_Mono + - Build_Android_arm64_release_AllSubsets_Mono + - Build_Android_x86_release_AllSubsets_Mono + - Build_Android_x64_release_AllSubsets_Mono + - Build_Browser_wasm_release_AllSubsets_Mono + - Build_iOS_arm_release_AllSubsets_Mono + - Build_iOS_arm64_release_AllSubsets_Mono + - Build_iOSSimulator_x64_release_AllSubsets_Mono + - Build_iOSSimulator_x86_release_AllSubsets_Mono + - Build_iOSSimulator_arm64_release_AllSubsets_Mono + - Build_MacCatalyst_arm64_release_AllSubsets_Mono + - Build_MacCatalyst_x64_release_AllSubsets_Mono + - Build_tvOS_arm64_release_AllSubsets_Mono + - Build_tvOSSimulator_arm64_release_AllSubsets_Mono + - Build_tvOSSimulator_x64_release_AllSubsets_Mono - Build_Windows_x64_release_CrossAOT_Mono - - Build_windows_x64_release_CoreCLR - - Build_windows_x86_release_CoreCLR - - Build_windows_arm_release_CoreCLR - - Build_windows_arm64_release_CoreCLR + - installer_coreclr__windows_x64_Release_ + - installer_coreclr__windows_x86_Release_ + - installer_coreclr__windows_arm_Release_ + - installer_coreclr__windows_arm64_Release_ - ${{ if eq(variables.isOfficialBuild, true) }}: - template: /eng/pipelines/official/stages/publish.yml diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index bfa1044e64bc75..80ff1c9b745708 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -181,28 +181,6 @@ jobs: eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), eq(variables['isFullMatrix'], true)) -# -# Build CrossDacs -# -- template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: - - windows_x64 - variables: - - name: _archParameter - value: -arch x64,x86,arm,arm64 - jobParameters: - buildArgs: -s linuxdac+alpinedac -c Checked,$(_BuildConfig) - nameSuffix: CrossDac - isOfficialBuild: false - timeoutInMinutes: 60 - postBuildSteps: - - publish: $(Build.SourcesDirectory)/artifacts/bin/coreclr - displayName: Publish CrossDacs for diagnostics - artifact: CoreCLRCrossDacArtifacts - # Build Mono AOT offset headers once, for consumption elsewhere # Only when mono changed # @@ -217,7 +195,7 @@ jobs: - iOS_arm64 - MacCatalyst_x64 jobParameters: - isOfficialBuild: false + isOfficialBuild: ${{ variables.isOfficialBuild }} condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true), @@ -858,9 +836,8 @@ jobs: # These are always built since they only take like 15 minutes # we expect these to be done before we finish libraries or coreclr testing. # -- template: /eng/pipelines/common/platform-matrix.yml +- template: /eng/pipelines/installer/installer-matrix.yml parameters: - jobTemplate: /eng/pipelines/installer/jobs/base-job.yml buildConfig: ${{ variables.debugOnPrReleaseOnRolling }} platforms: - Linux_arm @@ -872,15 +849,9 @@ jobs: jobParameters: liveRuntimeBuildConfig: release liveLibrariesBuildConfig: Release - runOnlyIfDependenciesSucceeded: true - condition: - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), - eq(variables['isRollingBuild'], true)) -- template: /eng/pipelines/common/platform-matrix.yml +- template: /eng/pipelines/installer/installer-matrix.yml parameters: - jobTemplate: /eng/pipelines/installer/jobs/base-job.yml buildConfig: Release platforms: - OSX_arm64 @@ -893,11 +864,6 @@ jobs: jobParameters: liveRuntimeBuildConfig: release liveLibrariesBuildConfig: ${{ variables.debugOnPrReleaseOnRolling }} - runOnlyIfDependenciesSucceeded: true - condition: - or( - eq(dependencies.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true), - eq(variables['isRollingBuild'], true)) # # CoreCLR Test builds using live libraries release build diff --git a/eng/pipelines/runtimelab.yml b/eng/pipelines/runtimelab.yml index 7fc478f09b1919..f88459777482f0 100644 --- a/eng/pipelines/runtimelab.yml +++ b/eng/pipelines/runtimelab.yml @@ -121,9 +121,8 @@ stages: # Installer official builds need to build installers and need the libraries all configurations build - ${{ if eq(variables.isOfficialBuild, true) }}: - - template: /eng/pipelines/common/platform-matrix.yml + - template: /eng/pipelines/installer/installer-matrix.yml parameters: - jobTemplate: /eng/pipelines/installer/jobs/base-job.yml jobParameters: liveRuntimeBuildConfig: Release liveLibrariesBuildConfig: Release diff --git a/src/coreclr/build-runtime.cmd b/src/coreclr/build-runtime.cmd index 97c1854c43663f..ab805f370aa209 100644 --- a/src/coreclr/build-runtime.cmd +++ b/src/coreclr/build-runtime.cmd @@ -246,13 +246,8 @@ if NOT "%__BuildType%"=="Release" ( set __PgoOptimize=0 ) -set __TargetOSDirName=%__TargetOS% -if "%__TargetOS%"=="alpine" ( - set __TargetOSDirName=linux_musl -) - -set "__BinDir=%__RootBinDir%\bin\coreclr\%__TargetOSDirName%.%__BuildArch%.%__BuildType%" -set "__IntermediatesDir=%__RootBinDir%\obj\coreclr\%__TargetOSDirName%.%__BuildArch%.%__BuildType%" +set "__BinDir=%__RootBinDir%\bin\coreclr\%__TargetOS%.%__BuildArch%.%__BuildType%" +set "__IntermediatesDir=%__RootBinDir%\obj\coreclr\%__TargetOS%.%__BuildArch%.%__BuildType%" set "__LogsDir=%__RootBinDir%\log\!__BuildType!" set "__MsbuildDebugLogsDir=%__LogsDir%\MsbuildDebugLogs" set "__ArtifactsIntermediatesDir=%__RepoRootDir%\artifacts\obj\coreclr\" diff --git a/src/native/corehost/build.cmd b/src/native/corehost/build.cmd index 224d491ae9fee6..6239d5df9507b0 100644 --- a/src/native/corehost/build.cmd +++ b/src/native/corehost/build.cmd @@ -132,12 +132,11 @@ if "%__RuntimeFlavor%" NEQ "Mono" ( echo Copying "%__CoreClrArtifacts%\corehost\PDB\singlefilehost.pdb" "%__CMakeBinDir%/corehost/PDB/" copy /B /Y "%__CoreClrArtifacts%\corehost\PDB\singlefilehost.pdb" "%__CMakeBinDir%/corehost/PDB/" - if exist "%__CoreClrArtifacts%\x64\dactabletools\InjectResource.exe" ( - echo Embedding "%__CoreClrArtifacts%\mscordaccore.dll" into "%__CMakeBinDir%\corehost\singlefilehost.exe" - "%__CoreClrArtifacts%\x64\dactabletools\InjectResource.exe" /bin:"%__CoreClrArtifacts%\mscordaccore.dll" /dll:"%__CMakeBinDir%\corehost\singlefilehost.exe" /name:MINIDUMP_EMBEDDED_AUXILIARY_PROVIDER - ) else if exist "%__CoreClrArtifacts%\dactabletools\InjectResource.exe" ( - echo Embedding "%__CoreClrArtifacts%\mscordaccore.dll" into "%__CMakeBinDir%\corehost\singlefilehost.exe" - "%__CoreClrArtifacts%\dactabletools\InjectResource.exe" /bin:"%__CoreClrArtifacts%\mscordaccore.dll" /dll:"%__CMakeBinDir%\corehost\singlefilehost.exe" /name:MINIDUMP_EMBEDDED_AUXILIARY_PROVIDER + echo Embedding "%__CoreClrArtifacts%\mscordaccore.dll" into "%__CMakeBinDir%\corehost\singlefilehost.exe" + if not exist "%__CoreClrArtifacts%\x64\dactabletools\InjectResource.exe" ( + "%__CoreClrArtifacts%\dactabletools\InjectResource.exe" /bin:"%__CoreClrArtifacts%\mscordaccore.dll" /dll:"%__CMakeBinDir%\corehost\singlefilehost.exe" /name:MINIDUMP_EMBEDDED_AUXILIARY_PROVIDER + ) else ( + "%__CoreClrArtifacts%\x64\dactabletools\InjectResource.exe" /bin:"%__CoreClrArtifacts%\mscordaccore.dll" /dll:"%__CMakeBinDir%\corehost\singlefilehost.exe" /name:MINIDUMP_EMBEDDED_AUXILIARY_PROVIDER ) IF ERRORLEVEL 1 (