Skip to content
Draft
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
10 changes: 10 additions & 0 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
<AllSubsetsExpansion>$(AllSubsetsExpansion)+clr.paltests+clr.paltestlist+clr.hosts+clr.jit+clr.alljits+clr.alljitscommunity+clr.spmi+clr.corelib+clr.nativecorelib+clr.tools+clr.toolstests+clr.packages</AllSubsetsExpansion>
<AllSubsetsExpansion Condition="$([MSBuild]::IsOsPlatform(Windows))">$(AllSubsetsExpansion)+linuxdac+alpinedac</AllSubsetsExpansion>
<AllSubsetsExpansion>$(AllSubsetsExpansion)+mono.runtime+provision.emsdk+mono.aotcross+mono.corelib+mono.manifests+mono.packages+mono.tools+mono.wasmruntime+mono.wasiruntime+mono.wasmworkload+mono.mscordbi</AllSubsetsExpansion>
<AllSubsetsExpansion>$(AllSubsetsExpansion)+apple.buildtests</AllSubsetsExpansion>
<AllSubsetsExpansion>$(AllSubsetsExpansion)+tools.illink+tools.cdac+tools.illinktests+tools.cdactests+tools.cdacdumptests</AllSubsetsExpansion>
<AllSubsetsExpansion>$(AllSubsetsExpansion)+host.native+host.pkg+host.tools+host.pretest+host.tests</AllSubsetsExpansion>
<AllSubsetsExpansion>$(AllSubsetsExpansion)+libs.native+libs.sfx+libs.oob+libs.pretest+libs.tests</AllSubsetsExpansion>
Expand Down Expand Up @@ -253,6 +254,9 @@
<SubsetName Include="Mono.WasmWorkload" Description="*Helper* subset for building some pre-requisites for wasm workload testing, useful on CI." />
<SubsetName Include="Mono.MsCorDbi" Description="The implementation of ICorDebug interface." />

<!-- Apple build infrastructure -->
<SubsetName Include="Apple.BuildTests" OnDemand="true" Description="Unit tests for the Apple mobile MSBuild targets. Note that building this doesn't execute tests: you must also pass the '-test' argument." />

<!-- Tools -->
<SubsetName Include="Tools" Description="Additional runtime tools projects. Equivalent to: $(DefaultToolsSubsets)" />
<SubsetName Include="Tools.ILLink" Description="The projects that produce illink and analyzer tools for trimming." />
Expand Down Expand Up @@ -656,6 +660,12 @@
<ProjectToBuild Include="$(WasiProjectRoot)wasi.proj" Category="mono" />
</ItemGroup>

<!-- Apple build infrastructure -->
<!-- The tests only drive MSBuild in a child process, so they need nothing else from the build. -->
<ItemGroup Condition="$(_subset.Contains('+apple.buildtests+'))">
<ProjectToBuild Include="$(MonoProjectRoot)msbuild\apple\tests\Apple.Build.Tests\Apple.Build.Tests.csproj" Test="true" />
</ItemGroup>

<!-- Host sets -->
<ItemGroup Condition="$(_subset.Contains('+host.native+'))">
<CorehostProjectToBuild Include="$(SharedNativeRoot)corehost\corehost.proj" />
Expand Down
6 changes: 6 additions & 0 deletions eng/pipelines/common/evaluate-default-paths.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ jobs:
- src/native/managed/cdac/*
- src/coreclr/debug/runtimeinfo/*

# The Apple mobile MSBuild targets and the tests that cover them. The tests only drive MSBuild, so
# they run on ordinary build hosts and need none of the mobile or WebAssembly tooling.
- subset: applebuildtests
include:
- src/mono/msbuild/apple/*

- subset: installer
include:
exclude:
Expand Down
23 changes: 23 additions & 0 deletions eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,29 @@ extends:
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
eq(variables['isRollingBuild'], true))

#
# Apple mobile MSBuild targets tests
# Only when the Apple MSBuild targets change
#
# These only drive MSBuild and file orchestration in a child process, so they run on an ordinary
# macOS build host and need no Apple mobile workload or device.
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
buildConfig: Release
platforms:
- osx_x64
jobParameters:
timeoutInMinutes: 30
nameSuffix: AppleBuildTests
buildArgs: -s apple.buildtests -c $(_BuildConfig) -test
enablePublishTestResults: true
testResultsFormat: 'xunit'
condition: >-
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_applebuildtests.containsChange'], true),
eq(variables['isRollingBuild'], true))

#
# WebAssembly legs
#
Expand Down
39 changes: 33 additions & 6 deletions src/mono/msbuild/apple/data/ProxyProjectForAOTOnHelix.proj
Original file line number Diff line number Diff line change
Expand Up @@ -160,25 +160,47 @@

<PropertyGroup>
<_R2ROutputPath>$(IntermediateOutputPath)R2R</_R2ROutputPath>
<!-- The app payload is staged outside the publish directory because publish is the pristine
crossgen2 input for every run in this work item, and AppleAppBuilder bundles every top level
entry of its AppDir, so staging inside publish would end up inside the app. -->
<_R2RAppPayloadDir>$([MSBuild]::NormalizeDirectory($(BaseIntermediateOutputPath), 'r2r-app-payload'))</_R2RAppPayloadDir>
</PropertyGroup>

<ItemGroup>
<_R2RCompiledAssemblies Include="$(_R2ROutputPath)\*.dll" />
<_R2RDylibFiles Include="$(_R2ROutputPath)\*.r2r.dylib" />
</ItemGroup>

<Warning Condition="'@(_R2RCompiledAssemblies)' == ''" Text="No R2R compiled assemblies found at $(_R2ROutputPath)." />
<Warning Condition="'@(_R2RDylibFiles)' == ''" Text="No R2R dylib files found at $(_R2ROutputPath)." />

<Copy SourceFiles="@(_R2RCompiledAssemblies)"
DestinationFolder="$(OriginalPublishDir)"
OverwriteReadOnlyFiles="true" />
<!-- Recreated on every run so that a Helix retry in the same work item cannot inherit stale dylibs
or app builder output from a previous attempt. -->
<RemoveDir Directories="$(_R2RAppPayloadDir)" />
<MakeDir Directories="$(_R2RAppPayloadDir)" />

<ItemGroup>
<_R2RAppPayloadSourceFiles Include="$(OriginalPublishDir)**\*" />
</ItemGroup>

<Copy SourceFiles="@(_R2RAppPayloadSourceFiles)"
DestinationFiles="@(_R2RAppPayloadSourceFiles->'$(_R2RAppPayloadDir)%(RecursiveDir)%(Filename)%(Extension)')" />

<Copy SourceFiles="@(_R2RDylibFiles)"
DestinationFolder="$(OriginalPublishDir)"
<Copy SourceFiles="@(_R2RCompiledAssemblies);@(_R2RDylibFiles)"
DestinationFolder="$(_R2RAppPayloadDir)"
OverwriteReadOnlyFiles="true" />

<PropertyGroup>
<AppleBuildDir>$(_R2RAppPayloadDir)</AppleBuildDir>
</PropertyGroup>

<ItemGroup>
<AppleNativeFilesToBundle Include="@(_R2RDylibFiles->'$(OriginalPublishDir)%(Filename)%(Extension)')" />
<AppleAssembliesToBundle Remove="@(AppleAssembliesToBundle)" />
<AppleAssembliesToBundle Include="$(_R2RAppPayloadDir)*.dll" Exclude="$(_R2RAppPayloadDir)*.resources.dll" />

<AppleNativeFilesToBundle Remove="@(AppleNativeFilesToBundle)" />
<AppleNativeFilesToBundle Include="@(_ExtraFiles)" />
<AppleNativeFilesToBundle Include="$(_R2RAppPayloadDir)**\*.*" Exclude="$(_R2RAppPayloadDir)*.dll" />
</ItemGroup>
</Target>

Expand All @@ -188,6 +210,11 @@
<RuntimeIdentifier>$(TargetOS)-$(TargetArchitecture)</RuntimeIdentifier>
</PropertyGroup>

<!-- The compilation is skipped whenever the tracked output, the composite image, is newer than the
inputs, and the per assembly outputs written next to it are not tracked at all, so an attempt
that was killed mid write can look up to date to the next one. Always compile from scratch. -->
<RemoveDir Directories="$(IntermediateOutputPath)R2R" />

<ItemGroup>
<ResolvedFileToPublish Remove="@(ResolvedFileToPublish)" />
<_R2RPublishAssembly Include="$(OriginalPublishDir)*.dll" Exclude="$(OriginalPublishDir)*.resources.dll" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!-- Use the tool TFM so the tests run on the SDK's own runtime, the way Wasm.Build.Tests and
ILAssembler.Tests do. Nothing here needs the runtime that is being built. -->
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<!-- The tests drive the real proxy project, so it has to travel with the test payload. It is laid
out under 'data' to mirror the directory it is shipped from. -->
<None Include="..\..\data\ProxyProjectForAOTOnHelix.proj"
Link="data\ProxyProjectForAOTOnHelix.proj"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

</Project>
Loading