From 47795004fb93a9375717e23d7fa2613d1e9b1413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Tue, 16 Apr 2024 07:34:23 -0400 Subject: [PATCH] ci: Clean artifacts after individual regression tests --- build/test-scripts/run-net7-template-linux.ps1 | 4 ++++ .../run-netcore-mobile-template-tests.ps1 | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/build/test-scripts/run-net7-template-linux.ps1 b/build/test-scripts/run-net7-template-linux.ps1 index 557d2e7a75..9b330dc801 100644 --- a/build/test-scripts/run-net7-template-linux.ps1 +++ b/build/test-scripts/run-net7-template-linux.ps1 @@ -79,7 +79,11 @@ for($i = 0; $i -lt $projects.Length; $i++) dotnet build $debug "$projectPath" $projectOptions Assert-ExitCodeIsZero + dotnet clean $debug + Write-Host "Building Release $projectPath with $projectOptions" dotnet build $release "$projectPath" $projectOptions Assert-ExitCodeIsZero + + dotnet clean $release } diff --git a/build/test-scripts/run-netcore-mobile-template-tests.ps1 b/build/test-scripts/run-netcore-mobile-template-tests.ps1 index cff9df773c..b95f4c861f 100644 --- a/build/test-scripts/run-netcore-mobile-template-tests.ps1 +++ b/build/test-scripts/run-netcore-mobile-template-tests.ps1 @@ -10,6 +10,11 @@ function Assert-ExitCodeIsZero() } } +function CleanupTree() +{ + git clean -fdx +} + $default = @('/ds', '/v:m', '/p:UseDotNetNativeToolchain=false', '/p:PackageCertificateKeyFile=') if ($IsWindows) @@ -69,6 +74,8 @@ if ($IsWindows) Assert-ExitCodeIsZero } +CleanupTree + popd $dotnetBuildNet6Configurations = @@ -109,6 +116,8 @@ if ($IsWindows) Assert-ExitCodeIsZero } +CleanupTree + popd # XAML Trimming build smoke test @@ -158,6 +167,7 @@ if ($IsWindows) } } +CleanupTree ## Tests Per versions of uno if ($IsWindows) @@ -284,9 +294,13 @@ for($i = 0; $i -lt $projects.Length; $i++) dotnet build $debug "$projectPath" $projectOptions Assert-ExitCodeIsZero + dotnet clean $debug + Write-Host "NetCore Building Release $projectPath with $projectOptions" dotnet build $release "$projectPath" $projectOptions Assert-ExitCodeIsZero + + dotnet clean $release } else { @@ -296,9 +310,13 @@ for($i = 0; $i -lt $projects.Length; $i++) & $msbuild $debug /r "$projectPath" $projectOptions Assert-ExitCodeIsZero + & $msbuild $debug /t:Clean + Write-Host "MSBuild Building Release $projectPath with $projectOptions" & $msbuild $release /r "$projectPath" $projectOptions Assert-ExitCodeIsZero + + & $msbuild $release /t:Clean } } }