Skip to content
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
4 changes: 4 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@
<MicrosoftNetCoreAppRuntimePackNativeDir>$([MSBuild]::NormalizeDirectory('$(MicrosoftNetCoreAppRuntimePackRidDir)', 'native'))</MicrosoftNetCoreAppRuntimePackNativeDir>
</PropertyGroup>

<PropertyGroup>
<DotNetHostBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', '$(OutputRid).$(Configuration)', 'corehost'))</DotNetHostBinDir>
</PropertyGroup>

<!--Feature switches -->
<PropertyGroup>
<EnableNgenOptimization Condition="'$(EnableNgenOptimization)' == '' and ('$(Configuration)' == 'Release' or '$(Configuration)' == 'Checked')">true</EnableNgenOptimization>
Expand Down
49 changes: 25 additions & 24 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,14 @@
<SubsetName Include="Mono.WasmRuntime" Description="The WebAssembly runtime." />
<SubsetName Include="Mono.MsCorDbi" Description="The implementation of ICorDebug interface." />
<SubsetName Include="Mono.Workloads" OnDemand="true" Description="Builds the installers and the insertion metadata for Blazor workloads." />


<!-- Host -->
<SubsetName Include="Host" Description="The .NET hosts, packages, hosting libraries, and tests." />
<SubsetName Include="Host.Native" Description="The .NET hosts." />
<SubsetName Include="Host.Pkg" Description="The .NET host packages." />
<SubsetName Include="Host.Tools" Description="The .NET hosting libraries." />
<SubsetName Include="Host.Tests" Description="The .NET hosting tests." />

<!-- Libs -->
<SubsetName Include="Libs" Description="The libraries native part, refs and source assemblies, test infra and packages, but NOT the tests (use Libs.Tests to request those explicitly)" />
<SubsetName Include="Libs.Native" Description="The native libraries used in the shared framework." />
Expand All @@ -130,13 +137,6 @@
<SubsetName Include="Libs.Packages" Description="The projects that produce NuGet packages from libraries." />
<SubsetName Include="Libs.Tests" OnDemand="true" Description="The test projects. Note that building this doesn't execute tests: you must also pass the '-test' argument." />

<!-- Host -->
<SubsetName Include="Host" Description="The .NET hosts, packages, hosting libraries, and tests." />
<SubsetName Include="Host.Native" Description="The .NET hosts." />
<SubsetName Include="Host.Pkg" Description="The .NET host packages." />
<SubsetName Include="Host.Tools" Description="The .NET hosting libraries." />
<SubsetName Include="Host.Tests" Description="The .NET hosting tests." />

<!-- Packs -->
<SubsetName Include="Packs" Description="Builds the shared framework packs, archives, bundles, installers, and the framework pack tests." />
<SubsetName Include="Packs.Product" Description="Builds the shared framework packs, archives, bundles, and installers." />
Expand Down Expand Up @@ -263,6 +263,22 @@
<ProjectToBuild Include="$(WorkloadsProjectRoot)\workloads.csproj" Category="mono" />
</ItemGroup>

<!-- Host sets -->
<ItemGroup Condition="$(_subset.Contains('+host.native+'))">
<CorehostProjectToBuild Include="$(SharedNativeRoot)corehost\corehost.proj" SignPhase="Binaries" BuildInParallel="false" />
<ProjectToBuild Include="@(CorehostProjectToBuild)" Pack="true" Category="host" />
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+host.tools+'))">
<ManagedProjectToBuild Include="$(InstallerProjectRoot)managed\**\*.csproj" SignPhase="Binaries" />
<ProjectToBuild Include="@(ManagedProjectToBuild)" BuildInParallel="true" Pack="true" Category="host" />
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+host.pkg+')) and '$(PgoInstrument)' != 'true'">
<PkgprojProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\host-packages.proj" SignPhase="MsiFiles" BuildInParallel="false" />
<ProjectToBuild Include="@(PkgprojProjectToBuild)" Pack="true" Category="host" />
</ItemGroup>

<!-- Libraries sets -->
<ItemGroup Condition="$(_subset.Contains('+libs.native+'))">
<ProjectToBuild Include="$(LibrariesProjectRoot)Native\build-native.proj" Category="libs" />
Expand All @@ -288,22 +304,7 @@
<ProjectToBuild Include="$(LibrariesProjectRoot)tests.proj" Category="libs" Test="true" />
</ItemGroup>

<!-- Host sets -->
<ItemGroup Condition="$(_subset.Contains('+host.native+'))">
<CorehostProjectToBuild Include="$(SharedNativeRoot)corehost\corehost.proj" SignPhase="Binaries" BuildInParallel="false" />
<ProjectToBuild Include="@(CorehostProjectToBuild)" Pack="true" Category="host" />
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+host.tools+'))">
<ManagedProjectToBuild Include="$(InstallerProjectRoot)managed\**\*.csproj" SignPhase="Binaries" />
<ProjectToBuild Include="@(ManagedProjectToBuild)" BuildInParallel="true" Pack="true" Category="host" />
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+host.pkg+')) and '$(PgoInstrument)' != 'true'">
<PkgprojProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\host-packages.proj" SignPhase="MsiFiles" BuildInParallel="false" />
<ProjectToBuild Include="@(PkgprojProjectToBuild)" Pack="true" Category="host" />
</ItemGroup>

<!-- Host.tests subset (consumes live built libraries assets so needs to come after libraries) -->
<ItemGroup Condition="$(_subset.Contains('+host.tests+'))">
<TestProjectToBuild Include="$(InstallerProjectRoot)tests\Microsoft.NET.HostModel.Tests\AppHost.Bundle.Tests\AppHost.Bundle.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)tests\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.AppHost.Tests\Microsoft.NET.HostModel.AppHost.Tests.csproj" />
Expand Down
26 changes: 26 additions & 0 deletions eng/pipelines/common/platform-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,32 @@ jobs:
${{ insert }}: ${{ parameters.jobParameters }}
buildingOnSourceBuildImage: true

# Linux s390x

- ${{ if containsValue(parameters.platforms, 'Linux_s390x') }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: Linux
archType: s390x
targetRid: linux-s390x
platform: Linux_s390x
container:
image: ubuntu-18.04-cross-s390x-20201102145728-d6e0352
registry: mcr
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
crossBuild: true
crossrootfsDir: '/crossrootfs/s390x'
${{ insert }}: ${{ parameters.jobParameters }}

# WebAssembly

- ${{ if containsValue(parameters.platforms, 'Browser_wasm') }}:
Expand Down
5 changes: 3 additions & 2 deletions eng/pipelines/common/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ variables:
- name: isFullMatrix
value: ${{ and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}

# We only run evaluate paths on runtime and runtime-staging pipelines on PRs
# We only run evaluate paths on runtime, runtime-staging and runtime-community pipelines on PRs
# keep in sync with /eng/pipelines/common/xplat-setup.yml
- name: dependOnEvaluatePaths
value: ${{ and(eq(variables['Build.Reason'], 'PullRequest'), in(variables['Build.DefinitionName'], 'runtime', 'runtime-staging')) }}
value: ${{ and(eq(variables['Build.Reason'], 'PullRequest'), in(variables['Build.DefinitionName'], 'runtime', 'runtime-staging', 'runtime-community')) }}
- name: debugOnPrReleaseOnRolling
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
value: Release
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/xplat-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
shouldContinueOnError: ${{ and(endsWith(variables['Build.DefinitionName'], 'staging'), eq(variables['Build.Reason'], 'PullRequest')) }}

# keep in sync with /eng/pipelines/common/variables.yml
dependOnEvaluatePaths: ${{ and(eq(variables['Build.Reason'], 'PullRequest'), in(variables['Build.DefinitionName'], 'runtime', 'runtime-staging')) }}
dependOnEvaluatePaths: ${{ and(eq(variables['Build.Reason'], 'PullRequest'), in(variables['Build.DefinitionName'], 'runtime', 'runtime-staging', 'runtime-community')) }}

variables:
# Disable component governance in our CI builds. These builds are not shipping nor
Expand Down
4 changes: 4 additions & 0 deletions eng/pipelines/libraries/helix-queues-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ jobs:
# Limiting interp runs as we don't need as much coverage.
- Debian.9.Amd64.Open

# Linux s390x
- ${{ if eq(parameters.platform, 'Linux_s390x') }}:
- Ubuntu.2004.S390X.Experimental.Open

# OSX arm64
- ${{ if eq(parameters.platform, 'OSX_arm64') }}:
- OSX.1100.ARM64.Open
Expand Down
60 changes: 60 additions & 0 deletions eng/pipelines/runtime-community.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
trigger: none

schedules:
- cron: "0 7,19 * * *" # run at 7:00 and 19:00 (UTC) which is 23:00 and 11:00 (PST).
displayName: Runtime-community default schedule
branches:
include:
- main
- release/*.*
always: false # run only if there were changes since the last successful scheduled run.

variables:
- template: /eng/pipelines/common/variables.yml

jobs:
#
# Evaluate paths
#
- ${{ if eq(variables.dependOnEvaluatePaths, true) }}:
- template: /eng/pipelines/common/evaluate-default-paths.yml

#
# s390x
# Build the whole product using Mono and run libraries tests
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
buildConfig: Release
runtimeFlavor: mono
platforms:
- Linux_s390x
variables:
# map dependencies variables to local variables
- name: librariesContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
- name: monoContainsChange
value: $[ dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'] ]
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true
timeoutInMinutes: 180
condition: >-
or(
eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
eq(dependencies.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
eq(variables['isFullMatrix'], true))
# extra steps, run tests
extraStepsTemplate: /eng/pipelines/libraries/helix.yml
extraStepsParameters:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
condition: >-
or(
eq(variables['librariesContainsChange'], true),
eq(variables['monoContainsChange'], true),
eq(variables['isFullMatrix'], true))
1 change: 0 additions & 1 deletion src/installer/pkg/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

<PropertyGroup>
<Platform>$(TargetArchitecture)</Platform>
<DotNetHostBinDir>$(ArtifactsBinDir)$(OutputRid).$(Configuration)\corehost</DotNetHostBinDir>
</PropertyGroup>

<PropertyGroup>
Expand Down
19 changes: 17 additions & 2 deletions src/libraries/externals.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
<BinPlaceNative>true</BinPlaceNative>
<BinPlaceRuntime>false</BinPlaceRuntime>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<UseLiveBuiltDotNetHost Condition="'$(TargetArchitecture)' == 's390x'">true</UseLiveBuiltDotNetHost>
</PropertyGroup>

<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<PackageReference Include="Microsoft.DiaSymReader.Native"
Version="$(MicrosoftDiaSymReaderNativeVersion)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetsMobile)' != 'true'">
<ItemGroup Condition="'$(TargetsMobile)' != 'true' and '$(UseLiveBuiltDotNetHost)' != 'true'">
<PackageReference Include="Microsoft.NETCore.DotNetHost"
Version="$(MicrosoftNETCoreDotNetHostVersion)" />
<PackageReference Include="Microsoft.NETCore.DotNetHostPolicy"
Expand All @@ -38,17 +39,31 @@
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(Filename)' == 'apphost'" />
</ItemGroup>

<ItemGroup>
<ItemGroup Condition="'$(UseLiveBuiltDotNetHost)' != 'true'">
<HostFxFile Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.Filename)' == 'hostfxr' or
'%(ReferenceCopyLocalPaths.Filename)' == 'libhostfxr'" />
<DotnetExe Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.Filename)' == 'dotnet'" />
</ItemGroup>

<ItemGroup Condition="'$(UseLiveBuiltDotNetHost)' == 'true'">
<CoreHostFiles Include="$(DotNetHostBinDir)*" />
<HostFxFile Include="@(CoreHostFiles)" Condition="'%(CoreHostFiles.Filename)' == 'hostfxr' or
'%(CoreHostFiles.Filename)' == 'libhostfxr'" />
<HostPolicyFile Include="@(CoreHostFiles)" Condition="'%(CoreHostFiles.Filename)' == 'hostpolicy' or
'%(CoreHostFiles.Filename)' == 'libhostpolicy'" />
<DotnetExe Include="@(CoreHostFiles)" Condition="'%(CoreHostFiles.Filename)' == 'dotnet'" />
</ItemGroup>

<Copy SourceFiles="@(HostFxFile)"
DestinationFolder="$(NetCoreAppCurrentTestHostPath)host\fxr\$(ProductVersion)"
SkipUnchangedFiles="true"
UseHardlinksIfPossible="$(UseHardlink)" />

<Copy SourceFiles="@(HostPolicyFile)"
DestinationFolder="$(NetCoreAppCurrentTestHostPath)shared\Microsoft.NETCore.App\$(ProductVersion)"
SkipUnchangedFiles="true"
UseHardlinksIfPossible="$(UseHardlink)" />

<Copy SourceFiles="@(DotnetExe)"
DestinationFolder="$(NetCoreAppCurrentTestHostPath)"
SkipUnchangedFiles="true"
Expand Down
4 changes: 4 additions & 0 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Security.Cryptography.OpenSsl/tests/System.Security.Cryptography.OpenSsl.Tests.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetArchitecture)' == 's390x' and '$(RunDisableds390xTests)' != 'true'">
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Drawing.Common\tests\System.Drawing.Common.Tests.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TestSingleFile)' == 'true'">
<!-- Run only a small randomly chosen set of passing test suites -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)*\tests\**\*.Tests.csproj" />
Expand Down
1 change: 1 addition & 0 deletions src/mono/mono.proj
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@
<_Objcopy>objcopy</_Objcopy>
<_Objcopy Condition="'$(Platform)' == 'arm'">arm-linux-$(_LinuxAbi)eabi$(_LinuxFloatAbi)-$(_Objcopy)</_Objcopy>
<_Objcopy Condition="'$(Platform)' == 'arm64'">aarch64-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
<_Objcopy Condition="'$(Platform)' == 's390x'">s390x-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
<_Objcopy Condition="'$(Platform)' == 'x64'">x86_64-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
<_Objcopy Condition="'$(Platform)' == 'x86'">i686-linux-$(_LinuxAbi)-$(_Objcopy)</_Objcopy>
<_Objcopy Condition="'$(TargetsAndroid)' == 'true'">$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/$(MonoToolchainPrebuiltOS)/bin/$(_Objcopy)</_Objcopy>
Expand Down