Skip to content

Commit c49d442

Browse files
authored
Ignore ReleaseStatic outputs and clean intermediates (microsoft#5848)
## Change Copy the C++/WinRT method for keeping the build servers with plenty of space by cleaning the intermediates after building each project. The precompiled headers alone are several GBs. Also adds `ReleaseStatic` outputs to the .gitignore.
1 parent 7d72eb3 commit c49d442

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ settings.json
1717
[Dd]ebug/
1818
[Dd]ebugPublic/
1919
[Rr]elease/
20+
[Rr]elease[Ss]tatic/
2021
[Rr]eleases/
2122
x64/
2223
x86/

azure-pipelines.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ jobs:
118118
/p:AppxBundlePlatforms="$(buildPlatform)"
119119
/p:AppxPackageDir="$(appxPackageDir)"
120120
/p:AppxBundle=Always
121-
/p:UapAppxPackageBuildMode=SideloadOnly'
121+
/p:UapAppxPackageBuildMode=SideloadOnly
122+
/p:WingetCleanIntermediateFiles=true'
122123
maximumCpuCount: true
123124

124125
- task: MSBuild@1

src/Directory.Build.props

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,10 @@
2626
<!-- For C# -->
2727
<PropertyGroup Condition="'$(WinGetMacros)' != ''">
2828
<DefineConstants>$(WinGetMacros)$(DefineConstants)</DefineConstants>
29-
</PropertyGroup>
29+
</PropertyGroup>
30+
31+
<!-- To prevent build agents from running out of disk space, clean as we go. -->
32+
<Target Name="CleanIntermediateFiles" AfterTargets="Build" Condition="'$(WingetCleanIntermediateFiles)'=='true'">
33+
<RemoveDir Directories="$(IntDir)" />
34+
</Target>
3035
</Project>

0 commit comments

Comments
 (0)