From 38bf4dff86b649e6a31c5a3d715d2a7141e03920 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue, 29 Sep 2020 01:23:14 +0000 Subject: [PATCH] [master] Update dependencies from Microsoft/vstest dotnet/runtime-assets dotnet/llvm-project dotnet/xharness dotnet/icu dotnet/arcade mono/linker (#42619) [master] Update dependencies from Microsoft/vstest dotnet/runtime-assets dotnet/llvm-project dotnet/xharness dotnet/icu dotnet/arcade mono/linker --- eng/Version.Details.xml | 144 ++++++++++++------------- eng/Versions.props | 64 +++++------ eng/common/templates/job/source-build.yml | 49 +++++++++ eng/common/templates/jobs/jobs.yml | 16 +++ eng/common/templates/jobs/source-build.yml | 48 +++++++++ eng/common/templates/post-build/post-build.yml | 31 +++--- eng/common/templates/steps/send-to-helix.yml | 40 +++++-- eng/common/templates/steps/source-build.yml | 66 ++++++++++++ eng/common/tools.ps1 | 4 +- eng/common/tools.sh | 2 + global.json | 8 +- 11 files changed, 342 insertions(+), 130 deletions(-) create mode 100644 eng/common/templates/job/source-build.yml create mode 100644 eng/common/templates/jobs/source-build.yml create mode 100644 eng/common/templates/steps/source-build.yml diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 55da067..4d23b71 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -4,67 +4,67 @@ https://github.com/dotnet/standard cfe95a23647c7de1fe1a349343115bd7720d6949 - + https://github.com/dotnet/icu - 5f7e15bd40266f803f4c1ffb7dcecd077c86a1e7 + 0f6722e8dad76f88e284f660c4634fe2e38a7654 - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 61cde6e8fb9d5c9790867b279deb41783a780cd8 - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 61cde6e8fb9d5c9790867b279deb41783a780cd8 - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 61cde6e8fb9d5c9790867b279deb41783a780cd8 - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 61cde6e8fb9d5c9790867b279deb41783a780cd8 - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 61cde6e8fb9d5c9790867b279deb41783a780cd8 - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 61cde6e8fb9d5c9790867b279deb41783a780cd8 - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 61cde6e8fb9d5c9790867b279deb41783a780cd8 - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 61cde6e8fb9d5c9790867b279deb41783a780cd8 - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 61cde6e8fb9d5c9790867b279deb41783a780cd8 - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 61cde6e8fb9d5c9790867b279deb41783a780cd8 - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 61cde6e8fb9d5c9790867b279deb41783a780cd8 - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 61cde6e8fb9d5c9790867b279deb41783a780cd8 - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 61cde6e8fb9d5c9790867b279deb41783a780cd8 - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 61cde6e8fb9d5c9790867b279deb41783a780cd8 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -86,77 +86,77 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization f69d7fc09c4fdb9e9427741b9a176e867dab577f - + https://github.com/microsoft/vstest - 70a599d905c8033982e34dfb3b00290bf9df1961 + 2418d9ec492e93245e1ce8699d6ae9cd7b86649b - + https://github.com/dotnet/runtime-assets - 436a2ae5c082f68a3fbff98bfe097b13902ea3f1 + 429d8a77e5cde49ee94c0a7b16751ce4f40c913c - + https://github.com/dotnet/runtime-assets - 436a2ae5c082f68a3fbff98bfe097b13902ea3f1 + 429d8a77e5cde49ee94c0a7b16751ce4f40c913c - + https://github.com/dotnet/runtime-assets - 436a2ae5c082f68a3fbff98bfe097b13902ea3f1 + 429d8a77e5cde49ee94c0a7b16751ce4f40c913c - + https://github.com/dotnet/runtime-assets - 436a2ae5c082f68a3fbff98bfe097b13902ea3f1 + 429d8a77e5cde49ee94c0a7b16751ce4f40c913c - + https://github.com/dotnet/runtime-assets - 436a2ae5c082f68a3fbff98bfe097b13902ea3f1 + 429d8a77e5cde49ee94c0a7b16751ce4f40c913c - + https://github.com/dotnet/runtime-assets - 436a2ae5c082f68a3fbff98bfe097b13902ea3f1 + 429d8a77e5cde49ee94c0a7b16751ce4f40c913c - + https://github.com/dotnet/runtime-assets - 436a2ae5c082f68a3fbff98bfe097b13902ea3f1 + 429d8a77e5cde49ee94c0a7b16751ce4f40c913c - + https://github.com/dotnet/runtime-assets - 436a2ae5c082f68a3fbff98bfe097b13902ea3f1 + 429d8a77e5cde49ee94c0a7b16751ce4f40c913c - + https://github.com/dotnet/runtime-assets - 436a2ae5c082f68a3fbff98bfe097b13902ea3f1 + 429d8a77e5cde49ee94c0a7b16751ce4f40c913c - + https://github.com/dotnet/llvm-project - aaf816f9833378f5ec4ffe4eec701cc7f94440d7 + 67ada402f1f9e16199e876a1cab1649debe28eab - + https://github.com/dotnet/llvm-project - aaf816f9833378f5ec4ffe4eec701cc7f94440d7 + 67ada402f1f9e16199e876a1cab1649debe28eab - + https://github.com/dotnet/llvm-project - aaf816f9833378f5ec4ffe4eec701cc7f94440d7 + 67ada402f1f9e16199e876a1cab1649debe28eab - + https://github.com/dotnet/llvm-project - aaf816f9833378f5ec4ffe4eec701cc7f94440d7 + 67ada402f1f9e16199e876a1cab1649debe28eab - + https://github.com/dotnet/llvm-project - aaf816f9833378f5ec4ffe4eec701cc7f94440d7 + 67ada402f1f9e16199e876a1cab1649debe28eab - + https://github.com/dotnet/llvm-project - aaf816f9833378f5ec4ffe4eec701cc7f94440d7 + 67ada402f1f9e16199e876a1cab1649debe28eab - + https://github.com/dotnet/llvm-project - aaf816f9833378f5ec4ffe4eec701cc7f94440d7 + 67ada402f1f9e16199e876a1cab1649debe28eab - + https://github.com/dotnet/llvm-project - aaf816f9833378f5ec4ffe4eec701cc7f94440d7 + 67ada402f1f9e16199e876a1cab1649debe28eab https://github.com/dotnet/runtime @@ -186,17 +186,17 @@ https://github.com/dotnet/runtime 0375524a91a47ca4db3ee1be548f74bab7e26e76 - + https://github.com/mono/linker - fe430b87123dd2c0f864c35a2150cfc9f1cb8b8c + 337f0c5c704c52fcd570fab3c69d7fc83c82e6e0 - + https://github.com/dotnet/xharness - 1e93e1e188116805165e232785ab7e718465baae + e875c887915e47d1573a5000255f7f4057b954d5 - + https://github.com/dotnet/xharness - 1e93e1e188116805165e232785ab7e718465baae + e875c887915e47d1573a5000255f7f4057b954d5 diff --git a/eng/Versions.props b/eng/Versions.props index aeff461..aecdf61 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -51,16 +51,16 @@ - 5.0.0-beta.20471.1 - 5.0.0-beta.20471.1 - 5.0.0-beta.20471.1 - 5.0.0-beta.20471.1 - 5.0.0-beta.20471.1 - 5.0.0-beta.20471.1 - 2.5.1-beta.20471.1 - 5.0.0-beta.20471.1 - 5.0.0-beta.20471.1 - 5.0.0-beta.20471.1 + 5.0.0-beta.20474.4 + 5.0.0-beta.20474.4 + 5.0.0-beta.20474.4 + 5.0.0-beta.20474.4 + 5.0.0-beta.20474.4 + 5.0.0-beta.20474.4 + 2.5.1-beta.20474.4 + 5.0.0-beta.20474.4 + 5.0.0-beta.20474.4 + 5.0.0-beta.20474.4 5.0.0-preview.4.20202.18 5.0.0-preview.4.20202.18 @@ -101,15 +101,15 @@ 4.3.0 5.0.0-alpha.1.19563.3 - 5.0.0-beta.20451.1 - 5.0.0-beta.20451.1 - 5.0.0-beta.20451.1 - 5.0.0-beta.20451.1 - 5.0.0-beta.20451.1 - 5.0.0-beta.20451.1 - 5.0.0-beta.20451.1 - 5.0.0-beta.20451.1 - 5.0.0-beta.20451.1 + 5.0.0-beta.20476.1 + 5.0.0-beta.20476.1 + 5.0.0-beta.20476.1 + 5.0.0-beta.20476.1 + 5.0.0-beta.20476.1 + 5.0.0-beta.20476.1 + 5.0.0-beta.20476.1 + 5.0.0-beta.20476.1 + 5.0.0-beta.20476.1 2.2.0-prerelease.19564.1 2.0.3 @@ -133,9 +133,9 @@ 4.9.4 4.9.4 - 16.8.0-release-20200921-02 - 1.0.0-prerelease.20466.1 - 1.0.0-prerelease.20466.1 + 16.8.0-release-20200924-01 + 1.0.0-prerelease.20476.2 + 1.0.0-prerelease.20476.2 2.4.1 2.4.2 1.3.0 @@ -146,18 +146,18 @@ 5.0.0-preview-20200924.1 - 6.0.0-alpha.1.20472.1 + 6.0.0-alpha.1.20478.2 - 6.0.0-alpha.1.20471.1 + 6.0.0-alpha.1.20475.1 - 9.0.1-alpha.1.20472.1 - 9.0.1-alpha.1.20472.1 - 9.0.1-alpha.1.20472.1 - 9.0.1-alpha.1.20472.1 - 9.0.1-alpha.1.20472.1 - 9.0.1-alpha.1.20472.1 - 9.0.1-alpha.1.20472.1 - 9.0.1-alpha.1.20472.1 + 9.0.1-alpha.1.20475.1 + 9.0.1-alpha.1.20475.1 + 9.0.1-alpha.1.20475.1 + 9.0.1-alpha.1.20475.1 + 9.0.1-alpha.1.20475.1 + 9.0.1-alpha.1.20475.1 + 9.0.1-alpha.1.20475.1 + 9.0.1-alpha.1.20475.1 diff --git a/eng/common/templates/job/source-build.yml b/eng/common/templates/job/source-build.yml new file mode 100644 index 0000000..9332f5e --- /dev/null +++ b/eng/common/templates/job/source-build.yml @@ -0,0 +1,49 @@ +parameters: + # This template adds arcade-powered source-build to CI. The template produces a server job with a + # default ID 'Source_Build_Complete' to put in a dependency list if necessary. + + # Specifies the prefix for source-build jobs added to pipeline. Use this if disambiguation needed. + jobNamePrefix: 'Source_Build' + + # Defines the platform on which to run the job. By default, a linux-x64 machine, suitable for + # managed-only repositories. This is an object with these properties: + # + # name: '' + # The name of the job. This is included in the job ID. + # targetRID: '' + # The name of the target RID to use, instead of the one auto-detected by Arcade. + # nonPortable: false + # Enables non-portable mode. This means a more specific RID (e.g. fedora.32-x64 rather than + # linux-x64), and compiling against distro-provided packages rather than portable ones. + # container: '' + # A container to use. Runs in docker. + # pool: {} + # A pool to use. Runs directly on an agent. + # buildScript: '' + # Specifies the build script to invoke to perform the build in the repo. The default + # './build.sh' should work for typical Arcade repositories, but this is customizable for + # difficult situations. + # jobProperties: {} + # A list of job properties to inject at the top level, for potential extensibility beyond + # container and pool. + platform: {} + +jobs: +- job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }} + displayName: Source-Build (${{ parameters.platform.name }}) + + ${{ each property in parameters.platform.jobProperties }}: + ${{ property.key }}: ${{ property.value }} + + ${{ if ne(parameters.platform.container, '') }}: + container: ${{ parameters.platform.container }} + ${{ if ne(parameters.platform.pool, '') }}: + pool: ${{ parameters.platform.pool }} + + workspace: + clean: all + + steps: + - template: /eng/common/templates/steps/source-build.yml + parameters: + platform: ${{ parameters.platform }} diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml index c08225a..0884595 100644 --- a/eng/common/templates/jobs/jobs.yml +++ b/eng/common/templates/jobs/jobs.yml @@ -24,6 +24,13 @@ parameters: # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects. runAsPublic: false + # Optional: Enable running the source-build jobs to build repo from source + runSourceBuild: false + + # Optional: Parameters for source-build template. + # See /eng/common/templates/jobs/source-build.yml for options + sourceBuildParameters: [] + # Internal resources (telemetry, microbuild) can only be accessed from non-public projects, # and some (Microbuild) should only be applied to non-PR cases for internal builds. @@ -43,6 +50,13 @@ jobs: name: ${{ job.job }} +- ${{ if eq(parameters.runSourceBuild, true) }}: + - template: /eng/common/templates/jobs/source-build.yml + parameters: + allCompletedJobId: Source_Build_Complete + ${{ each parameter in parameters.sourceBuildParameters }}: + ${{ parameter.key }}: ${{ parameter.value }} + - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}: - template: ../job/publish-build-assets.yml @@ -55,6 +69,8 @@ jobs: - ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}: - ${{ each job in parameters.jobs }}: - ${{ job.job }} + - ${{ if eq(parameters.runSourceBuild, true) }}: + - Source_Build_Complete pool: vmImage: vs2017-win2016 runAsPublic: ${{ parameters.runAsPublic }} diff --git a/eng/common/templates/jobs/source-build.yml b/eng/common/templates/jobs/source-build.yml new file mode 100644 index 0000000..f463011 --- /dev/null +++ b/eng/common/templates/jobs/source-build.yml @@ -0,0 +1,48 @@ +parameters: + # This template adds arcade-powered source-build to CI. A job is created for each platform, as + # well as an optional server job that completes when all platform jobs complete. + + # The name of the "join" job for all source-build platforms. If set to empty string, the job is + # not included. Existing repo pipelines can use this job depend on all source-build jobs + # completing without maintaining a separate list of every single job ID: just depend on this one + # server job. By default, not included. Recommended name if used: 'Source_Build_Complete'. + allCompletedJobId: '' + + # See /eng/common/templates/job/source-build.yml + jobNamePrefix: 'Source_Build' + + # If changed to true, causes this template to include the default platform for a managed-only + # repo. The exact Docker image used for this build will be provided by Arcade. This has some risk, + # but since the repo is supposed to be managed-only, the risk should be very low. + includeDefaultManagedPlatform: false + defaultManagedPlatform: + name: 'Managed' + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343' + + # Defines the platforms on which to run build jobs. One job is created for each platform, and the + # object in this array is sent to the job template as 'platform'. + platforms: [] + +jobs: + +- ${{ if ne(parameters.allCompletedJobId, '') }}: + - job: ${{ parameters.allCompletedJobId }} + displayName: Source-Build Complete + pool: server + dependsOn: + - ${{ each platform in parameters.platforms }}: + - ${{ parameters.jobNamePrefix }}_${{ platform.name }} + - ${{ if eq(parameters.includeDefaultManagedPlatform, true) }}: + - ${{ parameters.jobNamePrefix }}_${{ parameters.defaultManagedPlatform.name }} + +- ${{ each platform in parameters.platforms }}: + - template: /eng/common/templates/job/source-build.yml + parameters: + jobNamePrefix: ${{ parameters.jobNamePrefix }} + platform: ${{ platform }} + +- ${{ if eq(parameters.includeDefaultManagedPlatform, true) }}: + - template: /eng/common/templates/job/source-build.yml + parameters: + jobNamePrefix: ${{ parameters.jobNamePrefix }} + platform: ${{ parameters.defaultManagedPlatform }} diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index df06f53..0854e48 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -78,21 +78,22 @@ stages: BARBuildId: ${{ parameters.BARBuildId }} PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - job: - displayName: Post-build Checks - dependsOn: setupMaestroVars - variables: - - name: TargetChannels - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'] ] - pool: - vmImage: 'windows-2019' - steps: - - task: PowerShell@2 - displayName: Maestro Channels Consistency - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/check-channel-consistency.ps1 - arguments: -PromoteToChannels "$(TargetChannels)" - -AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetDev5ChannelId}},${{parameters.NetDev6ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.Net5Preview8ChannelId}},${{parameters.Net5RC1ChannelId}},${{parameters.Net5RC2ChannelId}},${{parameters.NetCoreSDK313xxChannelId}},${{parameters.NetCoreSDK313xxInternalChannelId}},${{parameters.NetCoreSDK314xxChannelId}},${{parameters.NetCoreSDK314xxInternalChannelId}},${{parameters.VS166ChannelId}},${{parameters.VS167ChannelId}},${{parameters.VS168ChannelId}},${{parameters.VSMasterChannelId}} + - ${{ if and(le(parameters.publishingInfraVersion, 2), eq(parameters.inline, 'true')) }}: + - job: + displayName: Post-build Checks + dependsOn: setupMaestroVars + variables: + - name: TargetChannels + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'] ] + pool: + vmImage: 'windows-2019' + steps: + - task: PowerShell@2 + displayName: Maestro Channels Consistency + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/check-channel-consistency.ps1 + arguments: -PromoteToChannels "$(TargetChannels)" + -AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetDev5ChannelId}},${{parameters.NetDev6ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.Net5Preview8ChannelId}},${{parameters.Net5RC1ChannelId}},${{parameters.Net5RC2ChannelId}},${{parameters.NetCoreSDK313xxChannelId}},${{parameters.NetCoreSDK313xxInternalChannelId}},${{parameters.NetCoreSDK314xxChannelId}},${{parameters.NetCoreSDK314xxInternalChannelId}},${{parameters.VS166ChannelId}},${{parameters.VS167ChannelId}},${{parameters.VS168ChannelId}},${{parameters.VSMasterChannelId}} - job: displayName: NuGet Validation diff --git a/eng/common/templates/steps/send-to-helix.yml b/eng/common/templates/steps/send-to-helix.yml index c6ddbd8..5eceb48 100644 --- a/eng/common/templates/steps/send-to-helix.yml +++ b/eng/common/templates/steps/send-to-helix.yml @@ -30,14 +30,40 @@ parameters: continueOnError: false # optional -- determines whether to continue the build if the step errors; defaults to false steps: -- template: /eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml - parameters: - osGroup: ${{ variables['Agent.Os'] }} - sendParams: $(Build.SourcesDirectory)/eng/common/helixpublish.proj /restore /t:Test /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog + - powershell: 'powershell "$env:BUILD_SOURCESDIRECTORY\eng\common\msbuild.ps1 $env:BUILD_SOURCESDIRECTORY\eng\common\helixpublish.proj /restore /t:Test /bl:$env:BUILD_SOURCESDIRECTORY\artifacts\log\$env:BuildConfig\SendToHelix.binlog"' displayName: ${{ parameters.DisplayNamePrefix }} (Windows) - condition: ${{ parameters.condition }} + env: + BuildConfig: $(_BuildConfig) + HelixSource: ${{ parameters.HelixSource }} + HelixType: ${{ parameters.HelixType }} + HelixBuild: ${{ parameters.HelixBuild }} + HelixConfiguration: ${{ parameters.HelixConfiguration }} + HelixTargetQueues: ${{ parameters.HelixTargetQueues }} + HelixAccessToken: ${{ parameters.HelixAccessToken }} + HelixPreCommands: ${{ parameters.HelixPreCommands }} + HelixPostCommands: ${{ parameters.HelixPostCommands }} + WorkItemDirectory: ${{ parameters.WorkItemDirectory }} + WorkItemCommand: ${{ parameters.WorkItemCommand }} + WorkItemTimeout: ${{ parameters.WorkItemTimeout }} + CorrelationPayloadDirectory: ${{ parameters.CorrelationPayloadDirectory }} + XUnitProjects: ${{ parameters.XUnitProjects }} + XUnitWorkItemTimeout: ${{ parameters.XUnitWorkItemTimeout }} + XUnitPublishTargetFramework: ${{ parameters.XUnitPublishTargetFramework }} + XUnitRuntimeTargetFramework: ${{ parameters.XUnitRuntimeTargetFramework }} + XUnitRunnerVersion: ${{ parameters.XUnitRunnerVersion }} + IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }} + DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }} + DotNetCliVersion: ${{ parameters.DotNetCliVersion }} + EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }} + WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }} + HelixBaseUri: ${{ parameters.HelixBaseUri }} + Creator: ${{ parameters.Creator }} + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} - environment: + - script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/eng/common/helixpublish.proj /restore /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog + displayName: ${{ parameters.DisplayNamePrefix }} (Unix) + env: BuildConfig: $(_BuildConfig) HelixSource: ${{ parameters.HelixSource }} HelixType: ${{ parameters.HelixType }} @@ -64,3 +90,5 @@ steps: HelixBaseUri: ${{ parameters.HelixBaseUri }} Creator: ${{ parameters.Creator }} SYSTEM_ACCESSTOKEN: $(System.AccessToken) + condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT')) + continueOnError: ${{ parameters.continueOnError }} diff --git a/eng/common/templates/steps/source-build.yml b/eng/common/templates/steps/source-build.yml new file mode 100644 index 0000000..8e336b7 --- /dev/null +++ b/eng/common/templates/steps/source-build.yml @@ -0,0 +1,66 @@ +parameters: + # This template adds arcade-powered source-build to CI. + + # This is a 'steps' template, and is intended for advanced scenarios where the existing build + # infra has a careful build methodology that must be followed. For example, a repo + # (dotnet/runtime) might choose to clone the GitHub repo only once and store it as a pipeline + # artifact for all subsequent jobs to use, to reduce dependence on a strong network connection to + # GitHub. Using this steps template leaves room for that infra to be included. + + # Defines the platform on which to run the steps. See 'eng/common/templates/job/source-build.yml' + # for details. The entire object is described in the 'job' template for simplicity, even though + # the usage of the properties on this object is split between the 'job' and 'steps' templates. + platform: {} + +steps: +# Build. Keep it self-contained for simple reusability. (No source-build-specific job variables.) +- script: | + set -x + df -h + + buildConfig=Release + # Check if AzDO substitutes in a build config from a variable, and use it if so. + if [ '$(_BuildConfig)' != '$''(_BuildConfig)' ]; then + buildConfig='$(_BuildConfig)' + fi + + officialBuildArgs= + if [ '${{ and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}' = 'True' ]; then + officialBuildArgs='/p:DotNetPublishUsingPipelines=true /p:OfficialBuildId=$(BUILD.BUILDNUMBER)' + fi + + targetRidArgs= + if [ '${{ parameters.platform.targetRID }}' != '' ]; then + targetRidArgs='/p:TargetRid=${{ parameters.platform.targetRID }}' + fi + + ${{ coalesce(parameters.platform.buildScript, './build.sh') }} --ci \ + --configuration $buildConfig \ + --restore --build --pack --publish \ + $officialBuildArgs \ + $targetRidArgs \ + /p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \ + /p:ArcadeBuildFromSource=true + displayName: Build + +# Upload build logs for diagnosis. +- task: CopyFiles@2 + displayName: Prepare BuildLogs staging directory + inputs: + SourceFolder: '$(Build.SourcesDirectory)' + Contents: | + **/*.log + **/*.binlog + artifacts/source-build/self/prebuilt-report/** + TargetFolder: '$(Build.StagingDirectory)/BuildLogs' + CleanTargetFolder: true + continueOnError: true + condition: succeededOrFailed() + +- task: PublishPipelineArtifact@1 + displayName: Publish BuildLogs + inputs: + targetPath: '$(Build.StagingDirectory)/BuildLogs' + artifactName: BuildLogs_SourceBuild_${{ parameters.platform.name }}_Attempt$(System.JobAttempt) + continueOnError: true + condition: succeededOrFailed() diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 6006608..9014e06 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -540,13 +540,15 @@ function GetDefaultMSBuildEngine() { function GetNuGetPackageCachePath() { if ($env:NUGET_PACKAGES -eq $null) { - # Use local cache on CI to ensure deterministic build, + # Use local cache on CI to ensure deterministic build. + # Avoid using the http cache as workaround for https://github.com/NuGet/Home/issues/3116 # use global cache in dev builds to avoid cost of downloading packages. # For directory normalization, see also: https://github.com/NuGet/Home/issues/7968 if ($useGlobalNuGetCache) { $env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages\' } else { $env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages\' + $env:RESTORENOCACHE = $true } } diff --git a/eng/common/tools.sh b/eng/common/tools.sh index c722a05..b5d63cb 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -312,12 +312,14 @@ function InitializeBuildTool { _InitializeBuildToolFramework="netcoreapp2.1" } +# Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116 function GetNuGetPackageCachePath { if [[ -z ${NUGET_PACKAGES:-} ]]; then if [[ "$use_global_nuget_cache" == true ]]; then export NUGET_PACKAGES="$HOME/.nuget/packages" else export NUGET_PACKAGES="$repo_root/.packages" + export RESTORENOCACHE=true fi fi diff --git a/global.json b/global.json index 0d7934f..359a7ec 100644 --- a/global.json +++ b/global.json @@ -12,10 +12,10 @@ "python3": "3.7.1" }, "msbuild-sdks": { - "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.20471.1", - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20471.1", - "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.20471.1", - "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20471.1", + "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.20474.4", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20474.4", + "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.20474.4", + "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20474.4", "Microsoft.FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "5.0.0-preview.8.20359.4", "Microsoft.Build.NoTargets": "2.0.1", -- 2.7.4