-
Notifications
You must be signed in to change notification settings - Fork 417
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
[ci] Fix codeql build #5739
[ci] Fix codeql build #5739
Conversation
Avoid doing test specific tasks when not building to run tests.
Validation build - https://dev.azure.com/dnceng/internal/_build/results?buildId=2539843 |
@@ -35,7 +35,7 @@ | |||
|
|||
<!-- Used for running one helix job per test class --> | |||
<Target Name="_ExtractTestClassNames" | |||
Condition="'$(ExtractTestClassNamesForHelix)' == 'true'" | |||
Condition="'$(ExtractTestClassNamesForHelix)' == 'true' and '$(ArchiveTests)' == 'true'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we building anything in the tests
directory in this build configuration? If we don't want to do "test things", do we need to build the test assemblies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question. AFAICS, even if we have -p:Tests=false
like used for the codeql build, it still builds the test assemblies because they are referenced from the sln.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't think it uses the sln, but instead uses:
Lines 2 to 8 in a8b0bed
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true' and '$(DotNetBuild)' != 'true'"> | |
<ProjectToBuild Include="$(RepoRoot)src\**\*.csproj" Exclude="$(RepoRoot)src\Aspire.ProjectTemplates\templates\**\*.csproj" /> | |
<ProjectToBuild Include="$(RepoRoot)eng\dcppack\**\*.csproj" /> | |
<ProjectToBuild Include="$(RepoRoot)eng\dashboardpack\**\*.csproj" /> | |
<ProjectToBuild Include="$(RepoRoot)playground\**\*.csproj" /> | |
<ProjectToBuild Include="$(RepoRoot)tests\**\*.csproj" /> | |
</ItemGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh then we should definitely make building the tests conditional. I'll open an issue to track that work.
@joperezr this needs a review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good enough to unblock the codeql build. But I'd like to understand why we are building tests at all in that build.
Opened this to track work to make building the tests conditional - #5769 |
Avoid doing test specific tasks when not building to run tests.
Fixes #5738 .
Microsoft Reviewers: Open in CodeFlow