-
Notifications
You must be signed in to change notification settings - Fork 229
/
WindowsAppSDK-SamplesCI.yml
63 lines (59 loc) · 2.35 KB
/
WindowsAppSDK-SamplesCI.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
parameters:
- name: FeatureDirectory
type: string
default: ''
stages:
- stage: BuildSamples
jobs:
- job: BuildSamples
pool: 'ProjectReunionSamplesESPool-MS'
strategy:
maxParallel: 10
matrix:
Release_x86:
buildPlatform: 'x86'
buildConfiguration: 'Release'
Release_x64:
buildPlatform: 'x64'
buildConfiguration: 'Release'
Debug_x86:
buildPlatform: 'x86'
buildConfiguration: 'Debug'
Debug_x64:
buildPlatform: 'x64'
buildConfiguration: 'Debug'
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\${{ parameters.FeatureDirectory }}\**\*.sln'
- task: VSBuild@1
displayName: 'Restore nuget packages for all solutions'
inputs:
solution: .\Samples\${{ parameters.FeatureDirectory }}\**\*.sln
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
msbuildArgs: '/t:restore /p:PublishReadyToRun=true /p:VCToolsInstallDir="$(VCToolsInstallDir)\"'
- task: VSBuild@1
displayName: 'Build all Sample solutions'
inputs:
solution: .\Samples\${{ parameters.FeatureDirectory }}\**\*.sln
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
msbuildArgs: '/p:VCToolsInstallDir="$(VCToolsInstallDir)\"'