Get source-build working in main (#15315)
This commit is contained in:
parent
4e9a08ecf3
commit
4ff5179103
5 changed files with 16 additions and 47 deletions
13
.vsts-ci.yml
13
.vsts-ci.yml
|
@ -369,18 +369,15 @@ stages:
|
|||
parameters:
|
||||
vmrBranch: ${{ parameters.vmrBranch }}
|
||||
|
||||
# TODO: Disable source-build builds in PR validation until source-build is more sustainable
|
||||
# Tracking issue: https://github.com/dotnet/source-build/issues/3214
|
||||
#
|
||||
# In case the VMR Build stage needs to be temporarily disabled, please make sure that
|
||||
# the VMR synchronization step is run to validate that the PR can be merged and later
|
||||
# synchronized into the VMR without problems.
|
||||
# You can do this by allowing the Synchronize_VMR stage from above in PRs.
|
||||
# - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
|
||||
# - template: eng/pipelines/templates/stages/vmr-build.yml
|
||||
# parameters:
|
||||
# vmrBranch: ${{ parameters.vmrBranch }}
|
||||
# isBuiltFromVmr: false
|
||||
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
|
||||
- template: eng/pipelines/templates/stages/vmr-build.yml
|
||||
parameters:
|
||||
vmrBranch: ${{ parameters.vmrBranch }}
|
||||
isBuiltFromVmr: false
|
||||
|
||||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- stage: Publish
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
or minor release, prebuilts may be needed. When the release is mature, prebuilts are not
|
||||
necessary, and this property is removed from the file.
|
||||
-->
|
||||
<PrivateSourceBuiltArtifactsPackageVersion>7.0.100.2</PrivateSourceBuiltArtifactsPackageVersion>
|
||||
<PrivateSourceBuiltArtifactsPackageVersion>0.1.0-8.0.100-2</PrivateSourceBuiltArtifactsPackageVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<RepoConsoleLogFile>$(LoggingDir)$(RepositoryName).log</RepoConsoleLogFile>
|
||||
<RedirectRepoOutputToLog Condition="'$(MinimalConsoleLogOutput)' == 'true'">>> $(RepoConsoleLogFile) 2>&1</RedirectRepoOutputToLog>
|
||||
<IsStable Condition="'$(UseStableVersions)' == 'true'">true</IsStable>
|
||||
<NetCurrent>net8.0</NetCurrent>
|
||||
|
||||
<PackagesOutput>$(ProjectDirectory)artifacts/packages/$(Configuration)/NonShipping/</PackagesOutput>
|
||||
|
||||
|
@ -68,7 +69,7 @@
|
|||
<EnvironmentVariables Include="_InitializeDotNetCli=$(DotNetCliToolDir)" />
|
||||
<EnvironmentVariables Include="_DotNetInstallDir=$(DotNetCliToolDir)" />
|
||||
<EnvironmentVariables Include="_InitializeToolset=$(SourceBuiltSdksDir)Microsoft.DotNet.Arcade.Sdk/tools/Build.proj" Condition="'$(UseBootstrapArcade)' != 'true'" />
|
||||
<EnvironmentVariables Include="_OverrideArcadeInitializeBuildToolFramework=net7.0" />
|
||||
<EnvironmentVariables Include="_OverrideArcadeInitializeBuildToolFramework=$(NetCurrent)" />
|
||||
|
||||
<EnvironmentVariables Include="DotNetUseShippingVersions=true" />
|
||||
|
||||
|
|
|
@ -107,45 +107,16 @@
|
|||
Condition="'$(EngCommonToolsShFile)' != ''"
|
||||
Inputs="$(MSBuildProjectFullPath)"
|
||||
Outputs="$(RepoCompletedSemaphorePath)UpdateBuildToolFramework.complete" >
|
||||
<!-- Use a relative find in NewText to avoid regex matches with parent directories.
|
||||
See https://github.com/dotnet/source-build/issues/1914 for details. -->
|
||||
<PropertyGroup>
|
||||
<ArcadeSdkReplacementText>
|
||||
logger_path="%24toolset_dir"/%24%28cd "$toolset_dir" && find . -name Microsoft.DotNet.Arcade.Sdk.dll \( -regex '.*netcoreapp2.1.*' -or -regex '.*net7.0.*' \) )
|
||||
</ArcadeSdkReplacementText>
|
||||
|
||||
<ArcadeLoggingReplacementText>
|
||||
logger_path="%24toolset_dir"/%24%28cd "$toolset_dir" && find . -name Microsoft.DotNet.ArcadeLogging.dll \( -regex '.*netcoreapp2.1.*' -or -regex '.*net7.0.*' \) )
|
||||
</ArcadeLoggingReplacementText>
|
||||
|
||||
<LoggerPathReplacementText>
|
||||
$(ArcadeLoggingReplacementText)
|
||||
if [[ ! -f $logger_path ]]; then
|
||||
$(ArcadeSdkReplacementText)
|
||||
fi
|
||||
</LoggerPathReplacementText>
|
||||
</PropertyGroup>
|
||||
<!-- Arcade has added a new ArcadeLogging library (see: https://github.com/dotnet/arcade/pull/6739)
|
||||
This adds additional scenarios when modifying tools.sh to search for the logger_path. Source-build
|
||||
builds arcade after the change, so the logger is no longer found in Microsoft.DotNet.Arcade.Sdk,
|
||||
rather, it has moved to Microsoft.DotNet.ArcadeLogging.
|
||||
The scenarios are: -->
|
||||
<!-- 1. Repo has old tools.sh - replace with new search for logger_path from updated tools.sh which looks for ArcadeLogging first,
|
||||
but make the source-build search changes to find the right dll. -->
|
||||
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
|
||||
OldText="local logger_path="$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll""
|
||||
NewText="$(LoggerPathReplacementText)" />
|
||||
<!-- 2. Repo has updated tools.sh, replace 2 logger_path statements with source-build search equivalents to find the right dll -->
|
||||
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
|
||||
OldText="local logger_path="$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.ArcadeLogging.dll""
|
||||
NewText="$(ArcadeLoggingReplacementText)" />
|
||||
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
|
||||
OldText="logger_path="$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll""
|
||||
NewText="$(ArcadeSdkReplacementText)" />
|
||||
<!-- 3. Repo has 3rd generation of tools.sh. In this case, we set an override for _InitializeBuildToolFramework -->
|
||||
<!-- Update the BuildToolFramework for repos that have not adopted the current version of Arcade-->
|
||||
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
|
||||
OldText="_InitializeBuildToolFramework="netcoreapp3.1""
|
||||
NewText="_InitializeBuildToolFramework="%24{_OverrideArcadeInitializeBuildToolFramework-netcoreapp3.1}"" />
|
||||
NewText="_InitializeBuildToolFramework="$(NetCurrent)""
|
||||
Condition="'$(UseBootstrapArcade)' != 'true'" />
|
||||
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
|
||||
OldText="_InitializeBuildToolFramework="net7.0""
|
||||
NewText="_InitializeBuildToolFramework="$(NetCurrent)""
|
||||
Condition="'$(UseBootstrapArcade)' != 'true'" />
|
||||
|
||||
<!-- Temporary workaround for when the ci option is specified, non-zero exit are swallowed which prevents builds from failing within
|
||||
the build process. https://github.com/dotnet/source-build/issues/2307 -->
|
||||
|
|
|
@ -55,7 +55,7 @@ index a467fb579..acd5db8bc 100644
|
|||
- <MicrosoftCodeAnalysisExecutableVersion Condition="'$(MicrosoftCodeAnalysisExecutableVersion)' == ''">3.8.0</MicrosoftCodeAnalysisExecutableVersion>
|
||||
- </PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<VersionPrefix>3.3.4</VersionPrefix>
|
||||
<VersionPrefix>3.3.5</VersionPrefix>
|
||||
<PreReleaseVersionLabel>beta1</PreReleaseVersionLabel>
|
||||
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
|
||||
index c7c28fd9f..e5be9e028 100644
|
||||
|
|
Loading…
Add table
Reference in a new issue