Skip to content

Commit

Permalink
Merge pull request #586 from pv/travis-cache
Browse files Browse the repository at this point in the history
CI: cache pip files and miniconda download
  • Loading branch information
pv authored Dec 3, 2017
2 parents a784796 + 5cf7a3a commit e93eb40
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
11 changes: 11 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"

0 comments on commit e93eb40

Please sign in to comment.