-
Notifications
You must be signed in to change notification settings - Fork 233
/
SamplesCI-All.yml
90 lines (84 loc) · 2.89 KB
/
SamplesCI-All.yml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Please see https://www.osgwiki.com/wiki/Windows_App_SDK_-_How_to_build_and_use_the_pipelines
# for information on how to use the pipelines
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
parameters:
- name: FeatureAreas
type: object
default:
- 'AppLifecycle\Activation'
- 'AppLifecycle\EnvironmentVariables'
- 'AppLifecycle\Restart'
- 'AppLifecycle\Instancing'
- 'AppLifecycle\StateNotifications'
- 'DeploymentManager'
- 'CustomControls'
- 'Insights'
- 'Input/cs-winui'
- 'Installer'
- 'Mica'
- 'Notifications'
- 'PhotoEditor'
- 'ResourceManagement'
- 'SelfContainedDeployment'
- 'TextRendering'
- 'Unpackaged'
- 'Widgets\SingleWidget'
- 'Widgets\MultipleWidgets'
- 'Windowing'
- name: "BuildConfig"
type: object
default:
- 'Release'
- 'Debug'
- name: "BuildPlatform"
type: object
default:
- 'x64'
- 'x86'
jobs:
- job: 'BuildAllSamples'
pool: 'ProjectReunionSamplesESPool-MS'
timeoutInMinutes: 120
strategy:
maxParallel: 10
matrix:
${{ each featureArea in parameters.FeatureAreas }}:
${{ featureArea }}:
feature: ${{ featureArea }}
steps:
- task: NuGetToolInstaller@1
displayName: 'Use NuGet 5.11.0'
inputs:
versionSpec: 5.11.0
# The environment variable VCToolsInstallDir isn't defined on lab machines, so we need to retrieve it ourselves.
- script: |
"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -Latest -prerelease -requires Microsoft.Component.MSBuild -property InstallationPath > %TEMP%\vsinstalldir.txt
set /p _VSINSTALLDIR15=<%TEMP%\vsinstalldir.txt
del %TEMP%\vsinstalldir.txt
call "%_VSINSTALLDIR15%\Common7\Tools\VsDevCmd.bat"
echo VCToolsInstallDir = %VCToolsInstallDir%
echo ##vso[task.setvariable variable=VCToolsInstallDir]%VCToolsInstallDir%
displayName: 'Retrieve VC tools directory'
#====================================================================================================================
- task: NuGetCommand@2
inputs:
command: 'restore'
feedsToUse: 'config'
nugetConfigPath: '.\Samples\nuget.config'
restoreSolution: '.\Samples\$(feature)\**\*.sln'
- ${{ each config in parameters.BuildConfig }}:
- ${{ each platform in parameters.BuildPlatform }}:
- task: VSBuild@1
displayName: 'Restore nuget packages for all solutions'
inputs:
solution: .\Samples\$(feature)\**\*.sln
platform: '${{ platform }}'
configuration: '${{ config }}'
msbuildArgs: '/t:restore /p:PublishReadyToRun=true /p:VCToolsInstallDir="$(VCToolsInstallDir)\"'
- task: VSBuild@1
displayName: 'Build all Sample solutions'
inputs:
solution: .\Samples\$(feature)\**\*.sln
platform: '${{ platform }}'
configuration: '${{ config }}'
msbuildArgs: '/p:VCToolsInstallDir="$(VCToolsInstallDir)\"'