Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move unified build sdk validation to a test project #19090

Merged
merged 55 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
ee1dce8
Add PackageDiff tool and tasks
jtschuster Feb 8, 2024
0836474
Merge branch 'main' of https://github.com/dotnet/installer
jtschuster Mar 12, 2024
158c2aa
Create test project for Unified Build validation
jtschuster Mar 13, 2024
1991c7b
Add initial SDK test project for unified build
jtschuster Mar 18, 2024
b076829
Merge branch 'main' of https://github.com/dotnet/installer into TestP…
jtschuster Mar 18, 2024
b1dfb7a
Remove old PackageDiff and reference test runner in installer.proj
jtschuster Mar 18, 2024
cdbd8e5
Fix capilization issue with file name
jtschuster Mar 19, 2024
46cc050
Revert changes from existing smoke tests
jtschuster Mar 19, 2024
949a304
Don't run old sdk validation, restore test project in init-build.proj
jtschuster Mar 19, 2024
db4d2d2
Revert changes from existing smoke tests
jtschuster Mar 19, 2024
47053c4
Keep building sdkArchiveDiff tasks for finding the single sdk. We'll …
jtschuster Mar 19, 2024
a783e3b
Remove assemblies that aren't in both sdk's from version validation
jtschuster Mar 19, 2024
7180f58
Clean up testing and move sdk download to test project
jtschuster Mar 20, 2024
736b6f4
Add linux file diff exclusions
jtschuster Mar 20, 2024
4efaf69
Merge branch 'main' into TestProjectValidation
jtschuster Mar 20, 2024
d85e153
Fix env var mismatch
jtschuster Mar 21, 2024
43e52e8
Update baselines with correct msft and ub sdks
jtschuster Mar 21, 2024
5c57672
Update assets, log sdk download info during setup
jtschuster Mar 21, 2024
3a96da9
Merge branch 'main' of https://github.com/dotnet/installer into TestP…
jtschuster Mar 21, 2024
a82bdc9
PR feedback
jtschuster Mar 21, 2024
2a70b8a
Use one env var to work around msbuild escaping
jtschuster Mar 22, 2024
9faaceb
Merge branch 'main' of https://github.com/dotnet/installer into TestP…
jtschuster Mar 22, 2024
b2f9194
Apply suggestions from code review
jtschuster Mar 25, 2024
c592d1b
Merge branch 'TestProjectValidation' of https://github.com/jtschuster…
jtschuster Mar 25, 2024
01e368f
PR feedback
jtschuster Mar 25, 2024
1d0b68b
PR Feedback: Use Arcade SDK to get test parameters without passing fr…
jtschuster Mar 26, 2024
346f634
Merge branch 'main' into TestProjectValidation
jtschuster Mar 26, 2024
6101c31
Fix imports issue with test project
jtschuster Mar 26, 2024
d963e00
Uncommit unnecessary file and remove buildprops template fluff
jtschuster Mar 26, 2024
ee8d200
PR Feedback:
jtschuster Mar 27, 2024
406c954
Merge branch 'main' into TestProjectValidation
jtschuster Mar 27, 2024
3981f8b
Merge branch 'main' of https://github.com/dotnet/installer into TestP…
jtschuster Mar 27, 2024
51572ba
Hardcode path to test project in restore
jtschuster Mar 27, 2024
9cae2dc
Update linux baseline
jtschuster Mar 28, 2024
772ccf9
Merge branch 'main' of https://github.com/dotnet/installer into TestP…
jtschuster Mar 28, 2024
8abbbd3
Don't fail build on failing test
jtschuster Mar 28, 2024
8bc48d7
Add Readme, just warn on baseline mismatch, log test info
jtschuster Mar 28, 2024
a290488
Set correct test loggers to log all messages from test, add msftsdkpa…
jtschuster Mar 29, 2024
474ab95
Set test results output dir, set ContinueOnError=true
jtschuster Mar 29, 2024
860de57
Merge branch 'main' into TestProjectValidation
jtschuster Mar 29, 2024
e15c0f1
Use .xml test result extension
jtschuster Mar 29, 2024
f993c46
Merge branch 'TestProjectValidation' of https://github.com/jtschuster…
jtschuster Mar 29, 2024
71cc6ce
Update src/SourceBuild/content/test/Microsoft.DotNet.UnifiedBuild.Tes…
jtschuster Mar 29, 2024
803aacb
Update src/SourceBuild/content/eng/unifiedBuildValidation.targets
jtschuster Mar 29, 2024
8daa5ab
Hardcode path to project file
jtschuster Mar 29, 2024
7ba27a5
PR Feedback:
jtschuster Apr 1, 2024
266aaab
Make test project self-contained to work around framework resolution …
jtschuster Apr 1, 2024
0ee472f
Use portable BuildRid instead of distro specific rid
jtschuster Apr 1, 2024
56f1dfa
Don't build self-contained
jtschuster Apr 1, 2024
df7cd4f
Merge branch 'main' of https://github.com/dotnet/installer into TestP…
jtschuster Apr 1, 2024
60306f3
Remove ExcludeFromDotnetBuild from restore target, add nugetconfig fo…
jtschuster Apr 1, 2024
6acbd2f
PR feedback:
jtschuster Apr 2, 2024
f5322b6
Don't pre-build unified build validation tests
jtschuster Apr 2, 2024
2755352
Restore, don't build test project
jtschuster Apr 2, 2024
9414ff8
Merge branch 'main' of https://github.com/dotnet/installer into TestP…
jtschuster Apr 2, 2024
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
5 changes: 3 additions & 2 deletions src/SourceBuild/content/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<RootRepo Condition="'$(ShortStack)' == 'true'">runtime</RootRepo>
</PropertyGroup>

<!-- See https://github.com/dotnet/arcade/blob/main/Documentation/UnifiedBuild/Unified-Build-Controls.md#output-controls for
<!-- See https://github.com/dotnet/arcade/blob/main/Documentation/UnifiedBuild/Unified-Build-Controls.md#output-controls for
control set definition. -->
<PropertyGroup Label="CalculateArch">
<!-- Build architecture is what we are building on. -->
Expand Down Expand Up @@ -137,6 +137,8 @@
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<!-- By default, the VMR builds with online sources when not building source-only. -->
<DotNetBuildWithOnlineFeeds Condition="'$(DotNetBuildWithOnlineFeeds)' == '' and '$(DotNetBuildSourceOnly)' != 'true'">true</DotNetBuildWithOnlineFeeds>

<DisableArcadeExcludeFromBuildSupport>true</DisableArcadeExcludeFromBuildSupport>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -205,7 +207,6 @@
<PropertyGroup>
<MicrosoftDotNetUnifiedBuildTasksAssembly>$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'Microsoft.DotNet.UnifiedBuild.Tasks', '$(Configuration)', 'Microsoft.DotNet.UnifiedBuild.Tasks.dll'))</MicrosoftDotNetUnifiedBuildTasksAssembly>
<MicrosoftDotNetSourceBuildTasksLeakDetectionAssembly>$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'Microsoft.DotNet.SourceBuild.Tasks.LeakDetection', '$(Configuration)', 'Microsoft.DotNet.SourceBuild.Tasks.LeakDetection.dll'))</MicrosoftDotNetSourceBuildTasksLeakDetectionAssembly>
<SdkArchiveDiffTasksAssembly>$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'Microsoft.DotNet.SourceBuild.Tasks.SdkArchiveDiff', '$(Configuration)', 'Microsoft.DotNet.SourceBuild.Tasks.SdkArchiveDiff.dll'))</SdkArchiveDiffTasksAssembly>
</PropertyGroup>

<PropertyGroup Condition="'$(EnablePoison)' == 'true'">
Expand Down
1 change: 1 addition & 0 deletions src/SourceBuild/content/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
-->
<PropertyGroup>
<SdkFilename>%(SdkTarballItem.Filename)%(SdkTarballItem.Extension)</SdkFilename>
<SdkTarballPath>%(SdkTarballItem.Identity)</SdkTarballPath>
<SourceBuiltSdkVersion>$(SdkFilename.Replace('$(SdkFilenamePrefix)','').Replace('-$(TargetRid)$(ArchiveExtension)',''))</SourceBuiltSdkVersion>
</PropertyGroup>
</Target>
Expand Down
2 changes: 2 additions & 0 deletions src/SourceBuild/content/eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<VersionPrefix>0.1.0</VersionPrefix>
<PreReleaseVersionLabel>alpha.1</PreReleaseVersionLabel>
<UseVSTestRunner>true</UseVSTestRunner>
</PropertyGroup>
<PropertyGroup>
<!--
Expand Down Expand Up @@ -32,5 +33,6 @@
<MicrosoftExtensionsLoggingVersion>9.0.0-preview.2.24128.5</MicrosoftExtensionsLoggingVersion>
<!-- command-line-api -->
<SystemCommandLineVersion>2.0.0-beta4.24126.1</SystemCommandLineVersion>
<MicrosoftExtensionsFileSystemGlobbingVersion>8.0.0</MicrosoftExtensionsFileSystemGlobbingVersion>
jtschuster marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>
</Project>
3 changes: 1 addition & 2 deletions src/SourceBuild/content/eng/build.sourcebuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@

<IntermediateSdkSymbolsLayout>$(BaseIntermediateOutputPath)SdkSymbols</IntermediateSdkSymbolsLayout>
<IntermediateSdkLayout>$(BaseIntermediateOutputPath)Sdk</IntermediateSdkLayout>
<SdkTarball>%(SdkTarballItem.Identity)</SdkTarball>
</PropertyGroup>

<MakeDir Directories="$(IntermediateSdkLayout)" />
<Exec Command="tar -xzf $(SdkTarball) -C $(IntermediateSdkLayout)" />
<Exec Command="tar -xzf $(SdkTarballPath) -C $(IntermediateSdkLayout)" />

<CreateSdkSymbolsLayout SdkLayoutPath="$(IntermediateSdkLayout)"
AllSymbolsPath="$(IntermediateSymbolsRootDir)"
Expand Down
64 changes: 0 additions & 64 deletions src/SourceBuild/content/eng/sdkArchiveDiff.targets

This file was deleted.

8 changes: 4 additions & 4 deletions src/SourceBuild/content/eng/tools/init-build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
UnpackTarballs;
BuildUnifiedBuildTasks;
BuildMSBuildSdkResolver;
BuildSdkArchiveDiff;
BuildUnifiedBuildValidationTests;
Copy link
Member

@ViktorHofer ViktorHofer Mar 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that this is test project it doesn't belong here anymore. That can be updated in a follow-up though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it automatically get restored by arcade as a test project? Or can we assume it will never be run in an offline build?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it will get restored same as the build.proj and the repo-projects/ .proj files. But as mentioned, it might be better to do that in a follow-up.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like building this before the sdk version is determined, and the runtime config values aren't being set, so it'll need to be done here.

BuildLeakDetection;
ExtractToolPackage;
GenerateRootFs;
Expand Down Expand Up @@ -113,12 +113,12 @@
</Touch>
</Target>

<Target Name="BuildSdkArchiveDiff"
<Target Name="BuildUnifiedBuildValidationTests"
Condition="'$(ShortStack)' != 'true' and '$(PortableBuild)' == 'true' and '$(PgoInstrument)' != 'true'" >
<MSBuild Projects="tasks\Microsoft.DotNet.SourceBuild.Tasks.SdkArchiveDiff\Microsoft.DotNet.SourceBuild.Tasks.SdkArchiveDiff.csproj"
<MSBuild Projects="../../test/Microsoft.DotNet.UnifiedBuild.Tests/Microsoft.DotNet.UnifiedBuild.Tests.csproj"
Targets="Restore"
Properties="MSBuildRestoreSessionId=$([System.Guid]::NewGuid())" />
<MSBuild Projects="tasks\Microsoft.DotNet.SourceBuild.Tasks.SdkArchiveDiff\Microsoft.DotNet.SourceBuild.Tasks.SdkArchiveDiff.csproj"
<MSBuild Projects="../../test/Microsoft.DotNet.UnifiedBuild.Tests/Microsoft.DotNet.UnifiedBuild.Tests.csproj"
Targets="Build" />
</Target>

Expand Down

This file was deleted.

Loading
Loading