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

Build tests on Linux and Windows #47106

Merged
merged 7 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
22 changes: 12 additions & 10 deletions eng/pipelines/templates/stages/vmr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ stages:

- template: ../jobs/vmr-build.yml
parameters:
buildName: ${{ format('{0}_Ubuntu', variables.ubuntuName) }}
buildName: ${{ format('{0}_Ubuntu_BuildTests', variables.ubuntuName) }}
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
pool: ${{ parameters.pool_Linux }}
Expand All @@ -373,17 +373,19 @@ stages:
image: ${{ variables.ubuntuContainerImage }}
targetOS: linux
targetArchitecture: x64

- template: ../jobs/vmr-build.yml
parameters:
buildName: Windows_BuildTests
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
pool: ${{ parameters.pool_Windows }}
targetOS: windows
targetArchitecture: x64
extraProperties: /p:DotNetBuildTests=true
Copy link
Member

Choose a reason for hiding this comment

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

Consider updating the job name to make it clear that this job now builds tests

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed with 936d376


- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- template: ../jobs/vmr-build.yml
parameters:
buildName: Windows_BuildTests
isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
vmrBranch: ${{ variables.VmrBranch }}
pool: ${{ parameters.pool_Windows }}
targetOS: windows
targetArchitecture: x64
extraProperties: /p:DotNetBuildTests=true

#### VERTICAL BUILD (Official) ####
- ${{ if not(parameters.isSourceOnlyBuild) }}:
- stage: VMR_Vertical_Build
Expand Down
3 changes: 3 additions & 0 deletions src/SourceBuild/content/repo-projects/sdk.proj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<PropertyGroup>
<LogVerbosityOptOut>true</LogVerbosityOptOut>

<!-- Tests are only building on Windows - https://github.com/dotnet/source-build/issues/4882 -->
<DotNetBuildTestsOptOut Condition="'$(OS)' != 'Windows_NT'">true</DotNetBuildTestsOptOut>

<BuildArgs Condition="'$(TargetOS)' == 'windows'">$(BuildArgs) -nativeToolsOnMachine</BuildArgs>
<BuildArgs>$(BuildArgs) /p:PackageProjectUrl=https://github.com/dotnet/sdk</BuildArgs>
<BuildArgs>$(BuildArgs) /p:PortableRid=$(PortableRid)</BuildArgs>
Expand Down