Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: cache pip files and miniconda download #586

Merged
merged 1 commit into from
Dec 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"