Merge branch 'release/6.0.1xx' into release/6.0.2xx

This commit is contained in:
Jason Zhai 2022-04-07 19:50:15 -07:00
commit 316d39733a
11 changed files with 410 additions and 308 deletions

View file

@ -0,0 +1,203 @@
# Builds a source-build tarball
parameters:
# Architecture to build
architecture:
# Custom condition to apply to the job
condition:
# Dependent jobs that must be completed before this job will run
dependsOn:
# Skip running the SDK content smoke-tests
excludeSdkContentTests: false
# Resource id of the installer build to retrieve source/product tarball's from
installerBuildResourceId:
# Matrix to run jobs over
matrix:
# Job name
name:
# Agent pool to use
pool:
# Build using the previous source-build artifacts
usePreviousArtifacts: false
jobs:
- job: ${{ parameters.name }}
condition: ${{ parameters.condition }}
dependsOn: ${{ parameters.dependsOn }}
pool: ${{ parameters.pool }}
strategy:
matrix: ${{ parameters.matrix }}
timeoutInMinutes: 300
variables:
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- group: AzureDevOps-Artifact-Feeds-Pats
- ${{ if eq(parameters.usePreviousArtifacts, 'true') }}:
- name: additionalBuildArgs
value: --with-sdk /tarball/.dotnet
- name: tarballDir
value: $(Build.StagingDirectory)/tarball
workspace:
clean: all
steps:
- checkout: self
clean: true
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- task: Bash@3
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- download: ${{ parameters.installerBuildResourceId }}
artifact: BlobArtifacts
patterns: '**/dotnet-sdk-source*.tar.gz'
displayName: Download Source Tarball
- ${{ if ne(parameters.excludeSdkContentTests, 'true') }}:
- download: ${{ parameters.installerBuildResourceId }}
artifact: BlobArtifacts
patterns: '**/dotnet-sdk-!(*-*)-linux-${{ parameters.architecture }}.tar.gz'
displayName: Download MSFT sdk Tarball
- ${{ if eq(parameters.usePreviousArtifacts, 'true') }}:
- download: current
artifact: $(_PreviousSourceBuildArtifact)
patterns: '*.tar.gz'
displayName: Download Previous Source Build Artifacts
- task: CopyFiles@2
displayName: Copy Previous Source Build Artifacts
inputs:
SourceFolder: $(PIPELINE.WORKSPACE)/$(_PreviousSourceBuildArtifact)
Contents: '*.tar.gz'
TargetFolder: $(tarballDir)/packages/archive/
- script: |
set -x
resourceIdPathSegment=
if [[ '${{ parameters.installerBuildResourceId }}' != 'current' ]]; then
resourceIdPathSegment='${{ parameters.installerBuildResourceId }}/'
fi
mkdir -p "$(tarballDir)"
tarballFilePath="$(PIPELINE.WORKSPACE)/${resourceIdPathSegment}BlobArtifacts/dotnet-sdk-source*.tar.gz"
eval tar -ozxf "$tarballFilePath" -C "$(tarballDir)"
eval rm -f "$tarballFilePath"
displayName: Extract Tarball
- script: |
set -x
if [[ '${{ parameters.usePreviousArtifacts }}' != 'true' ]]; then
customPrepArgs=
if [[ '$(_BootstrapPrep)' == 'true' ]]; then
customPrepArgs='--bootstrap'
fi
docker run --rm -v $(tarballDir):/tarball -w /tarball $(_Container) ./prep.sh ${customPrepArgs}
else
mkdir $(tarballDir)/.dotnet
tarballFilePath="$(tarballDir)/packages/archive/dotnet-sdk-*.tar.gz"
eval tar -ozxf "$tarballFilePath" -C "$(tarballDir)/.dotnet"
eval rm -f "$tarballFilePath"
fi
displayName: Prep Tarball
- script: |
set -x
df -h
networkArgs=
customBuildArgs=
if [[ '$(_RunOnline)' == 'true' ]]; then
customBuildArgs='--online'
else
networkArgs='--network none'
fi
if [[ '$(_EnablePoison)' == 'true' ]]; then
customBuildArgs="$customBuildArgs --poison"
fi
docker run --rm -v $(tarballDir):/tarball -w /tarball ${networkArgs} $(_Container) ./build.sh ${customBuildArgs} $(additionalBuildArgs) -- /p:CleanWhileBuilding=true
displayName: Build Tarball
- script: |
set -x
# Use installer repo's NuGet.config during online testing to utilize internal feeds
rm -f $(tarballDir)/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config
cp $(Build.SourcesDirectory)/NuGet.config $(tarballDir)/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config
dockerVolumeArgs="-v $(tarballDir):/tarball"
dockerEnvArgs="-e SMOKE_TESTS_EXCLUDE_OMNISHARP=$(_ExcludeOmniSharpTests) -e SMOKE_TESTS_WARN_SDK_CONTENT_DIFFS=true"
poisonArg=''
if [[ '${{ parameters.excludeSdkContentTests}}' != 'true' && '${{ parameters.installerBuildResourceId }}' != 'current' ]]; then
dockerVolumeArgs+=" -v $(PIPELINE.WORKSPACE)/${{ parameters.installerBuildResourceId }}/BlobArtifacts/:/BlobArtifacts"
msftSdkTarballName=$(find "$(PIPELINE.WORKSPACE)/${{ parameters.installerBuildResourceId }}/BlobArtifacts/" -name "dotnet-sdk-*-linux-${{ parameters.architecture }}.tar.gz" -exec basename {} \;)
dockerEnvArgs+=" -e SMOKE_TESTS_MSFT_SDK_TARBALL_PATH=/BlobArtifacts/$msftSdkTarballName"
fi
if [[ '$(_EnablePoison)' == 'true' ]]; then
poisonArg='--poison'
dockerEnvArgs+=" -e SMOKE_TESTS_WARN_POISON_DIFFS=true"
fi
docker run --rm $dockerVolumeArgs -w /tarball $dockerEnvArgs $(_Container) ./build.sh $poisonArg --run-smoke-test $(additionalBuildArgs) -- /p:SmokeTestConsoleVerbosity=detailed
displayName: Run Tests
# Don't use CopyFiles@2 as it encounters permissions issues because it indexes all files in the source directory graph.
- script: |
set -x
targetFolder=$(Build.StagingDirectory)/BuildLogs/
mkdir -p ${targetFolder}
cd "$(tarballDir)"
find artifacts/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \;
find artifacts/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \;
find artifacts/prebuilt-report/ -exec cp {} --parents -t ${targetFolder} \;
find src/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \;
find src/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \;
find test/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \;
displayName: Prepare BuildLogs staging directory
continueOnError: true
condition: succeededOrFailed()
- publish: '$(Build.StagingDirectory)/BuildLogs'
artifact: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt)
displayName: Publish BuildLogs
continueOnError: true
condition: succeededOrFailed()
- task: PublishTestResults@2
displayName: Publish Test Results
condition: succeededOrFailed()
continueOnError: true
inputs:
testRunner: vSTest
testResultsFiles: 'test/**/*.trx'
searchFolder: $(tarballDir)
mergeTestResults: true
publishRunAttachments: true
testRunTitle: SourceBuild_SmokeTests_$(Agent.JobName)
- publish: '$(tarballDir)/artifacts/${{ parameters.architecture}}/Release/'
artifact: $(Agent.JobName)_Artifacts
displayName: Publish Artifacts
condition: succeededOrFailed()
continueOnError: true

View file

@ -12,170 +12,113 @@ parameters:
# The following parameters aren't expected to be passed in rather they are used for encapsulation
# -----------------------------------------------------------------------------------------------
buildJobTimeout: 300
centOS7Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-source-build-20210714125450-5d87b80
centOS8Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-8-source-build-20211118190102-9355e7b
centOSStream9Container: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9-20220107135047-4cd394c
debian9Container: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-stretch-20211001171226-047508b
debian9Arm64Container: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-arm64v8-20220405201138-a251961
fedora33Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2
ubuntu1804Container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-20210924170306-047508b
poolInternal:
poolInternalAmd64:
name: NetCore1ESPool-Svc-Internal
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
poolPublic:
poolInternalArm64:
name: Docker-Linux-Arm-Internal
poolPublicAmd64:
name: NetCore1ESPool-Svc-Public
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
tarballDir: $(Build.StagingDirectory)/tarball
jobs:
- job: Build_Tarball
condition: ${{ parameters.condition }}
displayName: Build Tarball
dependsOn: ${{ parameters.dependsOn }}
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
${{ parameters.poolPublic }}
${{ if eq(variables['System.TeamProject'], 'internal') }}:
${{ parameters.poolInternal }}
strategy:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml
parameters:
architecture: x64
condition: ${{ parameters.condition }}
dependsOn: ${{ parameters.dependsOn }}
installerBuildResourceId: ${{ parameters.installerBuildResourceId }}
matrix:
CentOS7-Online:
_BootstrapPrep: false
_BuildArch: x64
_Container: ${{ parameters.centOS7Container }}
_EnablePoison: false
_ExcludeOmniSharpTests: true
_Platform: linux
_RunOnline: true
CentOS7-Offline:
_BootstrapPrep: false
_BuildArch: x64
_Container: ${{ parameters.centOS7Container }}
_EnablePoison: false
_ExcludeOmniSharpTests: true
_Platform: linux
_RunOnline: false
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
CentOS8-Offline:
_BootstrapPrep: false
_BuildArch: x64
_Container: ${{ parameters.centOS8Container }}
_EnablePoison: false
_ExcludeOmniSharpTests: false
_Platform: linux
_RunOnline: false
CentOSStream9-Offline:
_BootstrapPrep: false
_BuildArch: x64
_Container: ${{ parameters.centOSStream9Container }}
_EnablePoison: false
_ExcludeOmniSharpTests: false
_Platform: linux
_RunOnline: false
Fedora33-Offline:
_BootstrapPrep: false
_BuildArch: x64
_Container: ${{ parameters.fedora33Container }}
_EnablePoison: true
_ExcludeOmniSharpTests: false
_Platform: linux
_RunOnline: false
Ubuntu1804-Offline:
_BootstrapPrep: false
_BuildArch: x64
_Container: ${{ parameters.ubuntu1804Container }}
_EnablePoison: false
_ExcludeOmniSharpTests: false
_Platform: linux
_RunOnline: false
timeoutInMinutes: ${{ parameters.buildJobTimeout }}
variables:
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- group: AzureDevOps-Artifact-Feeds-Pats
workspace:
clean: all
steps:
- checkout: self
clean: true
- template: /src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml
parameters:
buildArch: $(_BuildArch)
container: $(_Container)
enablePoison: $(_EnablePoison)
excludeOmniSharpTests: $(_ExcludeOmniSharpTests)
installerBuildResourceId: ${{ parameters.installerBuildResourceId }}
platform: $(_Platform)
prepScript: |
set -x
customPrepArgs=
if [[ '$(_BootstrapPrep)' == 'true' ]]; then
customPrepArgs='--bootstrap'
fi
docker run --rm -v ${{ parameters.tarballDir }}:/tarball -w /tarball $(_Container) ./prep.sh ${customPrepArgs}
runOnline: $(_RunOnline)
tarballDir: ${{ parameters.tarballDir }}
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- job: Rebuild_Tarball
displayName: Rebuild Tarball With Previous
dependsOn: Build_Tarball
# Always attempt to run the bootstrap leg (e.g. even when stage 1 tests fail) in order to get a complete accessment of the build status.
# The bootstrap build will shortcut if the stage 1 build failed.
condition: and(${{ parameters.condition }}, succeededOrFailed())
name: Build_Tarball_x64
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
${{ parameters.poolPublic }}
${{ parameters.poolPublicAmd64 }}
${{ if eq(variables['System.TeamProject'], 'internal') }}:
${{ parameters.poolInternal }}
strategy:
${{ parameters.poolInternalAmd64 }}
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml
parameters:
architecture: arm64
condition: ${{ parameters.condition }}
dependsOn: ${{ parameters.dependsOn }}
installerBuildResourceId: ${{ parameters.installerBuildResourceId }}
matrix:
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
Debian9-Offline:
_BootstrapPrep: true
_Container: ${{ parameters.debian9Arm64Container }}
_EnablePoison: false
_ExcludeOmniSharpTests: false
_RunOnline: false
name: Build_Tarball_arm64
pool: ${{ parameters.poolInternalArm64 }}
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-build-tarball.yml
parameters:
architecture: x64
# Always attempt to run the bootstrap leg (e.g. even when stage 1 tests fail) in order to get a complete accessment of the build status.
# The bootstrap build will shortcut if the stage 1 build failed.
condition: and(${{ parameters.condition }}, succeededOrFailed())
dependsOn: Build_Tarball_x64
excludeSdkContentTests: true
installerBuildResourceId: ${{ parameters.installerBuildResourceId }}
matrix:
Fedora33-Offline:
_PreviousSourceBuildArtifact: Build Tarball Fedora33-Offline_Artifacts
_BuildArch: x64
_PreviousSourceBuildArtifact: Build_Tarball_x64 Fedora33-Offline_Artifacts
_Container: ${{ parameters.fedora33Container }}
_Platform: linux
_EnablePoison: false
_ExcludeOmniSharpTests: false
_RunOnline: false
timeoutInMinutes: ${{ parameters.buildJobTimeout }}
variables:
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- group: AzureDevOps-Artifact-Feeds-Pats
workspace:
clean: all
steps:
- checkout: self
clean: true
- download: current
artifact: $(_PreviousSourceBuildArtifact)
patterns: '*.tar.gz'
displayName: Download Previous Source Build Artifacts
- task: CopyFiles@2
displayName: Copy Previous Source Build Artifacts
inputs:
SourceFolder: $(PIPELINE.WORKSPACE)/$(_PreviousSourceBuildArtifact)
Contents: '*.tar.gz'
TargetFolder: ${{ parameters.tarballDir }}/packages/archive/
- template: /src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml
parameters:
additionalBuildArgs: --with-sdk /tarball/.dotnet
buildArch: $(_BuildArch)
container: $(_Container)
installerBuildResourceId: ${{ parameters.installerBuildResourceId }}
isBootstrapped: true
platform: $(_Platform)
prepScript: |
set -x
mkdir ${{ parameters.tarballDir }}/.dotnet
tarballFilePath="${{ parameters.tarballDir }}/packages/archive/dotnet-sdk-*.tar.gz"
eval tar -ozxf "$tarballFilePath" -C "${{ parameters.tarballDir }}/.dotnet"
eval rm -f "$tarballFilePath"
runOnline: $(_RunOnline)
tarballDir: ${{ parameters.tarballDir }}
name: Build_Tarball_x64_Using_Previous
pool:
${{ if eq(variables['System.TeamProject'], 'public') }}:
${{ parameters.poolPublicAmd64 }}
${{ if eq(variables['System.TeamProject'], 'internal') }}:
${{ parameters.poolInternalAmd64 }}
usePreviousArtifacts: true

View file

@ -1,158 +0,0 @@
# Steps used to build a source-build tarball
parameters:
# Additional custom build args
additionalBuildArgs: ""
# Architecture to build
buildArch: null
# Container image to build within
container: null
# Enable the poison report
enablePoison: false
# Skip running the OmniSharp smoke-tests
excludeOmniSharpTests: false
# Resource id of the installer build to retrieve source/product tarball's from
installerBuildResourceId: null
# Whether or not this is a bootstrapped build
isBootstrapped: false
# Platform the build is running on (linux, osx, win)
platform: null
# Script logic to prep the tarball for building
prepScript: null
# Whether or not to build online
runOnline: false
# Directory to build the tarball in
tarballDir:
steps:
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- task: Bash@3
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- download: ${{ parameters.installerBuildResourceId }}
artifact: BlobArtifacts
patterns: '**/dotnet-sdk-source*.tar.gz'
displayName: Download Source Tarball
- download: ${{ parameters.installerBuildResourceId }}
artifact: BlobArtifacts
patterns: '**/dotnet-sdk-!(*-*)-${{ parameters.platform }}-${{ parameters.buildArch }}.tar.gz'
displayName: Download MSFT sdk Tarball
- script: |
set -x
resourceIdPathSegment=
if [[ '${{ parameters.installerBuildResourceId }}' != 'current' ]]; then
resourceIdPathSegment='${{ parameters.installerBuildResourceId }}/'
fi
mkdir -p "${{ parameters.tarballDir }}"
tarballFilePath="$(PIPELINE.WORKSPACE)/${resourceIdPathSegment}BlobArtifacts/dotnet-sdk-source*.tar.gz"
eval tar -ozxf "$tarballFilePath" -C "${{ parameters.tarballDir }}"
eval rm -f "$tarballFilePath"
displayName: Extract Tarball
- script: ${{ parameters.prepScript }}
displayName: Prep Tarball
- script: |
set -x
df -h
networkArgs=
customBuildArgs=
if [[ '${{ parameters.runOnline }}' == 'true' ]]; then
customBuildArgs='--online'
else
networkArgs='--network none'
fi
if [[ '${{ parameters.enablePoison }}' == 'true' ]]; then
customBuildArgs="$customBuildArgs --poison"
fi
docker run --rm -v ${{ parameters.tarballDir }}:/tarball -w /tarball ${networkArgs} ${{ parameters.container }} ./build.sh ${customBuildArgs} ${{ parameters.additionalBuildArgs }} -- /p:CleanWhileBuilding=true
displayName: Build Tarball
- script: |
set -x
# Use installer repo's NuGet.config during online testing to utilize internal feeds
rm -f ${{ parameters.tarballDir }}/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config
cp $(Build.SourcesDirectory)/NuGet.config ${{ parameters.tarballDir }}/test/Microsoft.DotNet.SourceBuild.SmokeTests/assets/online.NuGet.Config
dockerVolumeArgs="-v ${{ parameters.tarballDir }}:/tarball"
dockerEnvArgs="-e SMOKE_TESTS_EXCLUDE_OMNISHARP=${{ parameters.excludeOmniSharpTests}} -e SMOKE_TESTS_WARN_SDK_CONTENT_DIFFS=true"
poisonArg=''
if [[ '${{ parameters.isBootstrapped }}' != 'true' && '${{ parameters.installerBuildResourceId }}' != 'current' ]]; then
dockerVolumeArgs+=" -v $(PIPELINE.WORKSPACE)/${{ parameters.installerBuildResourceId }}/BlobArtifacts/:/BlobArtifacts"
msftSdkTarballName=$(find "$(PIPELINE.WORKSPACE)/${{ parameters.installerBuildResourceId }}/BlobArtifacts/" -name "dotnet-sdk-*-${{ parameters.Platform }}-${{ parameters.buildArch }}.tar.gz" -exec basename {} \;)
dockerEnvArgs+=" -e SMOKE_TESTS_MSFT_SDK_TARBALL_PATH=/BlobArtifacts/$msftSdkTarballName"
fi
if [[ '${{ parameters.enablePoison }}' == 'true' ]]; then
poisonArg='--poison'
dockerEnvArgs+=" -e SMOKE_TESTS_WARN_POISON_DIFFS=true"
fi
docker run --rm $dockerVolumeArgs -w /tarball $dockerEnvArgs ${{ parameters.container }} ./build.sh $poisonArg --run-smoke-test ${{ parameters.additionalBuildArgs }} -- /p:SmokeTestConsoleVerbosity=detailed
displayName: Run Tests
# Don't use CopyFiles@2 as it encounters permissions issues because it indexes all files in the source directory graph.
- script: |
set -x
targetFolder=$(Build.StagingDirectory)/BuildLogs/
mkdir -p ${targetFolder}
cd "${{ parameters.tarballDir }}"
find artifacts/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \;
find artifacts/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \;
find artifacts/prebuilt-report/ -exec cp {} --parents -t ${targetFolder} \;
find src/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \;
find src/ -type f -name "*.log" -exec cp {} --parents -t ${targetFolder} \;
find test/ -type f -name "*.binlog" -exec cp {} --parents -t ${targetFolder} \;
displayName: Prepare BuildLogs staging directory
continueOnError: true
condition: succeededOrFailed()
- publish: '$(Build.StagingDirectory)/BuildLogs'
artifact: $(Agent.JobName)_BuildLogs_Attempt$(System.JobAttempt)
displayName: Publish BuildLogs
continueOnError: true
condition: succeededOrFailed()
- task: PublishTestResults@2
displayName: Publish Test Results
condition: succeededOrFailed()
continueOnError: true
inputs:
testRunner: vSTest
testResultsFiles: 'test/**/*.trx'
searchFolder: ${{ parameters.tarballDir }}
mergeTestResults: true
publishRunAttachments: true
testRunTitle: SourceBuild_SmokeTests_$(Agent.JobName)
- publish: '${{ parameters.tarballDir }}/artifacts/${{ parameters.buildArch}}/Release/'
artifact: $(Agent.JobName)_Artifacts
displayName: Publish Artifacts
condition: succeededOrFailed()
continueOnError: true

View file

@ -11,10 +11,6 @@
should be added to source-build-reference-packages.
-->
<ItemGroup>
<PackageDownload Include="Microsoft.DotNet.Web.ItemTemplates.6.0" Version="[$(AspNetCorePackageVersionFor60Templates)]" />
<PackageDownload Include="Microsoft.DotNet.Web.ProjectTemplates.6.0" Version="[$(AspNetCorePackageVersionFor60Templates)]" />
<PackageDownload Include="Microsoft.DotNet.Web.Spa.ProjectTemplates.6.0" Version="[$(AspNetCorePackageVersionFor60Templates)]" />
<PackageDownload Include="Microsoft.NET.Sdk.Android.Manifest-6.0.200" Version="[$(XamarinAndroidWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.iOS.Manifest-6.0.200" Version="[$(XamarinIOSWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.200" Version="[$(XamarinMacCatalystWorkloadManifestVersion)]" />

View file

@ -177,13 +177,12 @@
<TargetOS Condition="'$(TargetOS)' == '' AND $([MSBuild]::IsOSPlatform('OSX'))">OSX</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' AND $([MSBuild]::IsOSPlatform('LINUX'))">Linux</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' AND $([MSBuild]::IsOSPlatform('FREEBSD'))">FreeBSD</TargetOS>
</PropertyGroup>
<PropertyGroup Condition="'$(PortableBuild)' == 'true'">
<TargetRid Condition="'$(TargetOS)' == 'FreeBSD'">freebsd-$(Platform)</TargetRid>
<TargetRid Condition="'$(TargetOS)' == 'OSX'">osx-$(Platform)</TargetRid>
<TargetRid Condition="'$(TargetOS)' == 'Linux'">linux-$(Platform)</TargetRid>
<TargetRid Condition="'$(TargetOS)' == 'Windows_NT'">win-$(Platform)</TargetRid>
<PortableRid Condition="'$(TargetOS)' == 'FreeBSD'">freebsd-$(Platform)</PortableRid>
<PortableRid Condition="'$(TargetOS)' == 'OSX'">osx-$(Platform)</PortableRid>
<PortableRid Condition="'$(TargetOS)' == 'Linux'">linux-$(Platform)</PortableRid>
<PortableRid Condition="'$(TargetOS)' == 'Windows_NT'">win-$(Platform)</PortableRid>
<TargetRid Condition="'$(PortableBuild)' == 'true' AND '$(PortableRid)' != ''">$(PortableRid)</TargetRid>
</PropertyGroup>
<PropertyGroup>

View file

@ -106,6 +106,7 @@
EnvironmentVariables="
SMOKE_TESTS_SDK_TARBALL_PATH=$(SdkTarballPath);
SMOKE_TESTS_TARGET_RID=$(TargetRid);
SMOKE_TESTS_PORTABLE_RID=$(PortableRid);
$(CustomTestEnvVars)" />
</Target>

View file

@ -85,7 +85,8 @@ namespace Microsoft.DotNet.SourceBuild.SmokeTests
private static string GetBaselineFilePath(string baselineFileName) => Path.Combine(GetAssetsDirectory(), "baselines", baselineFileName);
public static string RemoveRids(string diff) => diff.Replace(Config.TargetRid, "banana.rid");
public static string RemoveRids(string diff, bool isPortable = false) =>
isPortable ? diff.Replace(Config.PortableRid, "portable-rid") : diff.Replace(Config.TargetRid, "banana-rid");
public static string RemoveVersions(string source)
{

View file

@ -13,6 +13,7 @@ internal static class Config
public const string ExcludeOmniSharpEnv = "SMOKE_TESTS_EXCLUDE_OMNISHARP";
public const string MsftSdkTarballPathEnv = "SMOKE_TESTS_MSFT_SDK_TARBALL_PATH";
public const string PoisonReportPathEnv = "SMOKE_TESTS_POISON_REPORT_PATH";
public const string PortableRidEnv = "SMOKE_TESTS_PORTABLE_RID";
public const string PrereqsPathEnv = "SMOKE_TESTS_PREREQS_PATH";
public const string SdkTarballPathEnv = "SMOKE_TESTS_SDK_TARBALL_PATH";
public const string TargetRidEnv = "SMOKE_TESTS_TARGET_RID";
@ -23,6 +24,8 @@ internal static class Config
Environment.GetEnvironmentVariable(DotNetDirectoryEnv) ?? Path.Combine(Directory.GetCurrentDirectory(), ".dotnet");
public static string? MsftSdkTarballPath { get; } = Environment.GetEnvironmentVariable(MsftSdkTarballPathEnv);
public static string? PoisonReportPath { get; } = Environment.GetEnvironmentVariable(PoisonReportPathEnv);
public static string PortableRid { get; } = Environment.GetEnvironmentVariable(PortableRidEnv) ??
throw new InvalidOperationException($"'{Config.PortableRidEnv}' must be specified");
public static string? PrereqsPath { get; } = Environment.GetEnvironmentVariable(PrereqsPathEnv);
public static string? SdkTarballPath { get; } = Environment.GetEnvironmentVariable(SdkTarballPathEnv);
public static string TargetRid { get; } = Environment.GetEnvironmentVariable(TargetRidEnv) ??

View file

@ -27,17 +27,16 @@ public class SdkContentTests : SmokeTests
{
const string msftFileListingFileName = "msftSdkFiles.txt";
const string sbFileListingFileName = "sbSdkFiles.txt";
WriteTarballFileList(Config.MsftSdkTarballPath, msftFileListingFileName);
WriteTarballFileList(Config.SdkTarballPath, sbFileListingFileName);
WriteTarballFileList(Config.MsftSdkTarballPath, msftFileListingFileName, isPortable: true);
WriteTarballFileList(Config.SdkTarballPath, sbFileListingFileName, isPortable: false);
string diff = BaselineHelper.DiffFiles(msftFileListingFileName, sbFileListingFileName, OutputHelper);
diff = BaselineHelper.RemoveVersions(diff);
diff = RemoveDiffMarkers(diff);
diff = BaselineHelper.RemoveRids(diff);
BaselineHelper.CompareContents("MsftToSbSdk.diff", diff, OutputHelper, Config.WarnOnSdkContentDiffs);
}
private void WriteTarballFileList(string? tarballPath, string outputFileName)
private void WriteTarballFileList(string? tarballPath, string outputFileName, bool isPortable)
{
if (!File.Exists(tarballPath))
{
@ -45,7 +44,9 @@ public class SdkContentTests : SmokeTests
}
string fileListing = ExecuteHelper.ExecuteProcessValidateExitCode("tar", $"tf {tarballPath}", OutputHelper);
fileListing = BaselineHelper.RemoveRids(fileListing, isPortable);
IEnumerable<string> files = fileListing.Split(Environment.NewLine).OrderBy(path => path);
File.WriteAllLines(outputFileName, files);
}

View file

@ -31,34 +31,34 @@ index ------------
+./packs/Microsoft.AspNetCore.App.Ref/x.y.z/ref/netx.y/System.Security.AccessControl.xml
./packs/Microsoft.AspNetCore.App.Ref/x.y.z/ref/netx.y/System.Security.Cryptography.Xml.dll
./packs/Microsoft.AspNetCore.App.Ref/x.y.z/ref/netx.y/System.Security.Cryptography.Xml.xml
-./packs/Microsoft.NETCore.App.Host.linux-x64/
-./packs/Microsoft.NETCore.App.Host.linux-x64/x.y.z/
-./packs/Microsoft.NETCore.App.Host.linux-x64/x.y.z/runtimes/
-./packs/Microsoft.NETCore.App.Host.linux-x64/x.y.z/runtimes/linux-x64/
-./packs/Microsoft.NETCore.App.Host.linux-x64/x.y.z/runtimes/linux-x64/native/
-./packs/Microsoft.NETCore.App.Host.linux-x64/x.y.z/runtimes/linux-x64/native/apphost
-./packs/Microsoft.NETCore.App.Host.linux-x64/x.y.z/runtimes/linux-x64/native/coreclr_delegates.h
-./packs/Microsoft.NETCore.App.Host.linux-x64/x.y.z/runtimes/linux-x64/native/hostfxr.h
-./packs/Microsoft.NETCore.App.Host.linux-x64/x.y.z/runtimes/linux-x64/native/libnethost.a
-./packs/Microsoft.NETCore.App.Host.linux-x64/x.y.z/runtimes/linux-x64/native/libnethost.so
-./packs/Microsoft.NETCore.App.Host.linux-x64/x.y.z/runtimes/linux-x64/native/nethost.h
-./packs/Microsoft.NETCore.App.Host.linux-x64/x.y.z/runtimes/linux-x64/native/singlefilehost
-./packs/Microsoft.NETCore.App.Host.portable-rid/
-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/
-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/
-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/
-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/
-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/apphost
-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/coreclr_delegates.h
-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/hostfxr.h
-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/libnethost.a
-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/libnethost.so
-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/nethost.h
-./packs/Microsoft.NETCore.App.Host.portable-rid/x.y.z/runtimes/portable-rid/native/singlefilehost
+./packs/Microsoft.AspNetCore.App.Ref/x.y.z/ref/netx.y/System.Text.Encodings.Web.dll
+./packs/Microsoft.AspNetCore.App.Ref/x.y.z/ref/netx.y/System.Text.Encodings.Web.xml
+./packs/Microsoft.AspNetCore.App.Ref/x.y.z/ref/netx.y/System.Text.Json.dll
+./packs/Microsoft.AspNetCore.App.Ref/x.y.z/ref/netx.y/System.Text.Json.xml
+./packs/Microsoft.NETCore.App.Host.banana.rid/
+./packs/Microsoft.NETCore.App.Host.banana.rid/x.y.z/
+./packs/Microsoft.NETCore.App.Host.banana.rid/x.y.z/runtimes/
+./packs/Microsoft.NETCore.App.Host.banana.rid/x.y.z/runtimes/banana.rid/
+./packs/Microsoft.NETCore.App.Host.banana.rid/x.y.z/runtimes/banana.rid/native/
+./packs/Microsoft.NETCore.App.Host.banana.rid/x.y.z/runtimes/banana.rid/native/apphost
+./packs/Microsoft.NETCore.App.Host.banana.rid/x.y.z/runtimes/banana.rid/native/coreclr_delegates.h
+./packs/Microsoft.NETCore.App.Host.banana.rid/x.y.z/runtimes/banana.rid/native/hostfxr.h
+./packs/Microsoft.NETCore.App.Host.banana.rid/x.y.z/runtimes/banana.rid/native/libnethost.a
+./packs/Microsoft.NETCore.App.Host.banana.rid/x.y.z/runtimes/banana.rid/native/libnethost.so
+./packs/Microsoft.NETCore.App.Host.banana.rid/x.y.z/runtimes/banana.rid/native/nethost.h
+./packs/Microsoft.NETCore.App.Host.banana.rid/x.y.z/runtimes/banana.rid/native/singlefilehost
+./packs/Microsoft.NETCore.App.Host.banana-rid/
+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/
+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/
+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/
+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/
+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/apphost
+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/coreclr_delegates.h
+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/hostfxr.h
+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/libnethost.a
+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/libnethost.so
+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/nethost.h
+./packs/Microsoft.NETCore.App.Host.banana-rid/x.y.z/runtimes/banana-rid/native/singlefilehost
./packs/Microsoft.NETCore.App.Ref/
./packs/Microsoft.NETCore.App.Ref/x.y.z/
./packs/Microsoft.NETCore.App.Ref/x.y.z/analyzers/
@ -1478,4 +1478,4 @@ index ------------
+./shared/Microsoft.AspNetCore.App/x.y.z/System.Text.Json.dll
./shared/Microsoft.AspNetCore.App/x.y.z/THIRD-PARTY-NOTICES.txt
./shared/Microsoft.NETCore.App/
./shared/Microsoft.NETCore.App/x.y.z/
./shared/Microsoft.NETCore.App/x.y.z/

View file

@ -0,0 +1,113 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Godbe <wigodbe@microsoft.com>
Date: Wed, 23 Mar 2022 09:11:11 -0700
Subject: [PATCH] Revert "Revert "[release/6.0] Build ProjectTemplates in
Source-Build (#40650)" (#40805)"
This reverts commit a351c437ac7bc9f9be96de51832608438a7a37df.
---
Directory.Build.props | 3 +++
Directory.Build.targets | 9 +++++++--
.../src/Microsoft.Authentication.WebAssembly.Msal.csproj | 9 ++++++++-
...pNetCore.Components.WebAssembly.Authentication.csproj | 9 ++++++++-
4 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index 8f0ac59422..721f099a77 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -30,6 +30,9 @@
$(MSBuildProjectName.EndsWith('.Test')) OR
$(MSBuildProjectName.EndsWith('.FunctionalTest')) ) ">true</IsUnitTestProject>
<IsTestAssetProject Condition=" $(RepoRelativeProjectDir.Contains('testassets')) OR $(MSBuildProjectName.Contains('TestCommon'))">true</IsTestAssetProject>
+ <IsProjectTemplateProject Condition=" ($(RepoRelativeProjectDir.Contains('ProjectTemplates')) OR $(MSBuildProjectName.Contains('ProjectTemplates')) ) AND
+ '$(IsUnitTestProject)' != 'true' AND
+ '$(IsTestAssetProject)' != 'true' ">true</IsProjectTemplateProject>
<IsSampleProject Condition=" $(RepoRelativeProjectDir.ToUpperInvariant().Contains('SAMPLE')) ">true</IsSampleProject>
<IsAnalyzersProject Condition="$(MSBuildProjectName.EndsWith('.Analyzers'))">true</IsAnalyzersProject>
<IsShipping Condition=" '$(IsSampleProject)' == 'true' OR
diff --git a/Directory.Build.targets b/Directory.Build.targets
index a195c0fb2e..fd388a1176 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -1,10 +1,15 @@
<Project>
<PropertyGroup>
- <!-- Only build Microsoft.AspNetCore.App, Microsoft.AspNetCore.App.Ref, and ref/ assemblies in source build. -->
+ <!-- Only build Microsoft.AspNetCore.App, Microsoft.AspNetCore.App.Ref, ref/ assemblies, and ProjectTemplates in source build. -->
<!-- Analyzer package are needed in source build for WebSDK -->
<ExcludeFromSourceBuild
- Condition="'$(ExcludeFromSourceBuild)' == '' and '$(DotNetBuildFromSource)' == 'true' and '$(IsAspNetCoreApp)' != 'true' and '$(MSBuildProjectName)' != '$(TargetingPackName)' and '$(IsAnalyzersProject)' != 'true'">true</ExcludeFromSourceBuild>
+ Condition="'$(ExcludeFromSourceBuild)' == '' and
+ '$(DotNetBuildFromSource)' == 'true' and
+ '$(IsAspNetCoreApp)' != 'true' and
+ '$(MSBuildProjectName)' != '$(TargetingPackName)' and
+ '$(IsAnalyzersProject)' != 'true' and
+ '$(IsProjectTemplateProject)' != 'true'">true</ExcludeFromSourceBuild>
<!-- If the user has specified that they want to skip building any test related projects with SkipTestBuild,
suppress all targets for TestProjects using ExcludeFromBuild. -->
diff --git a/src/Components/WebAssembly/Authentication.Msal/src/Microsoft.Authentication.WebAssembly.Msal.csproj b/src/Components/WebAssembly/Authentication.Msal/src/Microsoft.Authentication.WebAssembly.Msal.csproj
index 8ae5d1c43d..8e0f53957e 100644
--- a/src/Components/WebAssembly/Authentication.Msal/src/Microsoft.Authentication.WebAssembly.Msal.csproj
+++ b/src/Components/WebAssembly/Authentication.Msal/src/Microsoft.Authentication.WebAssembly.Msal.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
- <Sdk Name="Yarn.MSBuild" />
+ <Import Project="Sdk.props" Sdk="Yarn.MSBuild" Condition=" '$(DotNetBuildFromSource)' != 'true'" />
<PropertyGroup>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
@@ -25,6 +25,7 @@
<PropertyGroup>
<YarnWorkingDir>$(MSBuildThisFileDirectory)Interop\</YarnWorkingDir>
<ResolveStaticWebAssetsInputsDependsOn>
+ CheckForSourceBuild;
CompileInterop;
IncludeCompileInteropOutput;
$(ResolveStaticWebAssetsInputsDependsOn)
@@ -91,5 +92,11 @@
<FileWrites Include="$(_InteropBuildOutput)" />
</ItemGroup>
</Target>
+
+ <Target Name="CheckForSourceBuild" Condition=" '$(DotNetBuildFromSource)' == 'true'">
+ <Error Text="The Yarn.Msbuild SDK is currently excluded from SourceBuild. If you are enabling this project for SourceBuild, remove the condition on the Yarn.Msbuild SDK above." />
+ </Target>
+
+ <Import Project="Sdk.targets" Sdk="Yarn.MSBuild" Condition=" '$(DotNetBuildFromSource)' != 'true'" />
</Project>
diff --git a/src/Components/WebAssembly/WebAssembly.Authentication/src/Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj b/src/Components/WebAssembly/WebAssembly.Authentication/src/Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj
index 8d6a000d74..35c79a73eb 100644
--- a/src/Components/WebAssembly/WebAssembly.Authentication/src/Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj
+++ b/src/Components/WebAssembly/WebAssembly.Authentication/src/Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
- <Sdk Name="Yarn.MSBuild" />
+ <Import Project="Sdk.props" Sdk="Yarn.MSBuild" Condition=" '$(DotNetBuildFromSource)' != 'true'" />
<PropertyGroup>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
@@ -26,6 +26,7 @@
<PropertyGroup>
<YarnWorkingDir>$(MSBuildThisFileDirectory)Interop\</YarnWorkingDir>
<ResolveStaticWebAssetsInputsDependsOn>
+ CheckForSourceBuild;
CompileInterop;
IncludeCompileInteropOutput;
$(ResolveStaticWebAssetsInputsDependsOn)
@@ -93,4 +94,10 @@
</ItemGroup>
</Target>
+ <Target Name="CheckForSourceBuild" Condition=" '$(DotNetBuildFromSource)' == 'true'">
+ <Error Text="The Yarn.Msbuild SDK is currently excluded from SourceBuild. If you are enabling this project for SourceBuild, remove the condition on the Yarn.Msbuild SDK above." />
+ </Target>
+
+ <Import Project="Sdk.targets" Sdk="Yarn.MSBuild" Condition=" '$(DotNetBuildFromSource)' != 'true'" />
+
</Project>