Skip to content

Commit ba3df72

Browse files
committed
Cache pip downloads in CI
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent b2d7512 commit ba3df72

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

etc/ci/azure-posix.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ parameters:
55
test_suites: {}
66
python_architecture: x64
77

8+
89
jobs:
910
- job: ${{ parameters.job_name }}
1011

@@ -29,6 +30,12 @@ jobs:
2930
architecture: '${{ parameters.python_architecture }}'
3031
displayName: '${{ pyver }} - Install Python'
3132

33+
- task: Cache@2
34+
inputs:
35+
key: 'pipcache | "$(Agent.OS)" | ${{ pyver }}'
36+
path: $(PIP_CACHE_DIR)
37+
displayName: Cache pip downloaded packages
38+
3239
- script: |
3340
python${{ pyver }} --version
3441
echo "python${{ pyver }}" > PYTHON_EXECUTABLE

etc/ci/azure-win.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ parameters:
55
test_suites: {}
66
python_architecture: x64
77

8+
89
jobs:
910
- job: ${{ parameters.job_name }}
1011

@@ -29,6 +30,12 @@ jobs:
2930
architecture: '${{ parameters.python_architecture }}'
3031
displayName: '${{ pyver }} - Install Python'
3132

33+
- task: Cache@2
34+
inputs:
35+
key: 'pipcache | "$(Agent.OS)" | ${{ pyver }}'
36+
path: $(PIP_CACHE_DIR)
37+
displayName: Cache pip downloaded packages
38+
3239
- script: |
3340
python --version
3441
echo | set /p=python> PYTHON_EXECUTABLE

0 commit comments

Comments
 (0)