mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
enable pip cache in appveyor build
This commit is contained in:
parent
69384902a4
commit
cf7d97ce62
@ -14,6 +14,9 @@ install:
|
||||
- C:\Python%PYTHON%\python.exe -m pip install -U pip setuptools
|
||||
- C:\Python%PYTHON%\python.exe -m pip install .[test,websupport]
|
||||
|
||||
cache:
|
||||
- '%LOCALAPPDATA%\pip\Cache'
|
||||
|
||||
# No automatic build, just run python tests
|
||||
build: off
|
||||
|
||||
@ -39,3 +42,17 @@ test_script:
|
||||
|
||||
after_test:
|
||||
- ps: (New-Object System.Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path (Join-Path tests .junit.xml)))
|
||||
|
||||
after_build:
|
||||
# Remove old or huge cache files to hopefully not exceed the 1GB cache limit.
|
||||
#
|
||||
# If the cache limit is reached, the cache will not be updated (of not even
|
||||
# created in the first run). So this is a trade of between keeping the cache
|
||||
# current and having a cache at all.
|
||||
# NB: This is done only `on_success` since the cache in uploaded only on
|
||||
# success anyway.
|
||||
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -mtime +360 -delete
|
||||
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -size +10M -delete
|
||||
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -empty -delete
|
||||
# Show size of cache
|
||||
- C:\cygwin\bin\du -hs "%LOCALAPPDATA%\pip\Cache"
|
||||
|
Loading…
Reference in New Issue
Block a user