diff --git a/.travis.yml b/.travis.yml index dc899e915..33285f67b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,15 +41,24 @@ matrix: SKIP="$SKIP|asv/benchmark.py.*undefined name .(run|params)." PYFLAKES_NODOCTEST=1 pyflakes asv test | grep -E -v "$SKIP" > test.out; cat test.out; test \! -s test.out +cache: + directories: + - $HOME/.cache/pip + - $HOME/download + install: - | - set -ev + set -e export TRAVIS_PYTHON=`which python` export TRAVIS_PIP=`which pip` if [[ $USE_CONDA == true ]]; then - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; - chmod +x miniconda.sh; - ./miniconda.sh -b; + mkdir -p $HOME/download; + export MINICONDA_SH="Miniconda3-4.3.30-Linux-x86_64.sh"; + pushd $HOME/download; + wget -N https://repo.continuum.io/miniconda/$MINICONDA_SH; + chmod +x $MINICONDA_SH; + ./$MINICONDA_SH -b; + popd; export PATH=$HOME/miniconda3/bin:$PATH; conda update --yes conda; mv $HOME/miniconda3/bin/conda $HOME/miniconda3/bin/conda.real; diff --git a/appveyor.yml b/appveyor.yml index 2d401e761..0012d9ab9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,6 +20,9 @@ environment: platform: x86 PYTHON_ARCH: "32" +cache: + - '%LOCALAPPDATA%\pip\Cache' + install: # Clear tmpdir (sometimes left behind by appveyor?) - rmdir /s /q %APPVEYOR_BUILD_FOLDER%\\tmp & exit /b 0 @@ -55,3 +58,11 @@ build: false test_script: - "python -m pytest --timeout=360 -l --basetemp=%APPVEYOR_BUILD_FOLDER%\\tmp test" + +after_build: + # Clear up pip cache + - 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"