mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-08 00:23:03 +00:00
Read the cache in main build if it's a (Intermediate)merge branch. (#15330)
### Description In merge branch, the run only reads the cache generated in main build. As a result, each run in merge branch will not upload new cache except at the first time. ### Motivation and Context 1.Reduce the cache storage. If there's some big changes, devs should trigger the specific builds manually in https://dev.azure.com/onnxruntime/onnxruntime/_build. It still reads own branch cache.
This commit is contained in:
parent
5baf5f506b
commit
b54ca9a041
1 changed files with 5 additions and 1 deletions
|
|
@ -92,9 +92,13 @@ jobs:
|
|||
parameters:
|
||||
CacheDir: $(PROTO_CACHE_DIR)
|
||||
|
||||
# If it's a merge build, the run will read the cache generated by main build.
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: ' "$(TODAY)" | ccache | onnxruntime | "$(Build.SourceVersion)" '
|
||||
${{if eq(variables['Build.SourceBranchName'], 'merge')}}:
|
||||
key: ' "$(TODAY)" | ccache | merge '
|
||||
${{else}}:
|
||||
key: ' "$(TODAY)" | ccache | onnxruntime | $(Build.SourceVersion) '
|
||||
path: $(ORT_CACHE_DIR)
|
||||
restoreKeys: |
|
||||
"$(TODAY)" | ccache | onnxruntime
|
||||
|
|
|
|||
Loading…
Reference in a new issue