Skip to content

Commit

Permalink
[release/7.0][Android] Free up more disk space on CI builds
Browse files Browse the repository at this point in the history
backport of dotnet#84354

The android builds are running out of disk space when building the library test apps. This change tries to recoup some of that space by deleting artifacts after each test was built.
  • Loading branch information
Steve Pfister committed Apr 10, 2023
1 parent 7e8c33e commit ade2358
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eng/testing/tests.android.targets
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
DestinationFolder="$(TestArchiveTestsDir)"
SkipUnchangedFiles="true"
Condition="'$(ArchiveTests)' == 'true' and '$(IgnoreForCI)' != 'true'" />

<RemoveDir Condition="'$(ArchiveTests)' == 'true' and '$(AndroidGenerateAppBundle)' == 'true'" Directories="$(OutDir)" />
</Target>

</Project>
5 changes: 5 additions & 0 deletions src/mono/msbuild/android/build/AndroidApp.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<Project>
<PropertyGroup>
<AndroidGenerateAppBundle Condition="'$(AndroidGenerateAppBundle)' == '' and '$(GenerateAppBundle)' != ''">$(GenerateAppBundle)</AndroidGenerateAppBundle>
<AndroidGenerateAppBundle Condition="'$(AndroidGenerateAppBundle)' == ''">true</AndroidGenerateAppBundle>
</PropertyGroup>

<UsingTask TaskName="AndroidAppBuilderTask"
AssemblyFile="$(AndroidAppBuilderTasksAssemblyPath)" />

Expand Down

0 comments on commit ade2358

Please sign in to comment.