forked from dotnet/source-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.proj
69 lines (56 loc) · 3.01 KB
/
build.proj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" InitialTargets="PrepareOutput" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="dir.props" />
<Target Name="Build" DependsOnTargets="PrepareOutput;InitBuild">
<Message Text="Build Environment: $(Platform) $(Configuration) $(TargetOS) $(TargetRid)" />
<MSBuild Projects="repos\$(RootRepo).proj" Targets="Build" BuildInParallel="$(BuildInParallel)" StopOnFirstFailure="true" />
</Target>
<Target Name="CreateRootRepoFile" AfterTargets="PrepareOutput">
<WriteLinesToFile Lines="$(RootRepo)" File="$(BaseIntermediatePath)rootrepo.txt" Overwrite="True" />
</Target>
<Target Name="PrepareOutput">
<MakeDir Directories="$(OutputPath)" />
<MakeDir Directories="$(LoggingDir)" />
<MakeDir Directories="$(GitInfoOutputDir)" />
<MakeDir Directories="$(IntermediatePath)" />
<MakeDir Directories="$(SourceBuiltBlobFeedDir)" />
<MakeDir Directories="$(SourceBuiltPackagesPath)" />
<MakeDir Directories="$(SourceBuiltAssetsDir)" />
<MakeDir Directories="$(LocalBlobStorageRoot)" />
</Target>
<Target Name="InitBuild">
<MSBuild Projects="tools-local/init-build.proj" />
</Target>
<Target Name="Clean">
<RemoveDir Directories="$(BaseOutputPath)" />
</Target>
<!-- After building offline, create a prebuilt usage report. -->
<Target Name="ReportPrebuiltUsageAfterOfflineBuild"
AfterTargets="Build"
Condition="'$(OfflineBuild)' == 'true' and '$(SkipReportPrebuiltUsageAfterOfflineBuild)' != 'true'">
<MSBuild Projects="repos\$(RootRepo).proj" Targets="WritePrebuiltUsageData;ReportPrebuiltUsage" />
</Target>
<!-- After generating a tarball, check why/where the online build downloaded prebuilts. -->
<Target Name="ReportTarballPrebuiltUsage">
<MSBuild Projects="repos\$(RootRepo).proj" Targets="WritePrebuiltUsageData;ReportPrebuiltUsage" />
</Target>
<!--
Dev scenario: regenerate a prebuilt-report. This makes it easy to add data to an existing
prebuilt report without performing another full build.
-->
<Target Name="CreatePrebuiltUsageReport">
<MSBuild Projects="repos\$(RootRepo).proj" Targets="ReportPrebuiltUsage" />
</Target>
<Target Name="RunSmokeTest" DependsOnTargets="GetProdConBlobFeedUrl">
<!--
Pass prodConBlobFeedUrl via EnvironmentVariables because it has '//' in it, which is
translated into '/' if it's passed in the Command arg.
This is also a problem when passing CLI feeds: https://github.com/dotnet/source-build/issues/561
-->
<Exec Command="./smoke-test.sh --minimal --projectOutput --configuration $(Configuration) --archiveRestoredPackages"
EnvironmentVariables="prodConBlobFeedUrl=$(ProdConBlobFeedUrl)" />
</Target>
<Import Project="$(ProjectDir)dependencies.targets" />
<Import Project="$(ToolsDir)VersionTools.targets" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))/dir.targets" />
</Project>