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:
|
parameters:
|
||||||
vmrBranch: ${{ parameters.vmrBranch }}
|
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
|
# 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
|
# the VMR synchronization step is run to validate that the PR can be merged and later
|
||||||
# synchronized into the VMR without problems.
|
# synchronized into the VMR without problems.
|
||||||
# You can do this by allowing the Synchronize_VMR stage from above in PRs.
|
# You can do this by allowing the Synchronize_VMR stage from above in PRs.
|
||||||
# - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
|
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
|
||||||
# - template: eng/pipelines/templates/stages/vmr-build.yml
|
- template: eng/pipelines/templates/stages/vmr-build.yml
|
||||||
# parameters:
|
parameters:
|
||||||
# vmrBranch: ${{ parameters.vmrBranch }}
|
vmrBranch: ${{ parameters.vmrBranch }}
|
||||||
# isBuiltFromVmr: false
|
isBuiltFromVmr: false
|
||||||
|
|
||||||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||||
- stage: Publish
|
- stage: Publish
|
||||||
|
|
|
@ -24,6 +24,6 @@
|
||||||
or minor release, prebuilts may be needed. When the release is mature, prebuilts are not
|
or minor release, prebuilts may be needed. When the release is mature, prebuilts are not
|
||||||
necessary, and this property is removed from the file.
|
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>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<RepoConsoleLogFile>$(LoggingDir)$(RepositoryName).log</RepoConsoleLogFile>
|
<RepoConsoleLogFile>$(LoggingDir)$(RepositoryName).log</RepoConsoleLogFile>
|
||||||
<RedirectRepoOutputToLog Condition="'$(MinimalConsoleLogOutput)' == 'true'">>> $(RepoConsoleLogFile) 2>&1</RedirectRepoOutputToLog>
|
<RedirectRepoOutputToLog Condition="'$(MinimalConsoleLogOutput)' == 'true'">>> $(RepoConsoleLogFile) 2>&1</RedirectRepoOutputToLog>
|
||||||
<IsStable Condition="'$(UseStableVersions)' == 'true'">true</IsStable>
|
<IsStable Condition="'$(UseStableVersions)' == 'true'">true</IsStable>
|
||||||
|
<NetCurrent>net8.0</NetCurrent>
|
||||||
|
|
||||||
<PackagesOutput>$(ProjectDirectory)artifacts/packages/$(Configuration)/NonShipping/</PackagesOutput>
|
<PackagesOutput>$(ProjectDirectory)artifacts/packages/$(Configuration)/NonShipping/</PackagesOutput>
|
||||||
|
|
||||||
|
@ -68,7 +69,7 @@
|
||||||
<EnvironmentVariables Include="_InitializeDotNetCli=$(DotNetCliToolDir)" />
|
<EnvironmentVariables Include="_InitializeDotNetCli=$(DotNetCliToolDir)" />
|
||||||
<EnvironmentVariables Include="_DotNetInstallDir=$(DotNetCliToolDir)" />
|
<EnvironmentVariables Include="_DotNetInstallDir=$(DotNetCliToolDir)" />
|
||||||
<EnvironmentVariables Include="_InitializeToolset=$(SourceBuiltSdksDir)Microsoft.DotNet.Arcade.Sdk/tools/Build.proj" Condition="'$(UseBootstrapArcade)' != 'true'" />
|
<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" />
|
<EnvironmentVariables Include="DotNetUseShippingVersions=true" />
|
||||||
|
|
||||||
|
|
|
@ -107,45 +107,16 @@
|
||||||
Condition="'$(EngCommonToolsShFile)' != ''"
|
Condition="'$(EngCommonToolsShFile)' != ''"
|
||||||
Inputs="$(MSBuildProjectFullPath)"
|
Inputs="$(MSBuildProjectFullPath)"
|
||||||
Outputs="$(RepoCompletedSemaphorePath)UpdateBuildToolFramework.complete" >
|
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>
|
<!-- Update the BuildToolFramework for repos that have not adopted the current version of Arcade-->
|
||||||
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 -->
|
|
||||||
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
|
<ReplaceTextInFile InputFile="$(EngCommonToolsShFile)"
|
||||||
OldText="_InitializeBuildToolFramework="netcoreapp3.1""
|
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
|
<!-- 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 -->
|
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>
|
- <MicrosoftCodeAnalysisExecutableVersion Condition="'$(MicrosoftCodeAnalysisExecutableVersion)' == ''">3.8.0</MicrosoftCodeAnalysisExecutableVersion>
|
||||||
- </PropertyGroup>
|
- </PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>3.3.4</VersionPrefix>
|
<VersionPrefix>3.3.5</VersionPrefix>
|
||||||
<PreReleaseVersionLabel>beta1</PreReleaseVersionLabel>
|
<PreReleaseVersionLabel>beta1</PreReleaseVersionLabel>
|
||||||
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
|
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
|
||||||
index c7c28fd9f..e5be9e028 100644
|
index c7c28fd9f..e5be9e028 100644
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue