From 5f69e3cd14f4dccd7f8df41fe3f227d584db0aa0 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 28 Oct 2024 08:57:30 +0100 Subject: [PATCH 1/3] [devops] Fix link to step logs. (#21529) --- tools/devops/automation/scripts/System.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/devops/automation/scripts/System.psm1 b/tools/devops/automation/scripts/System.psm1 index 5b67f2f7a4f2..d9bad3e0258c 100644 --- a/tools/devops/automation/scripts/System.psm1 +++ b/tools/devops/automation/scripts/System.psm1 @@ -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 = @"
The bot $Env:AGENT_MACHINENAME does not have enough hard disk space left.
From 62bea9dc76123b5c866abb3b114f75e821e96936 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 28 Oct 2024 09:08:59 +0100 Subject: [PATCH 2/3] [devops] Clean up bots better from previous usage. (#21523) * Find all git repositories in the default working directory, for both multi-repo checkouts and single-repo checkouts, and clean them all. * Completely remove the 'packages' directory before putting any other files in it. --- .../automation/scripts/bash/build-nugets.sh | 2 +- .../automation/scripts/bash/clean-bot.sh | 26 +++++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/tools/devops/automation/scripts/bash/build-nugets.sh b/tools/devops/automation/scripts/bash/build-nugets.sh index 8f469722b4dd..b133aa2da864 100755 --- a/tools/devops/automation/scripts/bash/build-nugets.sh +++ b/tools/devops/automation/scripts/bash/build-nugets.sh @@ -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/ diff --git a/tools/devops/automation/scripts/bash/clean-bot.sh b/tools/devops/automation/scripts/bash/clean-bot.sh index c48e4d5895f7..07e0adc41bb7 100755 --- a/tools/devops/automation/scripts/bash/clean-bot.sh +++ b/tools/devops/automation/scripts/bash/clean-bot.sh @@ -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) From 94526bc7bc0daa1549b5da5d04b8859a7d973fda Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 28 Oct 2024 09:09:29 +0100 Subject: [PATCH 3/3] [msbuild] Fix an incremental build issue with resources in universal apps. (#21516) For universal apps, we compile as many resources as we can in the outer (universal) build, and then pass a path to a temporary file with a list of those compiled resources to the inner (rid-specific) builds, so that the inner builds can skip them. We have to delete this temporary file after the inner builds have completed, otherwise they may interfere with subsequent builds if the set of resources has changed. However, this revealed another issue with incremental builds: we still need to write out this temporary file even if the outer build won't compile the resources because they were compiled in a previous build, otherwise the inner builds would unnecessarily compile those resources. An upcoming test for a new feature found this issue, so I'm not adding a test. --- dotnet/targets/Xamarin.Shared.Sdk.targets | 3 + msbuild/Xamarin.Shared/Xamarin.Shared.targets | 67 +++++++++++++++++-- 2 files changed, 63 insertions(+), 7 deletions(-) diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets index 37a4fe423f1b..f7329f9b6ba1 100644 --- a/dotnet/targets/Xamarin.Shared.Sdk.targets +++ b/dotnet/targets/Xamarin.Shared.Sdk.targets @@ -424,6 +424,9 @@ <_AssemblyPublishInputs Include="@(_AssemblyPublishDirectories -> '%(Identity)/**')" /> + + + @@ -814,11 +815,17 @@ Copyright (C) 2018 Microsoft. All rights reserved. - - + + + + + + + + @@ -836,6 +843,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. _BeforeCoreCompileImageAssets; _ReadCompileImageAssets; _CoreCompileImageAssets; + _PostCompileImageAssets; @@ -938,10 +946,16 @@ Copyright (C) 2018 Microsoft. All rights reserved. + + + + + + + - @@ -958,6 +972,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. _BeforeCoreCompileSceneKitAssets; _ReadCoreCompileSceneKitAssets; _CoreCompileSceneKitAssets; + _PostCompileSceneKitAssets; @@ -1024,10 +1039,16 @@ Copyright (C) 2018 Microsoft. All rights reserved. + + + + + + + - @@ -1041,6 +1062,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. _BeforeCoreCompileColladaAssets; _ReadCoreCompileColladaAssets; _CoreCompileColladaAssets; + _PostCompileColladaAssets; @@ -1107,10 +1129,16 @@ Copyright (C) 2018 Microsoft. All rights reserved. + + + + + + + - @@ -1181,6 +1209,18 @@ Copyright (C) 2018 Microsoft. All rights reserved. <_CompiledEntitlementsPath Condition="'$(_CompiledEntitlementsPath)' == ''">$(DeviceSpecificIntermediateOutputPath)Entitlements.xcent <_SaveProcessedItems Condition="'$(RuntimeIdentifiers)' != '' And '$(UsingAppleNETSdk)' == 'true'">true + + + + <_ProcessedPaths Include="$(_ProcessedBundleResourcesPath)" /> + <_ProcessedPaths Include="$(_ProcessedContentPath)" /> + <_ProcessedPaths Include="$(_ProcessedImageAssetsPath)" /> + <_ProcessedPaths Include="$(_ProcessedInterfaceDefinitionsPath)" /> + <_ProcessedPaths Include="$(_ProcessedSceneKitAssetsPath)" /> + <_ProcessedPaths Include="$(_ProcessedColladaAssetsPath)" /> + <_ProcessedPaths Include="$(_ProcessedTextureAtlasesPath)" /> + <_ProcessedPaths Include="$(_ProcessedCoreMLModelsPath)" /> + @@ -1233,6 +1273,7 @@ Copyright (C) 2018 Microsoft. All rights reserved. _BeforeCompileTextureAtlases; _ReadCoreCompileTextureAtlases; _CoreCompileTextureAtlases; + _PostCompileTextureAtlases; @@ -1296,10 +1337,16 @@ Copyright (C) 2018 Microsoft. All rights reserved. + + + + + + + - @@ -1391,10 +1438,16 @@ Copyright (C) 2018 Microsoft. All rights reserved. + + + + + + + -