2020variables :
2121 solution : ' src\AppInstallerCLI.sln'
2222 EnableDetectorVcpkg : true
23+ EnablePipelineCache : true
24+ VCPKG_BINARY_SOURCES : " clear;nuget,https://pkgs.dev.azure.com/shine-oss/winget-cli/_packaging/WinGetDependencies/nuget/v3/index.json,readwrite"
2325
2426# Do not set the build version for a PR build.
2527
6769 - task : NuGetToolInstaller@1
6870 displayName : Install Nuget
6971
72+ - task : NuGetAuthenticate@1
73+ displayName : Authenticate to NuGet Feed
74+
75+ - task : PowerShell@2
76+ displayName : Configure vcpkg NuGet binary cache credentials
77+ inputs :
78+ targetType : inline
79+ script : |
80+ $nugetExe = (& "$(VCPKG_INSTALLATION_ROOT)\vcpkg.exe" fetch nuget) | Select-Object -Last 1
81+ $feedUrl = "https://pkgs.dev.azure.com/shine-oss/winget-cli/_packaging/WinGetDependencies/nuget/v3/index.json"
82+ & $nugetExe sources remove -Name "WinGetDependencies" 2>&1 | Out-Null
83+ & $nugetExe sources add -Name "WinGetDependencies" -Source $feedUrl -Username "AzureDevOps" -Password "$env:SYSTEM_ACCESSTOKEN" -StorePasswordInClearText
84+ & $nugetExe setapikey "AzureDevOps" -Source $feedUrl
85+ env :
86+ SYSTEM_ACCESSTOKEN : $(System.AccessToken)
87+
7088 # Restores all projects, including native (vcxproj) projects
7189 - task : NuGetCommand@2
7290 displayName : Restore Solution
@@ -114,13 +132,16 @@ jobs:
114132 platform : ' $(buildPlatform)'
115133 solution : ' $(solution)'
116134 configuration : ' $(buildConfiguration)'
117- msbuildArgs : ' /bl:$(artifactsDir)\msbuild.binlog
135+ msbuildArgs : ' /reportfileaccesses
136+ /bl:$(artifactsDir)\msbuild.binlog
118137 /p:AppxBundlePlatforms="$(buildPlatform)"
119138 /p:AppxPackageDir="$(appxPackageDir)"
120139 /p:AppxBundle=Always
121140 /p:UapAppxPackageBuildMode=SideloadOnly
122- /p:WingetCleanIntermediateFiles=true '
141+ /p:WingetCleanIntermediateFiles=false '
123142 maximumCpuCount : true
143+ env :
144+ SYSTEM_ACCESSTOKEN : $(System.AccessToken)
124145
125146 - task : MSBuild@1
126147 displayName : Build MSIX Test Installer File
@@ -672,6 +693,22 @@ jobs:
672693 - task : NuGetToolInstaller@1
673694 displayName : Install Nuget
674695
696+ - task : NuGetAuthenticate@1
697+ displayName : Authenticate to NuGet Feed
698+
699+ - task : PowerShell@2
700+ displayName : Configure vcpkg NuGet binary cache credentials
701+ inputs :
702+ targetType : inline
703+ script : |
704+ $nugetExe = (& "$(VCPKG_INSTALLATION_ROOT)\vcpkg.exe" fetch nuget) | Select-Object -Last 1
705+ $feedUrl = "https://pkgs.dev.azure.com/shine-oss/winget-cli/_packaging/WinGetDependencies/nuget/v3/index.json"
706+ & $nugetExe sources remove -Name "WinGetDependencies" 2>&1 | Out-Null
707+ & $nugetExe sources add -Name "WinGetDependencies" -Source $feedUrl -Username "AzureDevOps" -Password "$env:SYSTEM_ACCESSTOKEN" -StorePasswordInClearText
708+ & $nugetExe setapikey "AzureDevOps" -Source $feedUrl
709+ env :
710+ SYSTEM_ACCESSTOKEN : $(System.AccessToken)
711+
675712 - task : NuGetCommand@2
676713 displayName : Restore Solution
677714 inputs :
@@ -690,7 +727,7 @@ jobs:
690727 platform : ' $(buildPlatform)'
691728 solution : ' $(solution)'
692729 configuration : ' $(buildConfiguration)'
693- msbuildArgs : ' /bl:$(artifactsDir)\msbuild.binlog'
730+ msbuildArgs : ' /bl:$(artifactsDir)\msbuild.binlog /p:MSBuildCacheEnabled=false '
694731 maximumCpuCount : true
695732
696733 - task : CopyFiles@2
0 commit comments