1
+ # Please see https://www.osgwiki.com/wiki/Windows_App_SDK_-_How_to_build_and_use_the_pipelines
2
+ # for information on how to use the pipelines
3
+ name : $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
4
+ parameters :
5
+ - name : FeatureAreas
6
+ type : object
7
+ default :
8
+ - ' AppLifecycle\Activation'
9
+ - ' AppLifecycle\EnvironmentVariables'
10
+ - ' AppLifecycle\Restart'
11
+ - ' AppLifecycle\Instancing'
12
+ - ' AppLifecycle\StateNotifications'
13
+ - ' DeploymentManager'
14
+ - ' CustomControls'
15
+ - ' Insights'
16
+ - ' Input/cs-winui'
17
+ - ' Installer'
18
+ - ' Mica'
19
+ - ' Notifications'
20
+ - ' PhotoEditor'
21
+ - ' ResourceManagement'
22
+ - ' SelfContainedDeployment'
23
+ - ' TextRendering'
24
+ - ' Unpackaged'
25
+ - ' Windowing'
26
+ - name : " BuildConfig"
27
+ type : object
28
+ default :
29
+ - ' Release'
30
+ - ' Debug'
31
+ - name : " BuildPlatform"
32
+ type : object
33
+ default :
34
+ - ' x64'
35
+ - ' x86'
36
+
37
+ jobs :
38
+ - job : ' BuildAllSamples'
39
+ pool : ' ProjectReunionSamplesESPool-MS'
40
+ timeoutInMinutes : 120
41
+ strategy :
42
+ maxParallel : 10
43
+ matrix :
44
+ ${{ each featureArea in parameters.FeatureAreas }} :
45
+ ${{ featureArea }} :
46
+ feature : ${{ featureArea }}
47
+
48
+ steps :
49
+ - task : NuGetToolInstaller@1
50
+ displayName : ' Use NuGet 5.11.0'
51
+ inputs :
52
+ versionSpec : 5.11.0
53
+
54
+ # The environment variable VCToolsInstallDir isn't defined on lab machines, so we need to retrieve it ourselves.
55
+ - script : |
56
+ "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -Latest -prerelease -requires Microsoft.Component.MSBuild -property InstallationPath > %TEMP%\vsinstalldir.txt
57
+ set /p _VSINSTALLDIR15=<%TEMP%\vsinstalldir.txt
58
+ del %TEMP%\vsinstalldir.txt
59
+ call "%_VSINSTALLDIR15%\Common7\Tools\VsDevCmd.bat"
60
+ echo VCToolsInstallDir = %VCToolsInstallDir%
61
+ echo ##vso[task.setvariable variable=VCToolsInstallDir]%VCToolsInstallDir%
62
+ displayName: 'Retrieve VC tools directory'
63
+
64
+ #====================================================================================================================
65
+ - task: NuGetCommand@2
66
+ inputs:
67
+ command: 'restore'
68
+ feedsToUse: 'config'
69
+ nugetConfigPath: '.\Samples\nuget.config'
70
+ restoreSolution: '.\Samples\$(feature)\**\*.sln'
71
+
72
+ - ${{ each config in parameters.BuildConfig }}:
73
+ - ${{ each platform in parameters.BuildPlatform }}:
74
+ - task: VSBuild@1
75
+ displayName: 'Restore nuget packages for all solutions'
76
+ inputs:
77
+ solution: .\Samples\$(feature)\**\*.sln
78
+ platform: '${{ platform }}'
79
+ configuration: '${{ config }}'
80
+ msbuildArgs: '/t:restore /p:PublishReadyToRun=true /p:VCToolsInstallDir="$(VCToolsInstallDir)\"'
81
+
82
+ - task: VSBuild@1
83
+ displayName: 'Build all Sample solutions'
84
+ inputs:
85
+ solution: .\Samples\$(feature)\**\*.sln
86
+ platform: '${{ platform }}'
87
+ configuration: '${{ config }}'
88
+ msbuildArgs: '/p:VCToolsInstallDir="$(VCToolsInstallDir)\"'
0 commit comments