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 add -Name "WinGetDependencies" -Source $feedUrl -Username "AzureDevOps" -Password "$env:SYSTEM_ACCESSTOKEN" -StorePasswordInClearText
83+ & $nugetExe setapikey "AzureDevOps" -Source $feedUrl
84+ env :
85+ SYSTEM_ACCESSTOKEN : $(System.AccessToken)
86+
7087 # Restores all projects, including native (vcxproj) projects
7188 - task : NuGetCommand@2
7289 displayName : Restore Solution
@@ -114,13 +131,17 @@ jobs:
114131 platform : ' $(buildPlatform)'
115132 solution : ' $(solution)'
116133 configuration : ' $(buildConfiguration)'
117- msbuildArgs : ' /bl:$(artifactsDir)\msbuild.binlog
134+ msbuildArgs : ' /reportfileaccesses
135+ /bl:$(artifactsDir)\msbuild.binlog
118136 /p:AppxBundlePlatforms="$(buildPlatform)"
119137 /p:AppxPackageDir="$(appxPackageDir)"
120138 /p:AppxBundle=Always
121139 /p:UapAppxPackageBuildMode=SideloadOnly
122- /p:WingetCleanIntermediateFiles=true '
140+ /p:WingetCleanIntermediateFiles=false '
123141 maximumCpuCount : true
142+ msbuildArchitecture : x64
143+ env :
144+ SYSTEM_ACCESSTOKEN : $(System.AccessToken)
124145
125146 - task : MSBuild@1
126147 displayName : Build MSIX Test Installer File
@@ -672,6 +693,21 @@ 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 add -Name "WinGetDependencies" -Source $feedUrl -Username "AzureDevOps" -Password "$env:SYSTEM_ACCESSTOKEN" -StorePasswordInClearText
707+ & $nugetExe setapikey "AzureDevOps" -Source $feedUrl
708+ env :
709+ SYSTEM_ACCESSTOKEN : $(System.AccessToken)
710+
675711 - task : NuGetCommand@2
676712 displayName : Restore Solution
677713 inputs :
@@ -690,7 +726,7 @@ jobs:
690726 platform : ' $(buildPlatform)'
691727 solution : ' $(solution)'
692728 configuration : ' $(buildConfiguration)'
693- msbuildArgs : ' /bl:$(artifactsDir)\msbuild.binlog'
729+ msbuildArgs : ' /bl:$(artifactsDir)\msbuild.binlog /p:MSBuildCacheEnabled=false '
694730 maximumCpuCount : true
695731
696732 - task : CopyFiles@2
0 commit comments