Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
11de58d
Update .vsts-ci.yml
marcpopMSFT Feb 6, 2022
97c7aa2
Update dependencies from https://github.com/dotnet/source-build-refer…
dotnet-maestro[bot] Feb 7, 2022
7d14092
Override Microsoft.Net.Sdk.WindowsDesktop references during source-bu…
lbussell Feb 7, 2022
b86d04b
Update dependencies from https://github.com/dotnet/arcade build 20220…
dotnet-maestro[bot] Feb 8, 2022
2186b8b
Merge commit '02d5242ed7ca7c3747fc89196cf67aeff260c6ac' into internal…
vseanreesermsft Feb 8, 2022
583dcc4
[release/6.0.1xx] Windows SDK projection update
manodasanW Feb 8, 2022
ee9b807
Update asp.net templates (#13193)
wtgodbe Feb 9, 2022
b7a97cb
Merge pull request #13198 from manodasanW/patch-3
marcpopMSFT Feb 9, 2022
69bd1f8
Merge pull request #13189 from vseanreesermsft/internal-merge-6.0.1xx…
vseanreesermsft Feb 9, 2022
2f89821
Update dependencies from https://github.com/dotnet/source-build-refer…
dotnet-maestro[bot] Feb 10, 2022
d69361c
Add test to compare msft and sb sdk contents (#13153)
MichaelSimons Feb 10, 2022
606bca4
Update to SDK and previously-source-built 6.0.102. (#13221)
crummel Feb 15, 2022
35abe3c
Add CentOS Stream 9 container to CI matrix (#12955)
omajid Feb 15, 2022
e63e925
Update dependencies from https://github.com/dotnet/source-build-refer…
dotnet-maestro[bot] Feb 16, 2022
f6763d6
Gather additional smoke test prereqs (#13233)
MichaelSimons Feb 16, 2022
cab7e65
Remove bootstrapping for CI builds now that we use CentOS7 previously…
crummel Feb 17, 2022
93db1eb
Merge remote-tracking branch 'origin/release/6.0.1xx' into marcpopMSF…
marcpopMSFT Feb 17, 2022
952412b
Update Version.Details.xml
marcpopMSFT Feb 17, 2022
c9d7ba5
Update dependencies from https://github.com/dotnet/source-build-refer…
dotnet-maestro[bot] Mar 3, 2022
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
8 changes: 4 additions & 4 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@
<Sha>698fdad58fa64a55f16cd9562c90224cc498ed02</Sha>
<SourceBuildTarball RepoName="xdt" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.NET.Workload.Emscripten.Manifest-6.0.100" Version="6.0.0" CoherentParentDependency="VS.Redist.Common.NetCore.SharedFramework.x64.6.0">
<Dependency Name="Microsoft.NET.Workload.Emscripten.Manifest-6.0.200" Version="6.0.1" CoherentParentDependency="VS.Redist.Common.NetCore.SharedFramework.x64.6.0">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>1ec2e17fcfd86bdd6f7e7246b6d527e94e34c15a</Sha>
<Sha>e8ffccbd683205bf94e406e43556f8baca07dc5b</Sha>
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build" Version="0.1.0-alpha.1.21519.2" CoherentParentDependency="Microsoft.NET.Sdk">
<Uri>https://github.com/dotnet/source-build</Uri>
Expand Down Expand Up @@ -211,9 +211,9 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>fe5cc1841d12196d94a4ae3b276cb92d8d7ca73d</Sha>
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="6.0.0-servicing.22110.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="6.0.0-servicing.22153.2">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
<Sha>095aaf95c3d1d10a96db5cb3914632bc0c36db81</Sha>
<Sha>b624d18c4bed40e4b606beb4cd6f3a7a56b08533</Sha>
<SourceBuildTarball RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceLink.GitHub" Version="1.1.0-beta-21480-02" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
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>6.0.1-1</PrivateSourceBuiltArtifactsPackageVersion>
<PrivateSourceBuiltArtifactsPackageVersion>6.0.2</PrivateSourceBuiltArtifactsPackageVersion>
</PropertyGroup>
<!-- Workload manifest package versions -->
<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion eng/source-build-tarball-build-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ stages:
jobs:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml
parameters:
tarballResourceId: installer-build-resource
installerBuildResourceId: installer-build-resource
2 changes: 1 addition & 1 deletion eng/source-build-tarball-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ stages:
jobs:
- template: /src/SourceBuild/Arcade/eng/common/templates/job/source-build-run-tarball-build.yml
parameters:
tarballResourceId: installer-build-resource
installerBuildResourceId: installer-build-resource
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ parameters:
# Dependent jobs that must be completed before this job will run
dependsOn:

# The resource id of the tarball to download and build
tarballResourceId: current
# Resource id of the installer build to retrieve source/product tarball's from
installerBuildResourceId: current

# 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
fedora33Container: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-33-20210222183538-031e7d2
ubuntu1804Container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-20210924170306-047508b
Expand All @@ -38,37 +40,49 @@ jobs:
strategy:
matrix:
CentOS7-Online:
_BootstrapPrep: true
_BootstrapPrep: false
_BuildArch: x64
_Container: ${{ parameters.centOS7Container }}
_ExcludeOmniSharpTests: true
_Platform: linux
_RunOnline: true
CentOS7-Offline:
_BootstrapPrep: false
_BuildArch: x64
_Container: ${{ parameters.centOS7Container }}
_ExcludeOmniSharpTests: true
_Platform: linux
_RunOnline: false
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
CentOS7-Offline:
_BootstrapPrep: true
_BuildArch: x64
_Container: ${{ parameters.centOS7Container }}
_ExcludeOmniSharpTests: true
_RunOnline: false
CentOS8-Offline:
_BootstrapPrep: true
_BootstrapPrep: false
_BuildArch: x64
_Container: ${{ parameters.centOS8Container }}
_ExcludeOmniSharpTests: false
_Platform: linux
_RunOnline: false
CentOSStream9-Offline:
_BootstrapPrep: false
_BuildArch: x64
_Container: ${{ parameters.centOSStream9Container }}
_ExcludeOmniSharpTests: false
_Platform: linux
_RunOnline: false
Fedora33-Offline:
_BootstrapPrep: false
_BuildArch: x64
_Container: ${{ parameters.fedora33Container }}
_ExcludeOmniSharpTests: false
_Platform: linux
_RunOnline: false
Ubuntu1804-Offline:
_BootstrapPrep: true
_BootstrapPrep: false
_BuildArch: x64
_Container: ${{ parameters.ubuntu1804Container }}
_ExcludeOmniSharpTests: false
_Platform: linux
_RunOnline: false
timeoutInMinutes: 300
timeoutInMinutes: ${{ parameters.buildJobTimeout }}
variables:
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- group: AzureDevOps-Artifact-Feeds-Pats
Expand All @@ -79,20 +93,13 @@ jobs:
- 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)

- template: /src/SourceBuild/Arcade/eng/common/templates/steps/source-build-build-tarball.yml
parameters:
buildArch: $(_BuildArch)
container: $(_Container)
excludeOmniSharpTests: $(_ExcludeOmniSharpTests)
installerBuildResourceId: ${{ parameters.installerBuildResourceId }}
platform: $(_Platform)
prepScript: |
set -x

Expand All @@ -104,7 +111,6 @@ jobs:
docker run --rm -v ${{ parameters.tarballDir }}:/tarball -w /tarball $(_Container) ./prep.sh ${customPrepArgs}
runOnline: $(_RunOnline)
tarballDir: ${{ parameters.tarballDir }}
tarballResourceId: ${{ parameters.tarballResourceId }}

- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- job: Rebuild_Tarball
Expand All @@ -121,8 +127,9 @@ jobs:
_PreviousSourceBuildArtifact: Build Tarball Fedora33-Offline_Artifacts
_BuildArch: x64
_Container: ${{ parameters.fedora33Container }}
_Platform: linux
_RunOnline: false
timeoutInMinutes: 180
timeoutInMinutes: ${{ parameters.buildJobTimeout }}
variables:
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- group: AzureDevOps-Artifact-Feeds-Pats
Expand All @@ -133,15 +140,6 @@ jobs:
- 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: current
artifact: $(_PreviousSourceBuildArtifact)
patterns: '*.tar.gz'
Expand All @@ -159,6 +157,9 @@ jobs:
additionalBuildArgs: --with-sdk /tarball/.dotnet
buildArch: $(_BuildArch)
container: $(_Container)
installerBuildResourceId: ${{ parameters.installerBuildResourceId }}
isBootstrapped: true
platform: $(_Platform)
prepScript: |
set -x

Expand All @@ -168,4 +169,3 @@ jobs:
eval rm -f "$tarballFilePath"
runOnline: $(_RunOnline)
tarballDir: ${{ parameters.tarballDir }}
tarballResourceId: ${{ parameters.tarballResourceId }}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ parameters:
# 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

Expand All @@ -22,21 +31,32 @@ parameters:
# Directory to build the tarball in
tarballDir:

# Resource id of the tarball to download and build
tarballResourceId: null

steps:
- download: ${{ parameters.tarballResourceId }}
- ${{ 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 Tarball
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.tarballResourceId }}' != 'current' ]; then
resourceIdPathSegment='${{ parameters.tarballResourceId }}/'
if [ '${{ parameters.installerBuildResourceId }}' != 'current' ]; then
resourceIdPathSegment='${{ parameters.installerBuildResourceId }}/'
fi

mkdir -p "${{ parameters.tarballDir }}"
Expand Down Expand Up @@ -70,7 +90,16 @@ steps:
rm -f ${{ parameters.tarballDir }}/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/online.NuGet.Config
cp NuGet.config ${{ parameters.tarballDir }}/test/Microsoft.DotNet.SourceBuild.SmokeTests/smoke-tests/online.NuGet.Config

docker run --rm -v ${{ parameters.tarballDir }}:/tarball -w /tarball -e EXCLUDE_OMNISHARP_TESTS=${{ parameters.excludeOmniSharpTests}} ${{ parameters.container }} ./build.sh --run-smoke-test ${{ parameters.additionalBuildArgs }}
dockerVolumeArgs="-v ${{ parameters.tarballDir }}:/tarball"
dockerEnvArgs="-e EXCLUDE_OMNISHARP_TESTS=${{ parameters.excludeOmniSharpTests}}"

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 MSFT_SDK_TARBALL_PATH=/BlobArtifacts/$msftSdkTarballName"
fi

docker run --rm $dockerVolumeArgs -w /tarball $dockerEnvArgs ${{ parameters.container }} ./build.sh --run-smoke-test ${{ parameters.additionalBuildArgs }}
displayName: Run Tests

# Don't use CopyFiles@2 as it encounters permissions issues because it indexes all files in the source directory graph.
Expand Down
20 changes: 17 additions & 3 deletions src/SourceBuild/tarball/content/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,31 @@
" />
</Target>

<Target Name="CreateSmokeTestPrereqs"
<Target Name="CreateSmokeTestPrereqsTarball"
AfterTargets="RunSmokeTest"
Condition="'$(SkipSmokeTestPrereqsTarballCreation)' != 'true'" >
Condition="'$(SkipSmokeTestPrereqsTarballCreation)' != 'true'"
DependsOnTargets="
CheckIfCreateSmokeTestPrereqsExistToPack;
CreateCreateSmokeTestPrereqsTarballIfPrereqsExist"/>

<Target Name="CheckIfCreateSmokeTestPrereqsExistToPack">
<ItemGroup>
<Prereqs Include="test/Microsoft.DotNet.SourceBuild.SmokeTests/bin/$(Configuration)/net6.0/smoke-tests/prereq-packages/**" />
</ItemGroup>

<Message Text="Found @(Prereqs->Count()) files in prereqs packages dir." Importance="High" />
</Target>

<Target Name="CreateCreateSmokeTestPrereqsTarballIfPrereqsExist"
Condition="'@(Prereqs->Count())' != '0'">
<PropertyGroup>
<SmokeTestPrereqsTarballName>$(OutputPath)dotnet-smoke-test-prereqs.$(installerOutputPackageVersion).tar.gz</SmokeTestPrereqsTarballName>
</PropertyGroup>

<Exec Command="tar --numeric-owner -czf $(SmokeTestPrereqsTarballName) ."
WorkingDirectory="./test/Microsoft.DotNet.SourceBuild.SmokeTests/bin/$(Configuration)/net6.0/smoke-tests/prereq-packages/"/>

<Message Importance="High" Text="Packaged smoke-test prereqs to $(SmokeTestPrereqsTarballName)" />
<Message Importance="High" Text="Packaged smoke-test prereqs in '$(SmokeTestPrereqsTarballName)'" />
</Target>

<UsingTask AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskName="UploadToAzure" />
Expand Down
2 changes: 1 addition & 1 deletion src/SourceBuild/tarball/content/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"tools": {
"dotnet": "6.0.200-preview.21603.2"
"dotnet": "6.0.200"
},
"msbuild-sdks": {
"Microsoft.Build.CentralPackageVersions": "2.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,6 @@
<ArcadeSharedFrameworkSdkOverride Include="Microsoft.DotNet.SharedFramework.Sdk" Group="ARCADE_SHARED_FX_SDK" Version="$(arcadeOutputPackageVersion)"/>
<ILSdkOverride Include="Microsoft.NET.Sdk.IL" Group="IL" />
<MsBuildTraversalSdkOverride Include="Microsoft.Build.Traversal" Group="MSBUILD_TRAVERSAL" Version="2.0.2"/>
<WindowsDesktopSdkOverride Include="Microsoft.Net.Sdk.WindowsDesktop" Group="WINDOWS_DESKTOP" Location="$(ToolsLocalDir)EmptySdk"/>
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions src/SourceBuild/tarball/content/repos/roslyn.proj
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

<ItemGroup>
<UseSourceBuiltSdkOverride Include="@(ArcadeSdkOverride)" />
<UseSourceBuiltSdkOverride Include="@(WindowsDesktopSdkOverride)" />
</ItemGroup>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using Xunit;
using Xunit.Abstractions;

namespace Microsoft.DotNet.SourceBuild.SmokeTests
{
Expand All @@ -32,6 +34,35 @@ public static void Compare(string baselineFileName, IOrderedEnumerable<string> a
Assert.Null(message);
}

public static void Compare(string baselineFileName, string actual, ITestOutputHelper outputHelper)
{
string baselineFilePath = GetBaselineFilePath(baselineFileName);
string baseline = File.ReadAllText(baselineFilePath);

string? message = null;
if (baseline != actual)
{
string actualBaselineFilePath = Path.Combine(Environment.CurrentDirectory, $"{baselineFileName}");
File.WriteAllText(actualBaselineFilePath, actual);

// Retrieve a diff in order to provide a UX which calls out the diffs.
string diff = DiffFiles(baselineFilePath, actualBaselineFilePath, outputHelper);
message = $"{Environment.NewLine}Baseline '{baselineFilePath}' does not match actual '{actualBaselineFilePath}`. {Environment.NewLine}"
+ $"{diff}{Environment.NewLine}";
}

Assert.Null(message);
}

public static string DiffFiles(string file1Path, string file2Path, ITestOutputHelper outputHelper)
{
(Process Process, string StdOut, string StdErr) diffResult =
ExecuteHelper.ExecuteProcess("git", $"diff --no-index {file1Path} {file2Path}", outputHelper);
Assert.Equal(1, diffResult.Process.ExitCode);

return diffResult.StdOut;
}

private static string GetBaselineFilePath(string baselineFileName) => Path.Combine(Directory.GetCurrentDirectory(), "baselines", baselineFileName);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@
// See the LICENSE file in the project root for more information.

using System;
using System.IO;

namespace Microsoft.DotNet.SourceBuild.SmokeTests;

internal static class Config
{
public static string DotNetDirectory { get; } = Environment.GetEnvironmentVariable("DOTNET_DIR") ?? "./.dotnet";
public static string DotNetDirectory { get; } =
Environment.GetEnvironmentVariable("DOTNET_DIR") ?? Path.Combine(Directory.GetCurrentDirectory(), ".dotnet");
public static string DotNetTarballPath { get; } = Environment.GetEnvironmentVariable(DotNetTarballPathEnv) ?? string.Empty;
public const string DotNetTarballPathEnv = "DOTNET_TARBALL_PATH";
public static bool ExcludeOmniSharpTests { get; } =
bool.TryParse(Environment.GetEnvironmentVariable("EXCLUDE_OMNISHARP_TESTS"), out bool excludeOmniSharpTests) ? excludeOmniSharpTests : false;
public static bool ExcludeOnlineTests { get; } =
bool.TryParse(Environment.GetEnvironmentVariable("EXCLUDE_ONLINE_TESTS"), out bool excludeOnlineTests) ? excludeOnlineTests : false;
public static string MsftSdkTarballPath { get; } = Environment.GetEnvironmentVariable(MsftSdkTarballPathEnv) ?? string.Empty;
public const string MsftSdkTarballPathEnv = "MSFT_SDK_TARBALL_PATH";
public static string TargetRid { get; } = Environment.GetEnvironmentVariable("TARGET_RID") ?? string.Empty;
}
Loading