Skip to content

Commit 7beb40f

Browse files
committed
Add CACHE_VERSION and update pip cache key
1 parent 9487352 commit 7beb40f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/develop')) # skip for PR merges
2020
variables:
2121
MPLBACKEND: agg
22+
CACHE_VERSION: '1'
2223
strategy:
2324
matrix:
2425
Win-Python311-64bit-full:
@@ -80,10 +81,10 @@ jobs:
8081
8182
- task: Cache@2
8283
inputs:
83-
key: 'pip | "$(Agent.OS)" | "$(PYTHON_VERSION)" | "$(BUILD_TYPE)" | "$(imageName)"'
84+
key: 'pip | "$(Agent.OS)" | "$(PYTHON_VERSION)" | "$(BUILD_TYPE)" | "$(imageName)" | "$(CACHE_VERSION)" | package/requirements.txt'
8485
restoreKeys: |
85-
pip | "$(Agent.OS)" | "$(PYTHON_VERSION)" | "$(BUILD_TYPE)"
86-
pip | "$(Agent.OS)" | "$(PYTHON_VERSION)"
86+
pip | "$(Agent.OS)" | "$(PYTHON_VERSION)" | "$(BUILD_TYPE)" | "$(imageName)" | "$(CACHE_VERSION)"
87+
pip | "$(Agent.OS)" | "$(PYTHON_VERSION)" | "$(BUILD_TYPE)" | "$(imageName)"
8788
path: $(PIP_CACHE_DIR)
8889
displayName: 'Cache pip'
8990
# a PEP518 compliant wheel build shoud be

0 commit comments

Comments
 (0)