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
3 changes: 3 additions & 0 deletions dotnet/targets/Xamarin.Shared.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,9 @@
</_AssemblyPublishDirectories>
<_AssemblyPublishInputs Include="@(_AssemblyPublishDirectories -> '%(Identity)/**')" />
</ItemGroup>

<!-- We need to these files, so that they don't confuse incremental builds. They're only meant to convey information from an outer universal build to inner rid-specific builds, not between different outer builds. -->
<Delete Files="@(_ProcessedPaths)" Condition="Exists('%(Identity)')" />
</Target>

<Target Name="_CreateMergedAppBundle"
Expand Down
67 changes: 60 additions & 7 deletions msbuild/Xamarin.Shared/Xamarin.Shared.targets
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ Copyright (C) 2018 Microsoft. All rights reserved.
_BeforeCoreCompileInterfaceDefinitions;
_ReadCoreCompileInterfaceDefinitions;
_CoreCompileInterfaceDefinitions;
_PostCompileInterfaceDefinitions;
</_CompileInterfaceDefinitionsDependsOn>
</PropertyGroup>

Expand Down Expand Up @@ -814,11 +815,17 @@ Copyright (C) 2018 Microsoft. All rights reserved.

<!-- Cached the generated outputs items for incremental build support -->
<WriteItemsToFile Items="@(_IBTool_BundleResources)" ItemName="_BundleResourceWithLogicalName" File="$(_IBToolCache)" Overwrite="true" IncludeMetadata="true" />
<!-- Write out the list of assets we've processed, so that an inner build in a multi-rid build can skip processing them -->
<WriteItemsToFile Items="@(InterfaceDefinition)" Condition="'$(_SaveProcessedItems)' == 'true'" ItemName="InterfaceDefinition" File="$(_ProcessedInterfaceDefinitionsPath)" Overwrite="true" IncludeMetadata="false" />

<ItemGroup>
<FileWrites Include="$(_IBToolCache)" />
</ItemGroup>
</Target>

<Target Name="_PostCompileInterfaceDefinitions">
<!-- Write out the list of assets we've processed, so that an inner build in a multi-rid build can skip processing them -->
<!-- We need to do this even for incremental builds, when we don't need to run the IBTool task, so this is not in the _CoreCompileInterfaceDefinitions target -->
<WriteItemsToFile Items="@(InterfaceDefinition)" Condition="'$(_SaveProcessedItems)' == 'true'" ItemName="InterfaceDefinition" File="$(_ProcessedInterfaceDefinitionsPath)" Overwrite="true" IncludeMetadata="false" />
<ItemGroup>
<FileWrites Include="$(_ProcessedInterfaceDefinitionsPath)" />
</ItemGroup>
</Target>
Expand All @@ -836,6 +843,7 @@ Copyright (C) 2018 Microsoft. All rights reserved.
_BeforeCoreCompileImageAssets;
_ReadCompileImageAssets;
_CoreCompileImageAssets;
_PostCompileImageAssets;
</_CompileImageAssetsDependsOn>
</PropertyGroup>

Expand Down Expand Up @@ -938,10 +946,16 @@ Copyright (C) 2018 Microsoft. All rights reserved.
<!-- Cache the generated outputs items for incremental build support -->
<WriteItemsToFile Items="@(_ACTool_PartialAppManifest)" ItemName="_PostCompilePartialAppManifest" File="$(_ACTool_PartialAppManifestCache)" Overwrite="true" IncludeMetadata="true" />
<WriteItemsToFile Items="@(_ACTool_BundleResources)" ItemName="_BundleResourceWithLogicalName" File="$(_ACTool_BundleResourceCache)" Overwrite="true" IncludeMetadata="true" />
<ItemGroup>
<FileWrites Include="$(_ACTool_PartialAppManifestCache);$(_ACTool_BundleResourceCache)" />
</ItemGroup>
</Target>

<Target Name="_PostCompileImageAssets">
<!-- Write out the list of assets we've processed, so that an inner build in a multi-rid build can skip processing them -->
<!-- We need to do this even for incremental builds, when we don't need to run the ACTool task, so this is not in the _CoreCompileImageAssets target -->
<WriteItemsToFile Items="@(ImageAsset)" Condition="'$(_SaveProcessedItems)' == 'true'" ItemName="ImageAsset" File="$(_ProcessedImageAssetsPath)" Overwrite="true" IncludeMetadata="false" />
<ItemGroup>
<FileWrites Include="$(_ACTool_PartialAppManifestCache);$(_ACTool_BundleResourceCache)" />
<FileWrites Include="$(_ProcessedImageAssetsPath)" />
</ItemGroup>
</Target>
Expand All @@ -958,6 +972,7 @@ Copyright (C) 2018 Microsoft. All rights reserved.
_BeforeCoreCompileSceneKitAssets;
_ReadCoreCompileSceneKitAssets;
_CoreCompileSceneKitAssets;
_PostCompileSceneKitAssets;
</_CompileSceneKitAssetsDependsOn>
</PropertyGroup>

Expand Down Expand Up @@ -1024,10 +1039,16 @@ Copyright (C) 2018 Microsoft. All rights reserved.
</CompileSceneKitAssets>

<WriteItemsToFile Items="@(_SceneKitAssets_BundleResources)" ItemName="_BundleResourceWithLogicalName" File="$(_SceneKitCache)" Overwrite="true" IncludeMetadata="true" />
<ItemGroup>
<FileWrites Include="$(_SceneKitCache)" />
</ItemGroup>
</Target>

<Target Name="_PostCompileSceneKitAssets">
<!-- Write out the list of assets we've processed, so that an inner build in a multi-rid build can skip processing them -->
<!-- We need to do this even for incremental builds, when we don't need to run the CompileSceneKitAssets task, so this is not in the SceneKitAsset target -->
<WriteItemsToFile Items="@(SceneKitAsset)" Condition="'$(_SaveProcessedItems)' == 'true'" ItemName="SceneKitAsset" File="$(_ProcessedSceneKitAssetsPath)" Overwrite="true" IncludeMetadata="false" />
<ItemGroup>
<FileWrites Include="$(_SceneKitCache)" />
<FileWrites Include="$(_ProcessedSceneKitAssetsPath)" />
</ItemGroup>
</Target>
Expand All @@ -1041,6 +1062,7 @@ Copyright (C) 2018 Microsoft. All rights reserved.
_BeforeCoreCompileColladaAssets;
_ReadCoreCompileColladaAssets;
_CoreCompileColladaAssets;
_PostCompileColladaAssets;
</CompileColladaAssetsDependsOn>
</PropertyGroup>

Expand Down Expand Up @@ -1107,10 +1129,16 @@ Copyright (C) 2018 Microsoft. All rights reserved.
</ScnTool>

<WriteItemsToFile Items="@(_Collada_BundleResources)" ItemName="_BundleResourceWithLogicalName" File="$(_ColladaCache)" Overwrite="true" IncludeMetadata="true" />
<ItemGroup>
<FileWrites Include="$(_ColladaCache)" />
</ItemGroup>
</Target>

<Target Name="_PostCompileColladaAssets">
<!-- Write out the list of assets we've processed, so that an inner build in a multi-rid build can skip processing them -->
<!-- We need to do this even for incremental builds, when we don't need to run the ScnTool task, so this is not in the _CoreCompileColladaAssets target -->
<WriteItemsToFile Items="@(Collada)" Condition="'$(_SaveProcessedItems)' == 'true'" ItemName="Collada" File="$(_ProcessedColladaAssetsPath)" Overwrite="true" IncludeMetadata="false" />
<ItemGroup>
<FileWrites Include="$(_ColladaCache)" />
<FileWrites Include="$(_ProcessedColladaAssetsPath)" />
</ItemGroup>
</Target>
Expand Down Expand Up @@ -1181,6 +1209,18 @@ Copyright (C) 2018 Microsoft. All rights reserved.
<_CompiledEntitlementsPath Condition="'$(_CompiledEntitlementsPath)' == ''">$(DeviceSpecificIntermediateOutputPath)Entitlements.xcent</_CompiledEntitlementsPath>
<_SaveProcessedItems Condition="'$(RuntimeIdentifiers)' != '' And '$(UsingAppleNETSdk)' == 'true'">true</_SaveProcessedItems>
</PropertyGroup>

<!-- Create an item group of all the paths that convey information from an outer (universal) build to its inner (rid-specific) builds (but not between (incremental) builds) -->
<ItemGroup>
<_ProcessedPaths Include="$(_ProcessedBundleResourcesPath)" />
<_ProcessedPaths Include="$(_ProcessedContentPath)" />
<_ProcessedPaths Include="$(_ProcessedImageAssetsPath)" />
<_ProcessedPaths Include="$(_ProcessedInterfaceDefinitionsPath)" />
<_ProcessedPaths Include="$(_ProcessedSceneKitAssetsPath)" />
<_ProcessedPaths Include="$(_ProcessedColladaAssetsPath)" />
<_ProcessedPaths Include="$(_ProcessedTextureAtlasesPath)" />
<_ProcessedPaths Include="$(_ProcessedCoreMLModelsPath)" />
</ItemGroup>
</Target>

<!-- TODO: check for duplicate items -->
Expand Down Expand Up @@ -1233,6 +1273,7 @@ Copyright (C) 2018 Microsoft. All rights reserved.
_BeforeCompileTextureAtlases;
_ReadCoreCompileTextureAtlases;
_CoreCompileTextureAtlases;
_PostCompileTextureAtlases;
</_CompileTextureAtlasesDependsOn>
</PropertyGroup>

Expand Down Expand Up @@ -1296,10 +1337,16 @@ Copyright (C) 2018 Microsoft. All rights reserved.

<!-- Cached the generated outputs items for incremental build support -->
<WriteItemsToFile Items="@(_TextureAtlas_BundleResources)" ItemName="_BundleResourceWithLogicalName" File="$(_TextureAtlasCache)" Overwrite="true" IncludeMetadata="true" />
<ItemGroup>
<FileWrites Include="$(_TextureAtlasCache)" />
</ItemGroup>
</Target>

<Target Name="_PostCompileTextureAtlases">
<!-- Write out the list of assets we've processed, so that an inner build in a multi-rid build can skip processing them -->
<!-- We need to do this even for incremental builds, when we don't need to run the TextureAtlas task, so this is not in the _CoreCompileTextureAtlases target -->
<WriteItemsToFile Items="@(AtlasTexture)" Condition="'$(_SaveProcessedItems)' == 'true'" ItemName="AtlasTexture" File="$(_ProcessedTextureAtlasesPath)" Overwrite="true" IncludeMetadata="false" />
<ItemGroup>
<FileWrites Include="$(_TextureAtlasCache)" />
<FileWrites Include="$(_ProcessedTextureAtlasesPath)" />
</ItemGroup>
</Target>
Expand Down Expand Up @@ -1391,10 +1438,16 @@ Copyright (C) 2018 Microsoft. All rights reserved.
<!-- Cache the generated outputs items for incremental build support -->
<WriteItemsToFile Items="@(_CoreMLModel_PartialAppManifest)" ItemName="_PostCompilePartialAppManifest" File="$(_CoreMLModel_PartialAppManifestCache)" Overwrite="true" IncludeMetadata="true" />
<WriteItemsToFile Items="@(_CoreMLModel_BundleResources)" ItemName="_BundleResourceWithLogicalName" File="$(_CoreMLModel_BundleResourceCache)" Overwrite="true" IncludeMetadata="true" />
<ItemGroup>
<FileWrites Include="$(_CoreMLModel_PartialAppManifestCache);$(_CoreMLModel_BundleResourceCache)" />
</ItemGroup>
</Target>

<Target Name="_PostCompileCoreMLModels">
<!-- Write out the list of assets we've processed, so that an inner build in a multi-rid build can skip processing them -->
<!-- We need to do this even for incremental builds, when we don't need to run the CoreMLCompiler task, so this is not in the _CoreCompileCoreMLModels target -->
<WriteItemsToFile Items="@(CoreMLModel)" Condition="'$(_SaveProcessedItems)' == 'true'" ItemName="CoreMLModel" File="$(_ProcessedCoreMLModelsPath)" Overwrite="true" IncludeMetadata="false" />
<ItemGroup>
<FileWrites Include="$(_CoreMLModel_PartialAppManifestCache);$(_CoreMLModel_BundleResourceCache)" />
<FileWrites Include="$(_ProcessedCoreMLModelsPath)" />
</ItemGroup>
</Target>
Expand Down
2 changes: 1 addition & 1 deletion tools/devops/automation/scripts/System.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ function Assert-HDFreeSpace {

Write-Host ""

$stepUrl = "$Env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI$Env:SYSTEM_TEAMPROJECT/results?buildId=$Env:BUILD_BUILDID&view=logs&j=$Env:SYSTEM_JOBIDENTIFIER&t=$Env:SYSTEM_TASKINSTANCEID"
$stepUrl = "$Env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI$Env:SYSTEM_TEAMPROJECT/_build/results?buildId=$Env:BUILD_BUILDID&view=logs&j=$Env:SYSTEM_JOBID&t=$Env:SYSTEM_TASKINSTANCEID"
$workItemTitle = "[CI] Bot '$Env:AGENT_MACHINENAME' out of disk space"
$workItemMessage = @"
<div>The bot <b>$Env:AGENT_MACHINENAME</b> does not have enough hard disk space left.</div>
Expand Down
2 changes: 1 addition & 1 deletion tools/devops/automation/scripts/bash/build-nugets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ cd "$XAM_TOP"

DOTNET_NUPKG_DIR=$(make -C tools/devops print-abspath-variable VARIABLE=DOTNET_NUPKG_DIR | grep "^DOTNET_NUPKG_DIR=" | sed -e 's/^DOTNET_NUPKG_DIR=//')

rm -rf ../package/
mkdir -p ../package/
rm -f ../package/*.nupkg
cp -c "$DOTNET_NUPKG_DIR"/*.nupkg ../package/
cp -c "$DOTNET_NUPKG_DIR"/vs-workload.props ../package/
cp -c dotnet/Workloads/SignList.xml ../package/
Expand Down
26 changes: 21 additions & 5 deletions tools/devops/automation/scripts/bash/clean-bot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,27 @@ set +e

# Clean workspace
(
REPO_PATH="SYSTEM_DEFAULTWORKINGDIRECTORY/$(basename "$BUILD_REPOSITORY_NAME")"
if test -d "$REPO_PATH"; then
cd "$REPO_PATH"
git clean -xfd
fi
for repo in "$SYSTEM_DEFAULTWORKINGDIRECTORY"/.git "$SYSTEM_DEFAULTWORKINGDIRECTORY"/*/.git; do
if test -d "$repo"; then
cd "$repo"
cd ..
echo "Running 'git clean' (for all submodules too) in $(pwd)"
git clean -xffd | sed 's/^/ /' || true
git submodule foreach --recursive git clean -xffd | sed 's/^/ /' || true
else
echo "$repo is not a git repository"
fi
done

echo "Cleaning packages directory:"
rm -rv "$SYSTEM_DEFAULTWORKINGDIRECTORY/packages" | sed 's/^/ /' || true

echo "Contents of SYSTEM_DEFAULTWORKINGDIRECTORY ($SYSTEM_DEFAULTWORKINGDIRECTORY):"
# shellcheck disable=SC2012
ls -la "$SYSTEM_DEFAULTWORKINGDIRECTORY" | sed 's/^/ /' || true
echo "Contents of BUILD_SOURCESDIRECTORY ($BUILD_SOURCESDIRECTORY):"
# shellcheck disable=SC2012
ls -la "$BUILD_SOURCESDIRECTORY" | sed 's/^/ /' || true
)

# Delete all the simulator devices. These can take up a lot of space over time (I've seen 100+GB on the bots)
Expand Down