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,16 @@ 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+ env :
143+ SYSTEM_ACCESSTOKEN : $(System.AccessToken)
124144
125145 - task : MSBuild@1
126146 displayName : Build MSIX Test Installer File
@@ -672,6 +692,21 @@ jobs:
672692 - task : NuGetToolInstaller@1
673693 displayName : Install Nuget
674694
695+ - task : NuGetAuthenticate@1
696+ displayName : Authenticate to NuGet Feed
697+
698+ - task : PowerShell@2
699+ displayName : Configure vcpkg NuGet binary cache credentials
700+ inputs :
701+ targetType : inline
702+ script : |
703+ $nugetExe = (& "$(VCPKG_INSTALLATION_ROOT)\vcpkg.exe" fetch nuget) | Select-Object -Last 1
704+ $feedUrl = "https://pkgs.dev.azure.com/shine-oss/winget-cli/_packaging/WinGetDependencies/nuget/v3/index.json"
705+ & $nugetExe sources add -Name "WinGetDependencies" -Source $feedUrl -Username "AzureDevOps" -Password "$env:SYSTEM_ACCESSTOKEN" -StorePasswordInClearText
706+ & $nugetExe setapikey "AzureDevOps" -Source $feedUrl
707+ env :
708+ SYSTEM_ACCESSTOKEN : $(System.AccessToken)
709+
675710 - task : NuGetCommand@2
676711 displayName : Restore Solution
677712 inputs :
@@ -690,7 +725,7 @@ jobs:
690725 platform : ' $(buildPlatform)'
691726 solution : ' $(solution)'
692727 configuration : ' $(buildConfiguration)'
693- msbuildArgs : ' /bl:$(artifactsDir)\msbuild.binlog'
728+ msbuildArgs : ' /bl:$(artifactsDir)\msbuild.binlog /p:MSBuildCacheEnabled=false '
694729 maximumCpuCount : true
695730
696731 - task : CopyFiles@2
0 commit comments