Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ extends:
buildArchitecture: arm64
runtimeIdentifier: linux-arm64
# Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official.
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false /p:CLIBUILD_SKIP_TESTS=true
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
officialBuildProperties: $(_officialBuildProperties)
osProperties: $(linuxOsPortableProperties) /p:BuildSdkDeb=true
runTests: false
Expand All @@ -232,7 +232,7 @@ extends:
buildArchitecture: arm64
runtimeIdentifier: linux-arm64
# Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official.
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false /p:CLIBUILD_SKIP_TESTS=true
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
officialBuildProperties: $(_officialBuildProperties)
osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true
runTests: false
Expand Down
12 changes: 6 additions & 6 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

<PropertyGroup>
<BuildArchitecture Condition="'$(BuildArchitecture)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
<Architecture Condition="'$(Architecture)' == '' AND ('$(BuildArchitecture)' == 'arm64')">$(BuildArchitecture)</Architecture>
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 's390x'">$(BuildArchitecture)</Architecture>
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'ppc64le'">$(BuildArchitecture)</Architecture>
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'loongarch64'">$(BuildArchitecture)</Architecture>
<Architecture Condition="'$(Architecture)' == ''">x64</Architecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' AND ('$(BuildArchitecture)' == 'arm64')">$(BuildArchitecture)</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' AND '$(BuildArchitecture)' == 's390x'">$(BuildArchitecture)</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' AND '$(BuildArchitecture)' == 'ppc64le'">$(BuildArchitecture)</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' AND '$(BuildArchitecture)' == 'loongarch64'">$(BuildArchitecture)</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</Architecture>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand All @@ -23,7 +23,7 @@
<HostOSName Condition="'$(HostOSName)' == '' AND $([MSBuild]::IsOSPlatform('ILLUMOS'))">illumos</HostOSName>
<HostOSName Condition="'$(HostOSName)' == '' AND '$(IsLinux)' == 'true'">linux</HostOSName>

<OSName Condition="'$(OSName)' == '' AND $(Rid) != ''">$(Rid.Substring(0, $(Rid.LastIndexOf('-'))))</OSName>
<OSName Condition="'$(OSName)' == '' AND $(TargetRid) != ''">$(TargetRid.Substring(0, $(TargetRid.LastIndexOf('-'))))</OSName>
<OSName Condition="'$(OSName)' == ''">$(HostOSName)</OSName>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions eng/Badge.proj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<Target Name="GenerateVersionBadge" AfterTargets="Build" Returns="$(VersionBadge)">
<PropertyGroup>
<!-- Replace '-' with '_' for os names like 'linux-musl' -->
<VersionBadgeMoniker>$(OSName.Replace('-', '_'))_$(Architecture)</VersionBadgeMoniker>
<VersionBadgeMoniker Condition="'$(IsLinuxPortable)' == 'true'">linux_$(Architecture)</VersionBadgeMoniker>
<VersionBadgeMoniker>$(OSName.Replace('-', '_'))_$(TargetArchitecture)</VersionBadgeMoniker>
<VersionBadgeMoniker Condition="'$(IsLinuxPortable)' == 'true'">linux_$(TargetArchitecture)</VersionBadgeMoniker>

<VersionBadge>$(ArtifactsShippingPackagesDir)$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge>
<VersionSvgTemplate>$(MSBuildThisFileDirectory)version_badge.svg</VersionSvgTemplate>
Expand Down
2 changes: 1 addition & 1 deletion eng/Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
they depend on assets from other verticals that are built in the first build pass. -->
<ItemGroup Condition="'$(DotNetBuildPass)' == '2' and
'$(OS)' == 'Windows_NT' and
'$(Architecture)' == 'x64'">
'$(TargetArchitecture)' == 'x64'">
<ProjectToBuild Include="$(RepoRoot)src\Layout\VS.Redist.Common.Net.Core.SDK.MSBuildExtensions\VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.proj" DotNetBuildPass="2" />
<ProjectToBuild Include="$(RepoRoot)src\Layout\VS.Redist.Common.Net.Core.SDK.VSTemplateLocator\VS.Redist.Common.Net.Core.SDK.VSTemplateLocator.proj" DotNetBuildPass="2" />
</ItemGroup>
Expand Down
24 changes: 12 additions & 12 deletions eng/pipelines/templates/jobs/sdk-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ parameters:
testFullMSBuild: false
runAoTTests: false
### MSBUILD ###
buildArchitecture: x64
targetArchitecture: x64
publishArgument: ''
signArgument: ''
runTestsAsTool: false
Expand All @@ -34,11 +34,11 @@ jobs:
- template: /eng/common/${{ parameters.oneESCompat.templateFolderName }}/job/job.yml
parameters:
${{ if eq(parameters.container, '') }}:
name: ${{ parameters.categoryName }}_${{ parameters.pool.os }}_${{ parameters.buildArchitecture }}
displayName: '${{ parameters.categoryName }}: ${{ parameters.pool.os }} (${{ parameters.buildArchitecture }})'
name: ${{ parameters.categoryName }}_${{ parameters.pool.os }}_${{ parameters.targetArchitecture }}
displayName: '${{ parameters.categoryName }}: ${{ parameters.pool.os }} (${{ parameters.targetArchitecture }})'
${{ else }}:
name: ${{ parameters.categoryName }}_${{ parameters.pool.os }}_${{ parameters.buildArchitecture }}_${{ parameters.container }}
displayName: '${{ parameters.categoryName }}: ${{ parameters.pool.os }} (${{ parameters.buildArchitecture }}) [${{ parameters.container }}]'
name: ${{ parameters.categoryName }}_${{ parameters.pool.os }}_${{ parameters.targetArchitecture }}_${{ parameters.container }}
displayName: '${{ parameters.categoryName }}: ${{ parameters.pool.os }} (${{ parameters.targetArchitecture }}) [${{ parameters.container }}]'
pool: ${{ parameters.pool }}
container: ${{ parameters.container }}
strategy: ${{ parameters.strategy }}
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
${{ parameters.publishArgument }}
${{ parameters.signArgument }}
/p:EnableDefaultArtifacts=${{ parameters.enableDefaultArtifacts }}
/p:Architecture=${{ parameters.buildArchitecture }}
/p:TargetArchitecture=${{ parameters.targetArchitecture }}
/p:RunTestsAsTool=${{ parameters.runTestsAsTool }}
/p:PgoInstrument=${{ parameters.pgoInstrument }}
${{ parameters.runtimeSourceProperties }}
Expand All @@ -104,10 +104,10 @@ jobs:
${{ parameters.publishArgument }} \
${{ parameters.signArgument }} \
/p:EnableDefaultArtifacts=${{ parameters.enableDefaultArtifacts }} \
/p:Architecture=${{ parameters.buildArchitecture }} \
/p:TargetArchitecture=${{ parameters.targetArchitecture }} \
/p:RunTestsAsTool=${{ parameters.runTestsAsTool }} \
/p:PgoInstrument=${{ parameters.pgoInstrument }} \
/p:Rid=${{ parameters.runtimeIdentifier }} \
/p:TargetRid=${{ parameters.runtimeIdentifier }} \
${{ parameters.osProperties }} \
${{ parameters.runtimeSourceProperties }} \
${{ parameters.officialBuildProperties }} \
Expand All @@ -128,7 +128,7 @@ jobs:
-restore -test -ci -prepareMachine -nativeToolsOnMachine
-configuration $(buildConfiguration)
/p:Projects=\`"${{ replace(parameters.testProjects, ';', '`;') }}\`"
/p:Architecture=${{ parameters.buildArchitecture }}
/p:TargetArchitecture=${{ parameters.targetArchitecture }}
${{ parameters.runtimeSourceProperties }}
/p:CustomHelixTargetQueue=${{ parameters.helixTargetQueue }}
/bl:$(Build.SourcesDirectory)/artifacts/log/$(buildConfiguration)/${{ parameters.categoryName }}Tests.binlog
Expand All @@ -148,8 +148,8 @@ jobs:
-restore -test -ci -prepareMachine
-configuration $(buildConfiguration)
'/p:Projects="${{ parameters.testProjects }}"'
/p:Architecture=${{ parameters.buildArchitecture }}
/p:Rid=${{ parameters.runtimeIdentifier }}
/p:TargetArchitecture=${{ parameters.targetArchitecture }}
/p:TargetRid=${{ parameters.runtimeIdentifier }}
${{ parameters.osProperties }}
${{ parameters.runtimeSourceProperties }}
/p:CustomHelixTargetQueue=${{ parameters.helixTargetQueue }}${{ parameters.helixTargetContainer }}
Expand All @@ -171,7 +171,7 @@ jobs:
testResultsFormat: xUnit
testResultsFiles: artifacts/TestResults/$(buildConfiguration)/*.xml
testRunTitle: $(System.PhaseName)
buildPlatform: ${{ parameters.buildArchitecture }}
buildPlatform: ${{ parameters.targetArchitecture }}
buildConfiguration: $(buildConfiguration)
continueOnError: true
condition: always()
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/sdk-job-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ parameters:
- categoryName: TestBuild
osProperties: $(linuxOsPortableProperties)
- categoryName: TestBuild
buildArchitecture: arm64
targetArchitecture: arm64
runtimeIdentifier: linux-arm64
osProperties: $(linuxOsPortableProperties)
# Don't run the tests on arm64. Only perform the build itself.
Expand Down
18 changes: 9 additions & 9 deletions src/Layout/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
<ExeExtension>.exe</ExeExtension>
<ExeExtension Condition="!$([MSBuild]::IsOSPlatform('WINDOWS'))"></ExeExtension>

<Rid>$(OSName)-$(Architecture)</Rid>
<ProductMonikerRid>$(Rid)</ProductMonikerRid>
<TargetRid Condition="'$(TargetRid)' == ''">$(OSName)-$(TargetArchitecture)</TargetRid>
<ProductMonikerRid>$(TargetRid)</ProductMonikerRid>

<PortableOSName Condition="'$(PortableOSName)' == ''">$(OSName)</PortableOSName>
<PortableRid>$(PortableOSName)-$(Architecture)</PortableRid>
<PortableRid>$(PortableOSName)-$(TargetArchitecture)</PortableRid>
<PortableProductMonikerRid>$(PortableRid)</PortableProductMonikerRid>
</PropertyGroup>

Expand All @@ -43,9 +43,9 @@
<SkipBuildingInstallers Condition="'$(PgoInstrument)' == 'true'">true</SkipBuildingInstallers>
<SkipBuildingInstallers Condition="
(
$(Rid.StartsWith('freebsd')) or
$(Rid.StartsWith('illumos')) or
$(Rid.StartsWith('linux-musl'))
$(TargetRid.StartsWith('freebsd')) or
$(TargetRid.StartsWith('illumos')) or
$(TargetRid.StartsWith('linux-musl'))
)">true</SkipBuildingInstallers>
</PropertyGroup>

Expand All @@ -55,18 +55,18 @@
<BundleNativeAotCompiler Condition="'$(BundleNativeAotCompiler)' == '' and '$(DotNetBuildSourceOnly)' == 'true' and '$(DotNetBuildUseMonoRuntime)' != 'true'">true</BundleNativeAotCompiler>

<!-- Use the portable "linux-x64" Rid when downloading Linux shared framework compressed file. -->
<UsePortableLinuxSharedFramework Condition="'$(UsePortableLinuxSharedFramework)' == '' and '$(IsLinux)' == 'true' and !$(Rid.StartsWith('linux-musl'))">true</UsePortableLinuxSharedFramework>
<UsePortableLinuxSharedFramework Condition="'$(UsePortableLinuxSharedFramework)' == '' and '$(IsLinux)' == 'true' and !$(TargetRid.StartsWith('linux-musl'))">true</UsePortableLinuxSharedFramework>
<HighEntropyVA>true</HighEntropyVA>
</PropertyGroup>

<PropertyGroup>
<NetRuntimeRid Condition="'$(NetRuntimeRid)' == ''">$(HostRid)</NetRuntimeRid>
<NetRuntimeRid Condition="('$(OSName)' == 'win' or '$(OSName)' == 'osx' or '$(OSName)' == 'freebsd' or '$(OSName)' == 'illumos' or '$(OSName)' == 'solaris') and '$(DotNetBuildSourceOnly)' != 'true'">$(OSName)-$(Architecture)</NetRuntimeRid>
<NetRuntimeRid Condition="('$(OSName)' == 'win' or '$(OSName)' == 'osx' or '$(OSName)' == 'freebsd' or '$(OSName)' == 'illumos' or '$(OSName)' == 'solaris') and '$(DotNetBuildSourceOnly)' != 'true'">$(OSName)-$(TargetArchitecture)</NetRuntimeRid>
<NetRuntimeRid Condition="'$(DotNetBuild)' != 'true' and $(NetRuntimeRid.StartsWith('mariner.2.0'))">$(HostRid.Replace('mariner.2.0', 'cm.2'))</NetRuntimeRid>

<SharedFrameworkRid>$(NetRuntimeRid)</SharedFrameworkRid>
<SharedFrameworkRid Condition="$(ProductMonikerRid.StartsWith('linux-musl'))">$(ProductMonikerRid)</SharedFrameworkRid>
<SharedFrameworkRid Condition=" '$(UsePortableLinuxSharedFramework)' == 'true' ">linux-$(Architecture)</SharedFrameworkRid>
<SharedFrameworkRid Condition=" '$(UsePortableLinuxSharedFramework)' == 'true' ">linux-$(TargetArchitecture)</SharedFrameworkRid>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Layout/pkg/dotnet-sdk.proj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<BuildSdkRpm Condition="'$(BuildSdkRpm)' == '' and '$(IsRPMBasedDistro)' == 'true'">true</BuildSdkRpm>
<SkipBuild Condition="'$(BuildSdkDeb)' != 'true' and '$(BuildSdkRpm)' != 'true'">true</SkipBuild>
<TargetFramework>$(SdkTargetFramework)</TargetFramework>
<RuntimeIdentifier>$(Rid)</RuntimeIdentifier>
<RuntimeIdentifier>$(TargetRid)</RuntimeIdentifier>
<GenerateInstallers>true</GenerateInstallers>
<BuildDebPackage Condition="'$(BuildSdkDeb)' == 'true'">true</BuildDebPackage>
<BuildRpmPackage Condition="'$(BuildSdkRpm)' == 'true'">true</BuildRpmPackage>
Expand Down
4 changes: 2 additions & 2 deletions src/Layout/redist/targets/GenerateBundledVersions.targets
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
sdk_commit="%commit%" sdk_version="%version%"
-->
<WriteLinesToFile
File="$(ArtifactsShippingPackagesDir)productCommit-$(Rid).txt"
File="$(ArtifactsShippingPackagesDir)productCommit-$(TargetRid).txt"
Lines="@(Line->'%(Identity)_commit=&quot;%(Commit)&quot; %(Identity)_version=&quot;%(Version)&quot;', '%0A')"
Overwrite="true"
Encoding="ASCII" />
Expand All @@ -67,7 +67,7 @@
</PropertyGroup>

<WriteLinesToFile
File="$(ArtifactsShippingPackagesDir)productCommit-$(Rid).json"
File="$(ArtifactsShippingPackagesDir)productCommit-$(TargetRid).json"
Lines="$(JsonContents)"
Overwrite="true"
Encoding="ASCII" />
Expand Down
28 changes: 10 additions & 18 deletions src/Layout/redist/targets/GenerateLayout.targets
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,20 @@
</Target>

<Target Name="PublishVersionFile">
<WriteLinesToFile File="$(OutputPath)/.toolsetversion"
Lines="$(SourceRevisionId);$(Version);$(Rid)"
<WriteLinesToFile File="$(OutputPath).toolsetversion"
Lines="$(SourceRevisionId);$(Version);$(TargetRid)"
Overwrite="true" />

<!-- The .version file in the final product will be the .NET Core SDK version. But
for the layout we produce here, use the toolset information, so that we don't
just always use the stage 0 version. -->
<WriteLinesToFile File="$(OutputPath)/.version"
Lines="$(SourceRevisionId);$(Version);$(Rid)"
<WriteLinesToFile File="$(OutputPath).version"
Lines="$(SourceRevisionId);$(Version);$(TargetRid);$(FullNugetVersion);$(SdkFeatureBand)"
Overwrite="true" />

<!-- Development env and CI loads DotnetFiles type from the following location
The resolution of the product version (https://github.com/dotnet/sdk/blob/main/src/Cli/Microsoft.DotNet.Cli.Utils/DotnetFiles.cs#L21)
then need the version file there as well. -->
<Copy SourceFiles="$(OutputPath)/.version" DestinationFiles="$(BaseOutputPath)$(Configuration)/.version" SkipUnchangedFiles="true" />
<!-- Development env and CI loads DotnetFiles type from the following location
The resolution of the product version (https://github.com/dotnet/sdk/blob/main/src/Cli/Microsoft.DotNet.Cli.Utils/DotnetFiles.cs#L21)
then need the version file there as well. -->
<Copy SourceFiles="$(OutputPath).version"
DestinationFiles="$(BaseOutputPath)$(Configuration)/.version"
SkipUnchangedFiles="true" />
</Target>

<Target Name="PublishRoslyn">
Expand Down Expand Up @@ -472,12 +471,6 @@
<Message Text="Copy from @(NativeRestoredAppHostNETCore) to $(AppHostTemplatePath)." Importance="High" />
</Target>

<Target Name="GenerateVersionFile">
<WriteLinesToFile File="$(OutputPath).version"
Lines="$(SourceRevisionId);$(Version);$(Rid);$(FullNugetVersion);$(SdkFeatureBand)"
Overwrite="true" />
</Target>

<Target Name="ChmodPublishDir"
DependsOnTargets="GenerateCliRuntimeConfigurationFiles"
Condition="'$(OSName)' != 'win'">
Expand Down Expand Up @@ -536,7 +529,6 @@
PublishSdks;
PublishDotnetWatchToRedist;
GenerateBundledVersions;
GenerateVersionFile;
CopyKnownWorkloadManifestFile;
LayoutAppHostTemplate;
LayoutBundledTools;
Expand Down
Loading
Loading