diff --git a/Directory.Build.props b/Directory.Build.props index bff6874d7bbe4d..03f77f38f6dc4b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -17,39 +17,8 @@ false - - <_hostOS>linux - <_hostOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx - <_hostOS Condition="$([MSBuild]::IsOSPlatform('FREEBSD'))">freebsd - <_hostOS Condition="$([MSBuild]::IsOSPlatform('NETBSD'))">netbsd - <_hostOS Condition="$([MSBuild]::IsOSPlatform('ILLUMOS'))">illumos - <_hostOS Condition="$([MSBuild]::IsOSPlatform('SOLARIS'))">solaris - <_hostOS Condition="$([MSBuild]::IsOSPlatform('HAIKU'))">haiku - <_hostOS Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">windows - $(_hostOS) - browser - $(_hostOS) - true - true - - - - - <_hostArch>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant) - $(_hostArch) - wasm - wasm - arm - armv6 - armel - arm64 - loongarch64 - s390x - ppc64le - x64 - x64 - $(TargetArchitecture) - + + - - - - <_portableOS>$(TargetOS.ToLowerInvariant()) - <_portableOS Condition="'$(_portableOS)' == 'windows'">win - - - <_portableOS Condition="'$(_portableOS)' == 'anyos'">$(__PortableTargetOS) - - - <_portableOS Condition="'$(_portableOS)' == 'linux' and '$(__PortableTargetOS)' == 'linux-musl'">linux-musl - <_portableOS Condition="'$(_portableOS)' == 'linux' and '$(__PortableTargetOS)' == 'linux-bionic'">linux-bionic - - - <_portableOS Condition="'$(HostOS)' == 'win' and '$(TargetsMobile)' != 'true'">win - - - - - <_packageOS>$(_portableOS) - - <_packageOS Condition="'$(CrossBuild)' == 'true' and '$(_portableOS)' != 'linux-musl' and '$(_portableOS)' != 'linux-bionic' and '$(_portableOS)' != 'android'">$(_hostOS) - - - $(PackageOS)-$(TargetArchitecture) - $(_packageOS)-$(TargetArchitecture) - - - - - - <_portableHostOS>$(_hostOS) - <_portableHostOS Condition="'$(_portableHostOS)' == 'windows'">win - <_portableHostOS Condition="'$(CrossBuild)' != 'true' and '$(_portableOS)' == 'linux-musl'">linux-musl - - - $(ToolsOS)-$(_hostArch) - $(_portableHostOS)-$(_hostArch) - - - $(ToolsRID) - - - - - <_hostRid Condition="'$(MSBuildRuntimeType)' == 'core'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier) - <_hostRid Condition="'$(MSBuildRuntimeType)' != 'core'">win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant) - - <_parseDistroRid>$(__DistroRid) - <_parseDistroRid Condition="'$(_parseDistroRid)' == ''">$(_hostRid) - <_distroRidIndex>$(_parseDistroRid.LastIndexOf('-')) - - <_outputOS>$(_parseDistroRid.SubString(0, $(_distroRidIndex))) - <_outputOS Condition="'$(PortableBuild)' == 'true'">$(_portableOS) - - $(_outputOS)-$(TargetArchitecture) - - - - true - true - true - true - true - true - true - true - true - true - true - true - true - true - true - true - true - true - true - true - + $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'microsoft.netcore.app.ref')) diff --git a/eng/DotNetBuild.props b/eng/DotNetBuild.props index 87a013e43b127f..1631f76ce95771 100644 --- a/eng/DotNetBuild.props +++ b/eng/DotNetBuild.props @@ -38,6 +38,19 @@ true + + + + false + + true + + false + + @@ -107,6 +120,8 @@ $(InnerBuildArgs) /p:NetCoreAppToolCurrentVersion=$(NetCoreAppToolCurrentVersion) + + $(InnerBuildArgs) /p:EnableDefaultRidSpecificArtifacts=$(EnableDefaultRidSpecificArtifacts) diff --git a/eng/OSArch.props b/eng/OSArch.props new file mode 100644 index 00000000000000..d1be0745175825 --- /dev/null +++ b/eng/OSArch.props @@ -0,0 +1,35 @@ + + + <_hostOS>linux + <_hostOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx + <_hostOS Condition="$([MSBuild]::IsOSPlatform('FREEBSD'))">freebsd + <_hostOS Condition="$([MSBuild]::IsOSPlatform('NETBSD'))">netbsd + <_hostOS Condition="$([MSBuild]::IsOSPlatform('ILLUMOS'))">illumos + <_hostOS Condition="$([MSBuild]::IsOSPlatform('SOLARIS'))">solaris + <_hostOS Condition="$([MSBuild]::IsOSPlatform('HAIKU'))">haiku + <_hostOS Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">windows + $(_hostOS) + browser + $(_hostOS) + true + true + + + + + <_hostArch>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant) + $(_hostArch) + wasm + wasm + arm + armv6 + armel + arm64 + loongarch64 + s390x + ppc64le + x64 + x64 + $(TargetArchitecture) + + \ No newline at end of file diff --git a/eng/Publishing.props b/eng/Publishing.props index da3d606ed683c4..114ae7675bb5ff 100644 --- a/eng/Publishing.props +++ b/eng/Publishing.props @@ -1,153 +1,63 @@ - - + true false - - $(TargetArchitecture) - - - - - - + + true + true + $(ArtifactsDir)staging/ + $(ArtifactsStagingDir)SymStore + + $(ArtifactsStagingDir) + $(ArtifactsStagingDir)packages/$(Configuration)/Shipping + $(ArtifactsStagingDir)packages/$(Configuration)/NonShipping + true + + $(ArtifactsTmpDir)/manifests/$(Configuration) + VerticalManifest.xml + + + + + + + %(FullPath).sha512 + - - - - - - - - - - - - - - - - + + <_HostArtifact Include="$(ArtifactsPackagesDir)**\runtime.*.Microsoft.NETCore.ILAsm.*.nupkg" + Exclude="$(ArtifactsPackagesDir)**\runtime.$(OutputRID).Microsoft.NETCore.ILAsm.*.nupkg" /> - - + <_HostArtifact Include="$(ArtifactsPackagesDir)**\runtime.*.Microsoft.NETCore.ILDAsm.*.nupkg" + Exclude="$(ArtifactsPackagesDir)**\runtime.$(OutputRID).Microsoft.NETCore.ILDAsm.*.nupkg" /> - - + <_HostArtifact Include="$(ArtifactsPackagesDir)**\runtime.*.Microsoft.DotNet.ILCompiler.*.nupkg" + Exclude="$(ArtifactsPackagesDir)**\runtime.$(OutputRID).Microsoft.DotNet.ILCompiler.*.nupkg" /> - - + <_HostArtifact Include="$(ArtifactsPackagesDir)**\Microsoft.NETCore.App.Crossgen2.*.nupkg" + Exclude="$(ArtifactsPackagesDir)**\Microsoft.NETCore.App.Crossgen2.$(OutputRID).*.nupkg" /> - - - - - - - - - - - - - - - - - - - - - - + @@ -168,15 +78,15 @@ This ensures that we don't produce these files in the "Repo source build" builds, but we do produce them in both the VMR and the runtime official build. --> - - <_ShouldGenerateProductVersionFiles Condition="'$(DotNetBuildRepo)' == 'true' and '$(DotNetBuildOrchestrator)' == 'true'">true - <_ShouldGenerateProductVersionFiles Condition="'$(DotNetBuildRepo)' != 'true' and '$(DotNetBuildOrchestrator)' != 'true'">true + + true + true + Condition="'$(ShouldGenerateProductVersionFiles)' == 'true'"> - - + + + + + + + + + + - - - - - - - - - diff --git a/eng/RuntimeIdentifier.props b/eng/RuntimeIdentifier.props new file mode 100644 index 00000000000000..9ebd5e65194874 --- /dev/null +++ b/eng/RuntimeIdentifier.props @@ -0,0 +1,100 @@ + + + false + true + + + + + + + <_portableOS>$(TargetOS.ToLowerInvariant()) + <_portableOS Condition="'$(_portableOS)' == 'windows'">win + + + <_portableOS Condition="'$(_portableOS)' == 'anyos'">$(__PortableTargetOS) + + + <_portableOS Condition="'$(_portableOS)' == 'linux' and '$(__PortableTargetOS)' == 'linux-musl'">linux-musl + <_portableOS Condition="'$(_portableOS)' == 'linux' and '$(__PortableTargetOS)' == 'linux-bionic'">linux-bionic + + + <_portableOS Condition="'$(HostOS)' == 'win' and '$(TargetsMobile)' != 'true'">win + + + + + <_packageOS>$(_portableOS) + + <_packageOS Condition="'$(CrossBuild)' == 'true' and '$(_portableOS)' != 'linux-musl' and '$(_portableOS)' != 'linux-bionic' and '$(_portableOS)' != 'android'">$(_hostOS) + + + $(PackageOS)-$(TargetArchitecture) + $(_packageOS)-$(TargetArchitecture) + + + + + + <_portableHostOS>$(_hostOS) + <_portableHostOS Condition="'$(_portableHostOS)' == 'windows'">win + <_portableHostOS Condition="'$(CrossBuild)' != 'true' and '$(_portableOS)' == 'linux-musl'">linux-musl + + + $(ToolsOS)-$(_hostArch) + $(_portableHostOS)-$(_hostArch) + + + $(ToolsRID) + + + + + <_hostRid Condition="'$(MSBuildRuntimeType)' == 'core'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier) + <_hostRid Condition="'$(MSBuildRuntimeType)' != 'core'">win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant) + + <_parseDistroRid>$(__DistroRid) + <_parseDistroRid Condition="'$(_parseDistroRid)' == ''">$(_hostRid) + <_distroRidIndex>$(_parseDistroRid.LastIndexOf('-')) + + <_outputOS>$(_parseDistroRid.SubString(0, $(_distroRidIndex))) + <_outputOS Condition="'$(PortableBuild)' == 'true'">$(_portableOS) + + $(_outputOS)-$(TargetArchitecture) + + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + \ No newline at end of file diff --git a/eng/Signing.props b/eng/Signing.props index 12fc319128c6a6..1cda36dc4eb1b9 100644 --- a/eng/Signing.props +++ b/eng/Signing.props @@ -1,6 +1,33 @@ + + + - false + + false + true + false + + + $(PackageRID) + + true + + true @@ -14,6 +41,9 @@ + + + @@ -43,41 +73,100 @@ This package name has the version in it, so we need to use a wildcard to discover the right name. --> - - + + + - - - - - - - - - - + + %(FullPath).sha512 - + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eng/extract-for-crossdac.ps1 b/eng/extract-for-crossdac.ps1 index 24ce91d1043fd3..2ae2e61e5d3240 100644 --- a/eng/extract-for-crossdac.ps1 +++ b/eng/extract-for-crossdac.ps1 @@ -20,6 +20,6 @@ foreach ($file in Get-ChildItem $DownloadDirectory -Recurse -Filter '*.nupkg') { Write-Host "Extracting Package: $id $ver to $ExtractDirectory/$($id.ToLowerInvariant())/$ver" [System.IO.Compression.ZipFile]::ExtractToDirectory($file.FullName, "$ExtractDirectory/$($id.ToLowerInvariant())/$ver") } else { - throw "Unexpected file name: $($file.Name)" + Write-Host "Skipping non-runtime pack: $($file.Name)" } } diff --git a/eng/pipelines/common/global-build-job.yml b/eng/pipelines/common/global-build-job.yml index 6bdd96038acf75..76a8364f74c8dd 100644 --- a/eng/pipelines/common/global-build-job.yml +++ b/eng/pipelines/common/global-build-job.yml @@ -52,9 +52,26 @@ jobs: timeoutInMinutes: ${{ parameters.timeoutInMinutes }} enablePublishTestResults: ${{ parameters.enablePublishTestResults }} testResultsFormat: ${{ parameters.testResultsFormat }} + enableMicrobuild: ${{ parameters.isOfficialBuild }} + enableMicrobuildForMacAndLinux: ${{ parameters.isOfficialBuild }} - ${{ if ne(parameters.templateContext, '') }}: - templateContext: ${{ parameters.templateContext }} + templateContext: + ${{ if ne(parameters.templateContext, '') }}: + ${{ each pair in parameters.templateContext }}: + ${{ if notIn(pair.key, 'outputs') }}: + ${{ pair.key }}: ${{ pair.value }} + outputs: + - ${{ if ne(parameters.templateContext.outputs, '') }}: + - ${{ each output in parameters.templateContext.outputs }}: + ${{ output.key }}: ${{ output.value }} + - ${{ if eq(parameters.isOfficialBuild, true) }}: + - output: pipelineArtifact + displayName: 'Publish Pipeline Artifacts' + ${{ if eq(parameters.hostedOs, '') }}: + artifactName: ${{ format('build_{0}{1}_{2}_{3}_{4}_Artifacts', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.nameSuffix) }} + ${{ if ne(parameters.hostedOs, '') }}: + artifactName: ${{ format('build_{0}{1}_{2}_{3}_{4}_{5}_Artifacts', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.hostedOs, parameters.buildConfig, parameters.nameSuffix) }} + targetPath: $(Build.SourcesDirectory)/artifacts/staging artifacts: publish: @@ -90,6 +107,12 @@ jobs: - name: _archParameter value: -arch ${{ parameters.archType }} + - name: _AssetManifestName + value: ${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.nameSuffix }} + + - name: _SignType + value: $[ coalesce(variables.OfficialSignType, 'real') ] + - ${{ if and(eq(parameters.osGroup, 'linux'), eq(parameters.osSubGroup, '_bionic')) }}: - name: _osParameter value: -os linux-bionic @@ -117,13 +140,13 @@ jobs: - ${{ if ne(parameters.cxxAbiLibrary, '') }}: - name: CxxAbiLibraryArg value: /p:TargetCxxAbiLibrary=${{ parameters.cxxAbiLibrary }} - + - name: TargetCxxLibraryConfigurationArgs value: $(CxxStandardLibraryArg) $(CxxStandardLibraryStaticArg) $(CxxAbiLibraryArg) - name: _officialBuildParameter ${{ if eq(parameters.isOfficialBuild, true) }}: - value: /p:OfficialBuildId=$(Build.BuildNumber) + value: /p:OfficialBuildId=$(Build.BuildNumber) /p:DotNetPublishUsingPipelines=true /p:SignType=$(_SignType) /p:DotNetSignType=$(_SignType) ${{ if ne(parameters.isOfficialBuild, true) }}: value: '' diff --git a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml index 26b86483cd8e28..f88692190cc221 100644 --- a/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml +++ b/eng/pipelines/common/templates/runtimes/build-runtime-tests-and-send-to-helix.yml @@ -27,7 +27,6 @@ parameters: displayName: '' timeoutInMinutes: '' enableMicrobuild: '' - gatherAssetManifests: false shouldContinueOnError: false steps: diff --git a/eng/pipelines/common/templates/runtimes/build-runtime-tests.yml b/eng/pipelines/common/templates/runtimes/build-runtime-tests.yml index a822ccf28fd288..1b1660693d6e03 100644 --- a/eng/pipelines/common/templates/runtimes/build-runtime-tests.yml +++ b/eng/pipelines/common/templates/runtimes/build-runtime-tests.yml @@ -11,7 +11,6 @@ parameters: displayName: '' timeoutInMinutes: '' enableMicrobuild: '' - gatherAssetManifests: false shouldContinueOnError: false diff --git a/eng/pipelines/common/templates/runtimes/xplat-job.yml b/eng/pipelines/common/templates/runtimes/xplat-job.yml index e22f8f968c4790..3b7dfa334ed259 100644 --- a/eng/pipelines/common/templates/runtimes/xplat-job.yml +++ b/eng/pipelines/common/templates/runtimes/xplat-job.yml @@ -18,7 +18,6 @@ parameters: displayName: '' timeoutInMinutes: '' enableMicrobuild: '' - gatherAssetManifests: false disableComponentGovernance: '' templatePath: 'templates' @@ -69,11 +68,6 @@ jobs: ${{ else }}: disableComponentGovernance: ${{ parameters.disableComponentGovernance }} - # Setting this results in the arcade job template including a step - # that gathers asset manifests and publishes them to pipeline - # storage. Only relevant for build jobs. - enablePublishBuildAssets: ${{ parameters.gatherAssetManifests }} - artifacts: publish: ${{ if ne(parameters.logsName, '') }}: diff --git a/eng/pipelines/official/pipeline.yml b/eng/pipelines/official/pipeline.yml new file mode 100644 index 00000000000000..e343edd0e52b3f --- /dev/null +++ b/eng/pipelines/official/pipeline.yml @@ -0,0 +1,30 @@ +parameters: +- name: buildStage + type: stage +- name: otherStages + type: stageList + +extends: + template: /eng/pipelines/common/templates/pipeline-with-resources.yml + parameters: + isOfficialBuild: true + stages: + - ${{ each stage in parameters.otherStages }}: + - ${{ insert }}: ${{ stage }} + - ${{ insert }}: ${{ parameters.buildStage }} + + - stage: Publish + jobs: + - template: /eng/pipelines/official/prepare-signed-artifacts.yml + parameters: + buildStage: ${{ parameters.buildStage }} + logArtifactName: 'Logs-PrepareSignedArtifacts_Attempt$(System.JobAttempt)' + - template: /eng/common/templates-official/job/publish-build-assets.yml + parameters: + publishUsingPipelines: true + publishAssetsImmediately: true + pool: + name: $(DncEngInternalBuildPool) + demands: ImageOverride -equals 1es-windows-2022 + symbolPublishingAdditionalParameters: '/p:PublishSpecialClrFiles=true' + dependsOn: PrepareSignedArtifacts diff --git a/eng/pipelines/official/jobs/prepare-signed-artifacts.yml b/eng/pipelines/official/prepare-signed-artifacts.yml similarity index 73% rename from eng/pipelines/official/jobs/prepare-signed-artifacts.yml rename to eng/pipelines/official/prepare-signed-artifacts.yml index 1440a7a1dfdc35..ab28ff29899acb 100644 --- a/eng/pipelines/official/jobs/prepare-signed-artifacts.yml +++ b/eng/pipelines/official/prepare-signed-artifacts.yml @@ -1,7 +1,9 @@ parameters: - PublishRidAgnosticPackagesFromPlatform: '' - isOfficialBuild: false - logArtifactName: 'Logs-PrepareSignedArtifacts_Attempt$(System.JobAttempt)' + - name: logArtifactName + type: string + default: 'Logs-PrepareSignedArtifacts_Attempt$(System.JobAttempt)' + - name: buildStage + type: stage jobs: - template: /eng/common/templates-official/job/job.yml @@ -31,9 +33,15 @@ jobs: repository: self clean: true fetchDepth: 20 - - input: pipelineArtifact - artifactName: IntermediateArtifacts - targetPath: $(Build.SourcesDirectory)\artifacts\PackageDownload\IntermediateArtifacts + - ${{ each job in parameters.buildStage.jobs }}: + # Source Build publishes itself, so we don't need to publish it + - ${{ if notIn(job.job, 'Source_Build_Linux_x64')}}: + - input: pipelineArtifact + artifactName: ${{ job.job }}_Artifacts + targetPath: $(Build.SourcesDirectory)\artifacts + itemPattern: | + **/* + !_manifest/**/* outputs: - output: pipelineArtifact displayName: 'Publish BuildLogs' @@ -45,12 +53,11 @@ jobs: - script: >- build.cmd -restore -sign -publish -ci -configuration Release /p:RestoreToolsetOnly=true - /p:PublishRidAgnosticPackagesFromPlatform=${{ parameters.PublishRidAgnosticPackagesFromPlatform }} - /p:DownloadDirectory=$(Build.SourcesDirectory)\artifacts\PackageDownload\ /p:OfficialBuildId=$(Build.BuildNumber) /p:SignType=$(_SignType) /p:DotNetSignType=$(_SignType) /p:DotNetPublishUsingPipelines=true + /p:DotNetFinalPublish=true /bl:$(Build.SourcesDirectory)\prepare-artifacts.binlog displayName: Prepare artifacts and upload to build diff --git a/eng/pipelines/official/stages/publish.yml b/eng/pipelines/official/stages/publish.yml deleted file mode 100644 index 83b059ffc32a65..00000000000000 --- a/eng/pipelines/official/stages/publish.yml +++ /dev/null @@ -1,57 +0,0 @@ -parameters: - PublishRidAgnosticPackagesFromPlatform: windows_x64 - -stages: - -- stage: PrepareForPublish - displayName: Prepare for Publish - variables: - - template: /eng/common/templates-official/variables/pool-providers.yml - jobs: - # Prep artifacts: sign them and upload pipeline artifacts expected by stages-based publishing. - - template: /eng/pipelines/official/jobs/prepare-signed-artifacts.yml - parameters: - PublishRidAgnosticPackagesFromPlatform: ${{ parameters.PublishRidAgnosticPackagesFromPlatform }} - - # Publish to Build Asset Registry in order to generate the ReleaseConfigs artifact. - - template: /eng/common/templates-official/job/publish-build-assets.yml - parameters: - publishUsingPipelines: true - publishAssetsImmediately: true - dependsOn: PrepareSignedArtifacts - pool: - name: $(DncEngInternalBuildPool) - demands: ImageOverride -equals 1es-windows-2022 - symbolPublishingAdditionalParameters: '/p:PublishSpecialClrFiles=true' - -# Stages-based publishing entry point -- template: /eng/common/templates-official/post-build/post-build.yml - parameters: - validateDependsOn: - - PrepareForPublish - # The following checks are run after the build in the validation and release pipelines - # And thus are not enabled here. They can be enabled for dev builds for spot testing if desired - enableSymbolValidation: false - enableSigningValidation: false - enableNugetValidation: false - enableSourceLinkValidation: false - publishAssetsImmediately: true - SDLValidationParameters: - enable: false - artifactNames: - - PackageArtifacts - - BlobArtifacts - params: >- - -SourceToolsList @("policheck","credscan") - -TsaInstanceURL "$(TsaInstanceURL)" - -TsaProjectName "$(TsaProjectName)" - -TsaNotificationEmail "$(TsaNotificationEmail)" - -TsaCodebaseAdmin "$(TsaCodebaseAdmin)" - -TsaBugAreaPath "$(TsaBugAreaPath)" - -TsaIterationPath "$(TsaIterationPath)" - -TsaRepositoryName "$(TsaRepositoryName)" - -TsaCodebaseName "$(TsaCodebaseName)" - -TsaPublish $True - symbolPublishingAdditionalParameters: '/p:PublishSpecialClrFiles=true' - # Publish to blob storage. - publishInstallersAndChecksums: true diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index 7b3afe0f222315..c6591a5f09e49f 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -30,32 +30,33 @@ variables: teamName: dotnet-core-acquisition extends: - template: /eng/pipelines/common/templates/pipeline-with-resources.yml + template: /eng/pipelines/official/pipeline.yml parameters: - isOfficialBuild: true - stages: - - stage: Build - jobs: - - # - # Localization build - # - - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}: + otherStages: + - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}: + - stage: Localization + jobs: + # + # Localization build + # - template: /eng/common/templates-official/job/onelocbuild.yml parameters: MirrorRepo: runtime MirrorBranch: main LclSource: lclFilesfromPackage LclPackageId: 'LCL-JUNO-PROD-RUNTIME' - - # - # Source Index Build - # - - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}: - - template: /eng/common/templates-official/job/source-index-stage1.yml - parameters: - sourceIndexBuildCommand: build.cmd -subset libs.sfx+libs.oob -binarylog -os linux -ci /p:SkipLibrariesNativeRuntimePackages=true - + - stage: Source_Index + displayName: Source Index + jobs: + # + # Source Index Build + # + - template: /eng/common/templates-official/job/source-index-stage1.yml + parameters: + sourceIndexBuildCommand: build.cmd -subset libs.sfx+libs.oob -binarylog -os linux -ci /p:SkipLibrariesNativeRuntimePackages=true + buildStage: + stage: Build + jobs: # # Build CoreCLR runtime packs # Windows x64/arm64 @@ -72,31 +73,28 @@ extends: variables: - name: _SignDiagnosticFilesArgs value: '' + - name: _EnableDefaultArtifactsArg + value: $[iif(and(eq(variables.osGroup, 'windows'), eq(variables.archType, 'x64')),'/p:EnableDefaultRidSpecificArtifacts=false','')] jobParameters: templatePath: 'templates-official' preBuildSteps: - template: /eng/pipelines/coreclr/templates/install-diagnostic-certs.yml parameters: - isOfficialBuild: ${{ variables.isOfficialBuild }} + isOfficialBuild: true certNames: - 'dotnetesrp-diagnostics-aad-ssl-cert' - 'dotnet-diagnostics-esrp-pki-onecert' vaultName: 'clrdiag-esrp-id' azureSubscription: 'diagnostics-esrp-kvcertuser' - buildArgs: -c $(_BuildConfig) /p:DotNetBuildAllRuntimePacks=true $(_SignDiagnosticFilesArgs) + buildArgs: -c $(_BuildConfig) -restore -build -publish /p:DotNetBuildAllRuntimePacks=true $(_SignDiagnosticFilesArgs) $(_EnableDefaultArtifactsArg) nameSuffix: AllRuntimes - isOfficialBuild: ${{ variables.isOfficialBuild }} + isOfficialBuild: true timeoutInMinutes: 120 postBuildSteps: - template: /eng/pipelines/coreclr/templates/remove-diagnostic-certs.yml parameters: - isOfficialBuild: ${{ variables.isOfficialBuild }} - - # Upload the results. - - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml - parameters: - name: $(osGroup)$(osSubgroup)_$(archType) + isOfficialBuild: true # # Build all runtime packs @@ -112,11 +110,16 @@ extends: - osx_x64 jobParameters: templatePath: 'templates-official' - buildArgs: -s clr.runtime+clr.alljits+clr.nativeaotruntime+host.native -c $(_BuildConfig) /bl:$(Build.SourcesDirectory)/artifacts/logs/$(_BuildConfig)/CoreClrNativeBuild.binlog + buildArgs: -s clr.corelib+clr.nativecorelib+clr.nativeaotlibs+clr.tools+clr.packages+mono+libs+host.tools+host.pkg+packs -restore -build -publish -c $(_BuildConfig) /p:DotNetBuildAllRuntimePacks=true nameSuffix: AllRuntimes isOfficialBuild: ${{ variables.isOfficialBuild }} timeoutInMinutes: 120 - postBuildSteps: + preBuildSteps: + # Build our native assets first so we can sign them. + - template: /eng/pipelines/common/templates/global-build-step.yml + parameters: + buildArgs: -s clr.runtime+clr.alljits+clr.nativeaotruntime+host.native -c $(_BuildConfig) /bl:$(Build.SourcesDirectory)/artifacts/logs/$(_BuildConfig)/CoreClrNativeBuild.binlog + displayName: Build native CoreCLR and host components - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - template: /eng/pipelines/common/macos-sign-with-entitlements.yml parameters: @@ -130,27 +133,16 @@ extends: - name: apphost path: $(Build.SourcesDirectory)/artifacts/bin/$(osGroup)-$(archType).$(_BuildConfig)/corehost - - 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.nativeaotlibs+clr.tools+clr.packages+mono+libs+host.tools+host.pkg+packs -c $(_BuildConfig) /p:DotNetBuildAllRuntimePacks=true - displayName: Build managed CoreCLR and host components, Mono, all libraries, and packs - - # Upload the results. - - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml - parameters: - name: $(osGroup)$(osSubgroup)_$(archType) + - 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 # - # Build all runtime packs for Linux and Linux musl + # Build all runtime packs for Linux, Linux musl, and mobile # - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -163,17 +155,29 @@ extends: - linux_musl_x64 - linux_musl_arm - linux_musl_arm64 + - android_x64 + - android_x86 + - android_arm + - android_arm64 + - maccatalyst_x64 + - maccatalyst_arm64 + - tvossimulator_x64 + - tvossimulator_arm64 + - tvos_arm64 + - iossimulator_x64 + - iossimulator_arm64 + - ios_arm64 + - linux_bionic_x64 + - linux_bionic_arm + - linux_bionic_arm64 + - browser_wasm + - wasi_wasm jobParameters: templatePath: 'templates-official' - buildArgs: -c $(_BuildConfig) /p:DotNetBuildAllRuntimePacks=true + buildArgs: -c $(_BuildConfig) -restore -build -publish /p:DotNetBuildAllRuntimePacks=true nameSuffix: AllRuntimes - isOfficialBuild: ${{ variables.isOfficialBuild }} + isOfficialBuild: true timeoutInMinutes: 120 - postBuildSteps: - # Upload the results. - - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml - parameters: - name: $(osGroup)$(osSubgroup)_$(archType) # # Build and Pack CrossDac @@ -186,24 +190,54 @@ extends: - windows_x64 jobParameters: templatePath: 'templates-official' - buildArgs: -s crossdacpack -c $(_BuildConfig) /p:CrossRuntimeExtractionRoot=$(CrossRuntimeExtractionRoot) $(_SignDiagnosticFilesArgs) + buildArgs: -s crossdacpack -restore -build -publish -c $(_BuildConfig) /p:EnableDefaultRidSpecificArtifacts=false /p:CrossRuntimeExtractionRoot=$(CrossRuntimeExtractionRoot) $(_SignDiagnosticFilesArgs) nameSuffix: CrossDac - isOfficialBuild: ${{ variables.isOfficialBuild }} + isOfficialBuild: true timeoutInMinutes: 120 - preBuildSteps: - - task: DownloadPipelineArtifact@2 - displayName: Download runtime packs for CrossDac + templateContext: inputs: - artifact: 'IntermediateArtifacts' - path: $(Build.SourcesDirectory)/artifacts/RuntimeDownload - patterns: | - IntermediateArtifacts/linux_*/Shipping/Microsoft.NETCore.App.Runtime.linux-*.nupkg - !IntermediateArtifacts/linux_*/Shipping/Microsoft.NETCore.App.Runtime.linux-*.symbols.nupkg - - powershell: $(Build.SourcesDirectory)/eng/extract-for-crossdac.ps1 -DownloadDirectory $(Build.SourcesDirectory)/artifacts/RuntimeDownload -ExtractDirectory $(CrossRuntimeExtractionRoot) + - input: pipelineArtifact + artifactName: Build_linux_x64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/RuntimeDownload + itemPattern: | + packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-x64.*.nupkg + !packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-x64.*.symbols.nupkg + - input: pipelineArtifact + artifactName: Build_linux_arm64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/RuntimeDownload + itemPattern: | + packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-arm64.*.nupkg + !packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-arm64.*.symbols.nupkg + - input: pipelineArtifact + artifactName: Build_linux_musl_x64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/RuntimeDownload + itemPattern: | + packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-musl-x64.*.nupkg + !packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-musl-x64.*.symbols.nupkg + - input: pipelineArtifact + artifactName: Build_linux_musl_arm64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/RuntimeDownload + itemPattern: | + packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-musl-arm64.*.nupkg + !packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-musl-arm64.*.symbols.nupkg + - input: pipelineArtifact + artifactName: Build_linux_arm_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/RuntimeDownload + itemPattern: | + packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-arm.*.nupkg + !packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-arm.*.symbols.nupkg + - input: pipelineArtifact + artifactName: Build_linux_musl_arm_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/RuntimeDownload + itemPattern: | + packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-musl-arm.*.nupkg + !packages/Release/Shipping/Microsoft.NETCore.App.Runtime.linux-musl-arm.*.symbols.nupkg + preBuildSteps: + - powershell: $(Build.SourcesDirectory)/eng/extract-for-crossdac.ps1 -DownloadDirectory $(Build.ArtifactStagingDirectory)/artifacts/RuntimeDownload -ExtractDirectory $(CrossRuntimeExtractionRoot) displayName: Extract runtime packs - template: /eng/pipelines/coreclr/templates/install-diagnostic-certs.yml parameters: - isOfficialBuild: ${{ variables.isOfficialBuild }} + isOfficialBuild: true certNames: - 'dotnetesrp-diagnostics-aad-ssl-cert' - 'dotnet-diagnostics-esrp-pki-onecert' @@ -212,12 +246,7 @@ extends: postBuildSteps: - template: /eng/pipelines/coreclr/templates/remove-diagnostic-certs.yml parameters: - isOfficialBuild: ${{ variables.isOfficialBuild }} - # Save packages using the prepare-signed-artifacts format. - # CrossDac packages are expected to be in the windows_x64 folder. - - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml - parameters: - name: windows_x64 + isOfficialBuild: true dependsOn: - build_linux_x64_release_AllRuntimes - build_linux_arm_release_AllRuntimes @@ -231,73 +260,6 @@ extends: - name: _SignDiagnosticFilesArgs value: '' - # - # Build All runtime packs for mobile platforms - # - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: - - android_x64 - - android_x86 - - android_arm - - android_arm64 - - maccatalyst_x64 - - maccatalyst_arm64 - - tvossimulator_x64 - - tvossimulator_arm64 - - tvos_arm64 - - iossimulator_x64 - - iossimulator_arm64 - - ios_arm64 - - linux_bionic_x64 - - linux_bionic_arm - - linux_bionic_arm64 - jobParameters: - templatePath: 'templates-official' - buildArgs: -c $(_BuildConfig) /p:BuildMonoAOTCrossCompiler=false /p:DotNetBuildAllRuntimePacks=true - nameSuffix: AllRuntimes - isOfficialBuild: ${{ variables.isOfficialBuild }} - postBuildSteps: - # delete duplicate RIDless packages to prevent upload conflict - - task: DeleteFiles@1 - displayName: 'Delete Microsoft.NETCore.App.Ref and Microsoft.NETCore.App.HostModel package' - inputs: - SourceFolder: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping - Contents: | - 'Microsoft.NETCore.App.Ref.*.nupkg' - 'Microsoft.NET.HostModel.*.nupkg' - - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml - parameters: - name: MobileRuntimePacks - - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - runtimeFlavor: mono - platforms: - - browser_wasm - - wasi_wasm - jobParameters: - templatePath: 'templates-official' - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) - nameSuffix: Mono - isOfficialBuild: ${{ variables.isOfficialBuild }} - postBuildSteps: - # delete duplicate RIDless packages to prevent upload conflict - - task: DeleteFiles@1 - displayName: 'Delete Microsoft.NETCore.App.Ref and Microsoft.NETCore.App.HostModel package' - inputs: - SourceFolder: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping - Contents: | - 'Microsoft.NETCore.App.Ref.*.nupkg' - 'Microsoft.NET.HostModel.*.nupkg' - - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml - parameters: - name: MobileRuntimePacks - - template: /eng/pipelines/common/platform-matrix.yml parameters: jobTemplate: /eng/pipelines/common/global-build-job.yml @@ -307,22 +269,10 @@ extends: - browser_wasm jobParameters: templatePath: 'templates-official' - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) /p:WasmEnableThreads=true /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS) + buildArgs: -c $(_BuildConfig) -restore -build -publish /p:DotNetBuildAllRuntimePacks=true /p:WasmEnableThreads=true nameSuffix: Mono_multithread - isOfficialBuild: ${{ variables.isOfficialBuild }} + isOfficialBuild: true runtimeVariant: multithread - postBuildSteps: - # delete duplicate RIDless packages to prevent upload conflict - - task: DeleteFiles@1 - displayName: 'Delete Microsoft.NETCore.App.Ref and Microsoft.NETCore.App.HostModel package' - inputs: - SourceFolder: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping - Contents: | - 'Microsoft.NETCore.App.Ref.*.nupkg' - 'Microsoft.NET.HostModel.*.nupkg' - - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml - parameters: - name: MobileRuntimePacks # # Build Mono LLVM runtime packs @@ -338,23 +288,11 @@ extends: runtimeFlavor: mono jobParameters: templatePath: 'templates-official' - buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) + buildArgs: -s mono+libs+host+packs -c $(_BuildConfig) -restore -build -publish /p:MonoEnableLLVM=true /p:MonoAOTEnableLLVM=true /p:MonoBundleLLVMOptimizer=true nameSuffix: Mono_LLVMAOT runtimeVariant: LLVMAOT - isOfficialBuild: ${{ variables.isOfficialBuild }} - postBuildSteps: - # delete duplicate RIDless packages to prevent upload conflict - - task: DeleteFiles@1 - displayName: 'Delete Microsoft.NETCore.App.Ref and Microsoft.NETCore.App.HostModel package' - inputs: - SourceFolder: $(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)/Shipping - Contents: | - 'Microsoft.NETCore.App.Ref.*.nupkg' - 'Microsoft.NET.HostModel.*.nupkg' - - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml - parameters: - name: $(osGroup)$(osSubgroup)_$(archType) + isOfficialBuild: true # # Build libraries (all TFMs) and packages @@ -367,13 +305,9 @@ extends: - windows_x64 jobParameters: templatePath: 'templates-official' - buildArgs: -s tools.illink+libs -pack -c $(_BuildConfig) /p:TestAssemblies=false /p:TestPackages=true + buildArgs: -s tools.illink+libs -restore -build -pack -publish -c $(_BuildConfig) /p:TestAssemblies=false /p:TestPackages=true /p:EnableDefaultRidSpecificArtifacts=false nameSuffix: Libraries_WithPackages - isOfficialBuild: ${{ variables.isOfficialBuild }} - postBuildSteps: - - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml - parameters: - name: Libraries_WithPackages + isOfficialBuild: true timeoutInMinutes: 95 # # Build SourceBuild packages @@ -401,13 +335,9 @@ extends: - linux_arm64 jobParameters: templatePath: 'templates-official' - buildArgs: -s clr.native+clr.corelib+clr.tools+clr.nativecorelib+libs+host+packs -c $(_BuildConfig) -pgoinstrument /p:SkipLibrariesNativeRuntimePackages=true - isOfficialBuild: ${{ variables.isOfficialBuild }} + buildArgs: -s clr.native+clr.corelib+clr.tools+clr.nativecorelib+libs+host+packs -c $(_BuildConfig) -restore -build -publish -pgoinstrument /p:SkipLibrariesNativeRuntimePackages=true + isOfficialBuild: true nameSuffix: PGO - postBuildSteps: - - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml - parameters: - name: PGO timeoutInMinutes: 95 # @@ -422,96 +352,137 @@ extends: jobParameters: templatePath: 'templates-official' nameSuffix: Workloads - preBuildSteps: - - task: DownloadPipelineArtifact@2 + templateContext: inputs: - artifact: 'IntermediateArtifacts' - path: $(Build.SourcesDirectory)/artifacts/workloadPackages - patterns: | - IntermediateArtifacts/windows_x64/Shipping/Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-*.nupkg - IntermediateArtifacts/windows_arm64/Shipping/Microsoft.NETCore.App.Runtime.AOT.win-arm64.Cross.android-*.nupkg - IntermediateArtifacts/windows_x64/Shipping/Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm*.nupkg - IntermediateArtifacts/windows_arm64/Shipping/Microsoft.NETCore.App.Runtime.AOT.win-arm64.Cross.browser-wasm*.nupkg - IntermediateArtifacts/windows_x64/Shipping/Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.wasi-wasm*.nupkg - IntermediateArtifacts/windows_arm64/Shipping/Microsoft.NETCore.App.Runtime.AOT.win-arm64.Cross.wasi-wasm*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.android-*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.browser-wasm*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.ios-*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.iossimulator-*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.tvos-*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.tvossimulator-*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NET.Workload.Mono.ToolChain.Current.Manifest*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NET.Workload.Mono.ToolChain.net6.Manifest*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NET.Workload.Mono.ToolChain.net7.Manifest*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NET.Workload.Mono.ToolChain.net8.Manifest*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NET.Workload.Mono.ToolChain.net9.Manifest*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NET.Runtime.MonoTargets.Sdk*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NET.Runtime.MonoAOTCompiler.Task*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NET.Runtime.WebAssembly.Sdk*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NET.Runtime.WebAssembly.Wasi*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NET.Runtime.WebAssembly.Templates*.nupkg - IntermediateArtifacts/windows_arm64/Shipping/Microsoft.NETCore.App.Runtime.win-arm64*.nupkg - IntermediateArtifacts/windows_x64/Shipping/Microsoft.NETCore.App.Runtime.win-x64*.nupkg - IntermediateArtifacts/windows_x86/Shipping/Microsoft.NETCore.App.Runtime.win-x86*.nupkg - IntermediateArtifacts/MobileRuntimePacks/Shipping/Microsoft.NET.Sdk.WebAssembly.Pack*.nupkg + - input: pipelineArtifact + artifactName: Build_windows_x64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-*.nupkg + **/Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm*.nupkg + **/Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.wasi-wasm*.nupkg + **/Microsoft.NETCore.App.Runtime.win-x64*.nupkg + - input: pipelineArtifact + artifactName: Build_windows_arm64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.AOT.win-arm64.Cross.android-*.nupkg + **/Microsoft.NETCore.App.Runtime.AOT.win-arm64.Cross.browser-wasm*.nupkg + **/Microsoft.NETCore.App.Runtime.AOT.win-arm64.Cross.wasi-wasm*.nupkg + **/Microsoft.NETCore.App.Runtime.win-arm64*.nupkg + - input: pipelineArtifact + artifactName: Build_windows_x86_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.win-x86*.nupkg + - input: pipelineArtifact + artifactName: Build_android_x64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.Mono.android-*.nupkg + - input: pipelineArtifact + artifactName: Build_android_x86_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.Mono.android-*.nupkg + - input: pipelineArtifact + artifactName: Build_android_arm_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.Mono.android-*.nupkg + - input: pipelineArtifact + artifactName: Build_android_arm64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.Mono.android-*.nupkg + - input: pipelineArtifact + artifactName: Build_browser_wasm_Linux_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NET.Runtime.MonoAOTCompiler.Task*.nupkg + **/Microsoft.NETCore.App.Runtime.Mono.browser-wasm*.nupkg + **/Microsoft.NET.Workload.Mono.ToolChain.Current.Manifest*.nupkg + **/Microsoft.NET.Workload.Mono.ToolChain.net6.Manifest*.nupkg + **/Microsoft.NET.Workload.Mono.ToolChain.net7.Manifest*.nupkg + **/Microsoft.NET.Workload.Mono.ToolChain.net8.Manifest*.nupkg + **/Microsoft.NET.Workload.Mono.ToolChain.net9.Manifest*.nupkg + **/Microsoft.NET.Runtime.MonoTargets.Sdk*.nupkg + **/Microsoft.NET.Runtime.WebAssembly.Sdk*.nupkg + **/Microsoft.NET.Runtime.WebAssembly.Templates*.nupkg + **/Microsoft.NET.Sdk.WebAssembly.Pack*.nupkg + - input: pipelineArtifact + artifactName: build_browser_wasm_linux_release_Mono_multithread_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.Mono.multithread.browser-wasm*.nupkg + - input: pipelineArtifact + artifactName: Build_wasi_wasm_Linux_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NET.Runtime.WebAssembly.Wasi*.nupkg + **/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm*.nupkg + - input: pipelineArtifact + artifactName: Build_ios_arm64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.Mono.ios-*.nupkg + - input: pipelineArtifact + artifactName: Build_iossimulator_x64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.Mono.iossimulator-*.nupkg + - input: pipelineArtifact + artifactName: Build_iossimulator_arm64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.Mono.iossimulator-*.nupkg + - input: pipelineArtifact + artifactName: Build_maccatalyst_x64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-*.nupkg + - input: pipelineArtifact + artifactName: Build_maccatalyst_arm64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.Mono.maccatalyst-*.nupkg + - input: pipelineArtifact + artifactName: Build_tvos_arm64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.Mono.tvos-*.nupkg + - input: pipelineArtifact + artifactName: Build_tvossimulator_x64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.Mono.tvossimulator-*.nupkg + - input: pipelineArtifact + artifactName: Build_tvossimulator_arm64_release_AllRuntimes_Artifacts + targetPath: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + itemPattern: | + **/Microsoft.NETCore.App.Runtime.Mono.tvossimulator-*.nupkg + preBuildSteps: - task: CopyFiles@2 displayName: Flatten packages inputs: - sourceFolder: $(Build.SourcesDirectory)/artifacts/workloadPackages - contents: '*/Shipping/*.nupkg' - cleanTargetFolder: false + sourceFolder: $(Build.ArtifactStagingDirectory)/artifacts/workloadPackages + contents: 'packages/Release/Shipping/*.nupkg' + cleanTargetFolder: true targetFolder: $(Build.SourcesDirectory)/artifacts/workloadPackages flattenFolders: true - buildArgs: -s mono.workloads -c $(_BuildConfig) /p:PackageSource=$(Build.SourcesDirectory)/artifacts/workloadPackages /p:WorkloadOutputPath=$(Build.SourcesDirectory)/artifacts/workloads - - postBuildSteps: - # Prepare packages wrapping msis - - task: CopyFiles@2 - displayName: Prepare package artifacts - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)' - Contents: | - Shipping/**/* - NonShipping/**/* - TargetFolder: '$(Build.ArtifactStagingDirectory)/IntermediateArtifacts1/workloads' - CleanTargetFolder: true - - # Prepare artifacts to be used for generating VS components - - task: CopyFiles@2 - displayName: Prepare VS Insertion artifacts - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts/VSSetup/$(_BuildConfig)' - Contents: | - Insertion/**/* - TargetFolder: '$(Build.ArtifactStagingDirectory)/IntermediateArtifacts2/workloads-vs' - CleanTargetFolder: true - - templateContext: - outputs: - - output: buildArtifacts - PathtoPublish: '$(Build.ArtifactStagingDirectory)/IntermediateArtifacts1' - ArtifactName: IntermediateArtifacts - displayName: 'Publish workload packages' - - output: buildArtifacts - PathtoPublish: '$(Build.ArtifactStagingDirectory)/IntermediateArtifacts2' - ArtifactName: IntermediateArtifacts - displayName: 'Publish workload VS Insertion artifacts' + buildArgs: -s mono.workloads -c $(_BuildConfig) -restore -build -publish /p:PackageSource=$(Build.SourcesDirectory)/artifacts/workloadPackages /p:WorkloadOutputPath=$(Build.SourcesDirectory)/artifacts/workloads /p:ShouldGenerateProductVersionFiles=true /p:EnableDefaultRidSpecificArtifacts=false - isOfficialBuild: ${{ variables.isOfficialBuild }} + isOfficialBuild: true timeoutInMinutes: 120 dependsOn: - Build_android_arm_release_AllRuntimes - Build_android_arm64_release_AllRuntimes - Build_android_x86_release_AllRuntimes - Build_android_x64_release_AllRuntimes - - Build_browser_wasm_Linux_release_Mono - - Build_wasi_wasm_linux_release_Mono + - Build_browser_wasm_Linux_release_AllRuntimes + - Build_wasi_wasm_linux_release_AllRuntimes - Build_ios_arm64_release_AllRuntimes - Build_iossimulator_x64_release_AllRuntimes - Build_iossimulator_arm64_release_AllRuntimes @@ -523,8 +494,4 @@ extends: - Build_windows_x64_release_AllRuntimes - Build_windows_x86_release_AllRuntimes - Build_windows_arm64_release_AllRuntimes - - - ${{ if eq(variables.isOfficialBuild, true) }}: - - template: /eng/pipelines/official/stages/publish.yml - parameters: - isOfficialBuild: ${{ variables.isOfficialBuild }} + - build_browser_wasm_linux_release_Mono_multithread