Compare commits

...

1 Commits

Author SHA1 Message Date
David Federman
c77ac66c33 Re-enable MSBuildCache 2025-07-24 09:36:36 -07:00
6 changed files with 39 additions and 9 deletions

View File

@@ -115,6 +115,7 @@ BKCOLOR
BKGND BKGND
BKMK BKMK
Bksp Bksp
blds
Blt Blt
blu blu
BLUESCROLL BLUESCROLL
@@ -180,6 +181,7 @@ CLIPCHILDREN
CLIPSIBLINGS CLIPSIBLINGS
closetest closetest
cloudconsole cloudconsole
CLOUDT
cloudvault cloudvault
CLSCTX CLSCTX
clsids clsids

View File

@@ -33,6 +33,17 @@
A:\; A:\;
E:\; E:\;
$(windir)\**; $(windir)\**;
$(MSBuildBinPath)\**;
$(MSBuildToolsPath32)\**;
</MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
<!--
Unit tests may write to TEMP, but should not be considered outputs. However, $(Temp) is using the DOS path (C:\Users\CLOUDT~1\AppData\Local\Temp), which
isn't accounted for in these globs. So we're building up to TEMP using $(LOCALAPPDATA) instead.
-->
<MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
$(MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns);
$(LOCALAPPDATA)\Temp\**;
</MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns> </MSBuildCacheAllowFileAccessAfterProjectFinishFilePatterns>
<!-- <!--
@@ -46,6 +57,15 @@
--> -->
<MSBuildCacheIdenticalDuplicateOutputPatterns>$(MSBuildCacheIdenticalDuplicateOutputPatterns);obj\*\vcpkg\**</MSBuildCacheIdenticalDuplicateOutputPatterns> <MSBuildCacheIdenticalDuplicateOutputPatterns>$(MSBuildCacheIdenticalDuplicateOutputPatterns);obj\*\vcpkg\**</MSBuildCacheIdenticalDuplicateOutputPatterns>
<!--
Ensure the MSBuildCache ignores collecting outputs under vcpkg's build tree, which is a working directory used to build vcpkg packages and not intended to be consumed by anything else in the build.
Note: We cannot use $(VcpkgInstalledDir) directly since it differs between projects, so use a pattern which encompasses all possibilities.
-->
<MSBuildCacheIgnoredOutputPatterns>
$(MSBuildCacheIgnoredOutputPatterns);
$(SolutionDir)\obj\*\vcpkg*\vcpkg\blds\**;
</MSBuildCacheIgnoredOutputPatterns>
<!-- version of MSBuildCache is not part of the cache key --> <!-- version of MSBuildCache is not part of the cache key -->
<PackagesConfigFile>$(MSBuildThisFileDirectory)\dep\nuget\packages.config</PackagesConfigFile> <PackagesConfigFile>$(MSBuildThisFileDirectory)\dep\nuget\packages.config</PackagesConfigFile>
<MSBuildCacheIgnoredInputPatterns>$(MSBuildCacheIgnoredInputPatterns);$(PackagesConfigFile)</MSBuildCacheIgnoredInputPatterns> <MSBuildCacheIgnoredInputPatterns>$(MSBuildCacheIgnoredInputPatterns);$(PackagesConfigFile)</MSBuildCacheIgnoredInputPatterns>

View File

@@ -84,7 +84,7 @@ stages:
buildEverything: true buildEverything: true
keepAllExpensiveBuildOutputs: false keepAllExpensiveBuildOutputs: false
${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}: ${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}:
enableCaching: true enableMsBuildCaching: true
- ${{ if eq(parameters.runTests, true) }}: - ${{ if eq(parameters.runTests, true) }}:
- stage: Test_${{ platform }} - stage: Test_${{ platform }}

View File

@@ -25,6 +25,8 @@ pr:
variables: variables:
- name: runCodesignValidationInjectionBG - name: runCodesignValidationInjectionBG
value: false value: false
- name: EnablePipelineCache
value: true
# 0.0.yyMM.dd## # 0.0.yyMM.dd##
# 0.0.1904.0900 # 0.0.1904.0900
@@ -45,6 +47,10 @@ parameters:
- x64 - x64
- x86 - x86
- arm64 - arm64
- name: enableMsBuildCaching
type: boolean
displayName: "Enable MSBuild Caching"
default: true
stages: stages:
- ${{ if eq(parameters.auditMode, true) }}: - ${{ if eq(parameters.auditMode, true) }}:
@@ -87,6 +93,8 @@ stages:
buildConfigurations: [Release] buildConfigurations: [Release]
buildEverything: true buildEverything: true
keepAllExpensiveBuildOutputs: false keepAllExpensiveBuildOutputs: false
${{ if eq(variables['System.PullRequest.IsFork'], 'False') }}:
enableMsBuildCaching: ${{ parameters.enableMsBuildCaching }}
- ${{ if eq(parameters.runTests, true) }}: - ${{ if eq(parameters.runTests, true) }}:
- stage: Test_${{ platform }} - stage: Test_${{ platform }}

View File

@@ -68,7 +68,7 @@ parameters:
- name: signingIdentity - name: signingIdentity
type: object type: object
default: {} default: {}
- name: enableCaching - name: enableMsBuildCaching
type: boolean type: boolean
default: false default: false
@@ -144,7 +144,7 @@ jobs:
} }
displayName: Prepare Build and Sign Targets displayName: Prepare Build and Sign Targets
- ${{ if eq(parameters.enableCaching, true) }}: - ${{ if eq(parameters.enableMsBuildCaching, true) }}:
- pwsh: |- - pwsh: |-
$MSBuildCacheParameters = "" $MSBuildCacheParameters = ""
$MSBuildCacheParameters += " -graph" $MSBuildCacheParameters += " -graph"
@@ -183,7 +183,7 @@ jobs:
configuration: $(BuildConfiguration) configuration: $(BuildConfiguration)
msbuildArchitecture: x64 msbuildArchitecture: x64
maximumCpuCount: true maximumCpuCount: true
${{ if eq(parameters.enableCaching, true) }}: ${{ if eq(parameters.enableMsBuildCaching, true) }}:
env: env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken) SYSTEM_ACCESSTOKEN: $(System.AccessToken)
@@ -192,7 +192,7 @@ jobs:
artifact: logs-$(BuildPlatform)-$(BuildConfiguration)${{ parameters.artifactStem }} artifact: logs-$(BuildPlatform)-$(BuildConfiguration)${{ parameters.artifactStem }}
condition: always() condition: always()
displayName: Publish Build Log displayName: Publish Build Log
- ${{ if eq(parameters.enableCaching, true) }}: - ${{ if eq(parameters.enableMsBuildCaching, true) }}:
- publish: $(Build.SourcesDirectory)\MSBuildCacheLogs - publish: $(Build.SourcesDirectory)\MSBuildCacheLogs
artifact: logs-msbuildcache-$(BuildPlatform)-$(BuildConfiguration)${{ parameters.artifactStem }} artifact: logs-msbuildcache-$(BuildPlatform)-$(BuildConfiguration)${{ parameters.artifactStem }}
condition: always() condition: always()
@@ -203,7 +203,7 @@ jobs:
inputs: inputs:
contents: $(Build.SourcesDirectory)/msbuild.binlog contents: $(Build.SourcesDirectory)/msbuild.binlog
TargetFolder: $(Terminal.BinDir) TargetFolder: $(Terminal.BinDir)
- ${{ if eq(parameters.enableCaching, true) }}: - ${{ if eq(parameters.enableMsBuildCaching, true) }}:
- task: CopyFiles@2 - task: CopyFiles@2
displayName: Copy MSBuildCache Logs displayName: Copy MSBuildCache Logs
inputs: inputs:

View File

@@ -20,7 +20,7 @@
<package id="Selenium.WebDriver" version="3.5.0" targetFramework="net45" /> <package id="Selenium.WebDriver" version="3.5.0" targetFramework="net45" />
<!-- MSBuildCache --> <!-- MSBuildCache -->
<package id="Microsoft.MSBuildCache.AzurePipelines" version="0.1.283-preview" /> <package id="Microsoft.MSBuildCache.AzurePipelines" version="0.1.318-preview" />
<package id="Microsoft.MSBuildCache.Local" version="0.1.283-preview" /> <package id="Microsoft.MSBuildCache.Local" version="0.1.318-preview" />
<package id="Microsoft.MSBuildCache.SharedCompilation" version="0.1.283-preview" /> <package id="Microsoft.MSBuildCache.SharedCompilation" version="0.1.318-preview" />
</packages> </packages>