mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-12 02:30:29 +09:00

* eng/SourceBuild.props: when unset, let the repo determine RuntimeOS. When source-build builds runtime, it will pass RuntimeOS and BaseOS. When the repo is built directly using './build.sh --sb', let the repo determine those values rather than calculating them in SourceBuild.props. * global-build-job.yml: remove unneeded runtimeOS param.
64 lines
3.7 KiB
XML
64 lines
3.7 KiB
XML
<Project>
|
|
|
|
<PropertyGroup>
|
|
<GitHubRepositoryName>runtime</GitHubRepositoryName>
|
|
</PropertyGroup>
|
|
|
|
<!-- Set up the dotnet/runtime source-build command. -->
|
|
<PropertyGroup>
|
|
<BaseInnerSourceBuildCommand>./build.sh</BaseInnerSourceBuildCommand>
|
|
|
|
<!-- TargetRid names what gets built. -->
|
|
<TargetRid Condition="'$(TargetRid)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</TargetRid>
|
|
|
|
<!-- Split e.g. 'fedora.33-x64' into 'fedora.33' and 'x64'. -->
|
|
<_targetRidPlatformIndex>$(TargetRid.LastIndexOf('-'))</_targetRidPlatformIndex>
|
|
<TargetArch>$(TargetRid.Substring($(_targetRidPlatformIndex)).TrimStart('-'))</TargetArch>
|
|
|
|
<LogVerbosity Condition="'$(LogVerbosity)' == ''">minimal</LogVerbosity>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="GetRuntimeSourceBuildCommandConfiguration"
|
|
BeforeTargets="GetSourceBuildCommandConfiguration">
|
|
<PropertyGroup>
|
|
<!-- Properties that control the source-build configuration should be added to the repository and guarded with the DotNetBuildFromSource Condition.
|
|
This allows to build the repository using './build.sh <args> /p:DotNetBuildFromSource=true'.
|
|
Properties that control flags from source-build, and the expected output for source-build should be added to this file. -->
|
|
<InnerBuildArgs>$(InnerBuildArgs) --arch $(TargetArch)</InnerBuildArgs>
|
|
<InnerBuildArgs>$(InnerBuildArgs) --configuration $(Configuration)</InnerBuildArgs>
|
|
<InnerBuildArgs>$(InnerBuildArgs) --allconfigurations</InnerBuildArgs>
|
|
<InnerBuildArgs>$(InnerBuildArgs) --verbosity $(LogVerbosity)</InnerBuildArgs>
|
|
<InnerBuildArgs>$(InnerBuildArgs) --nodereuse false</InnerBuildArgs>
|
|
<InnerBuildArgs>$(InnerBuildArgs) --warnAsError false</InnerBuildArgs>
|
|
<InnerBuildArgs>$(InnerBuildArgs) --outputrid $(TargetRid)</InnerBuildArgs>
|
|
<!-- RuntimeOS is the build host rid OS. -->
|
|
<InnerBuildArgs>$(InnerBuildArgs) /p:RuntimeOS=$(RuntimeOS)</InnerBuildArgs>
|
|
<!-- BaseOS is an expected known rid in the graph that TargetRid is compatible with.
|
|
It's used to add TargetRid in the graph if the parent can't be detected. -->
|
|
<InnerBuildArgs>$(InnerBuildArgs) /p:AdditionalRuntimeIdentifierParent=$(BaseOS)</InnerBuildArgs>
|
|
<InnerBuildArgs Condition="'$(OfficialBuildId)' != ''">$(InnerBuildArgs) /p:OfficialBuildId=$(OfficialBuildId)</InnerBuildArgs>
|
|
<InnerBuildArgs Condition="'$(ContinuousIntegrationBuild)' != ''">$(InnerBuildArgs) /p:ContinuousIntegrationBuild=$(ContinuousIntegrationBuild)</InnerBuildArgs>
|
|
<InnerBuildArgs Condition="'$(SourceBuildUseMonoRuntime)' == 'true'">$(InnerBuildArgs) /p:PrimaryRuntimeFlavor=Mono /p:RuntimeFlavor=Mono</InnerBuildArgs>
|
|
</PropertyGroup>
|
|
</Target>
|
|
|
|
<Target Name="CategorizeRuntimeSupplementalArtifacts"
|
|
BeforeTargets="GetCategorizedIntermediateNupkgContents">
|
|
<ItemGroup>
|
|
<!--
|
|
Runtime artifacts are too large to fit into a single package (Azure DevOps feeds 500 mb constraint).
|
|
Split large components into separate packages.
|
|
-->
|
|
<IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\dotnet-runtime-*.tar.gz" Category="runtime" />
|
|
|
|
<IntermediateNupkgArtifactFile Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\*Microsoft.DotNet.ILCompiler.*.nupkg" Category="ILCompiler" />
|
|
|
|
<IntermediateNupkgArtifactFile
|
|
Include="
|
|
$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\dotnet-crossgen2-*.tar.gz;
|
|
$(CurrentRepoSourceBuildArtifactsPackagesDir)Shipping\Microsoft.NETCore.App.Crossgen2.*.nupkg"
|
|
Category="Crossgen2Pack" />
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
</Project>
|