mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
Use today's cache only (#14120)
### Description Add date value of today into the cache key. ### Motivation and Context Microsoft-host agent has only 10GB for build. To limit cache size, pipeline only use cache generated today.
This commit is contained in:
parent
bdeba4e31c
commit
f864b54393
1 changed files with 4 additions and 3 deletions
|
|
@ -14,6 +14,7 @@ jobs:
|
|||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
CCACHE_DIR: $(Pipeline.Workspace)/ccache
|
||||
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
|
||||
pool: Linux-CPU-2019
|
||||
steps:
|
||||
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
||||
|
|
@ -42,12 +43,12 @@ jobs:
|
|||
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"ccache" | "$(Build.SourceBranch)" | "$(Build.SourceVersion)"'
|
||||
key: '"$(TODAY)" | "$(Build.SourceBranch)" | "$(Build.SourceVersion)"'
|
||||
path: $(CCACHE_DIR)
|
||||
cacheHitVar: CACHE_RESTORED
|
||||
restoreKeys: |
|
||||
"ccache" | "$(Build.SourceBranch)"
|
||||
"ccache"
|
||||
"$(TODAY)" | "$(Build.SourceBranch)"
|
||||
"$(TODAY)" |
|
||||
displayName: Cach Task
|
||||
|
||||
- script: |
|
||||
|
|
|
|||
Loading…
Reference in a new issue