Skip to content

Commit

Permalink
Remove travis caching and avoid rate limiting. (#962)
Browse files Browse the repository at this point in the history
The caching only saves a few minutes and seems brittle.
  • Loading branch information
SirVer authored and UltiBot committed Apr 9, 2018
1 parent 411d011 commit 01c4bde
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 63 deletions.
26 changes: 8 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
sudo: required
services: docker

# Cache intermediate Docker layers. For a description of how this works, see:
# https://giorgos.sealabs.net/docker-cache-on-travis-and-docker-112.html
cache:
directories:
- /home/travis/docker/

env:
matrix:
- VIM_VERSION="7.4" PYTHON_IMAGE=2.7-stretch TAG=vim_74_py2 DOCKER_CACHE_FILE=/home/travis/docker/vim_74_py2.tar.gz
- VIM_VERSION="8.0" PYTHON_IMAGE=2.7-stretch TAG=vim_80_py2 DOCKER_CACHE_FILE=/home/travis/docker/vim_80_py2.tar.gz
- VIM_VERSION="git" PYTHON_IMAGE=2.7-stretch TAG=vim_git_py2 DOCKER_CACHE_FILE=/home/travis/docker/vim_git_py2.tar.gz
- VIM_VERSION="7.4" PYTHON_IMAGE=3.6-stretch TAG=vim_74_py3 DOCKER_CACHE_FILE=/home/travis/docker/vim_74_py3.tar.gz
- VIM_VERSION="8.0" PYTHON_IMAGE=3.6-stretch TAG=vim_80_py3 DOCKER_CACHE_FILE=/home/travis/docker/vim_80_py3.tar.gz
- VIM_VERSION="git" PYTHON_IMAGE=3.6-stretch TAG=vim_git_py3 DOCKER_CACHE_FILE=/home/travis/docker/vim_git_py3.tar.gz
global:
secure: PFU1Md8NuN6SQNjx6SsHX7icS9Tacb0xS0Ue9SHll1U7FNdI90F/gnokR6v+j7sdvoiLkwRSwUXeYUmrZS/d9qq8yiRxuqcj/Y0TfHVKqcLXXV/m9xWAN2UKRVF7Z1neerznk52Roo3IRqwgd9U+6d3bTthHKKYg4azBqTM7AFE=
before_install: docker/load_docker_cache.sh
- VIM_VERSION="7.4" PYTHON_IMAGE=2.7-stretch TAG=vim_74_py2
- VIM_VERSION="8.0" PYTHON_IMAGE=2.7-stretch TAG=vim_80_py2
- VIM_VERSION="git" PYTHON_IMAGE=2.7-stretch TAG=vim_git_py2
- VIM_VERSION="7.4" PYTHON_IMAGE=3.6-stretch TAG=vim_74_py3
- VIM_VERSION="8.0" PYTHON_IMAGE=3.6-stretch TAG=vim_80_py3
- VIM_VERSION="git" PYTHON_IMAGE=3.6-stretch TAG=vim_git_py3

install:
- docker build -t ultisnips:${TAG} --build-arg PYTHON_IMAGE=${PYTHON_IMAGE} --build-arg VIM_VERSION=${VIM_VERSION} --build-arg GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN} .
- docker build -t ultisnips:${TAG} --build-arg PYTHON_IMAGE=${PYTHON_IMAGE} --build-arg VIM_VERSION=${VIM_VERSION} .

script:
- docker run -it ultisnips:${TAG} docker/run_tests.sh
- docker/save_docker_cache.sh

notifications:
webhooks:
Expand Down
22 changes: 2 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ ARG PYTHON_IMAGE
FROM python:${PYTHON_IMAGE}

ARG VIM_VERSION
ARG GITHUB_ACCESS_TOKEN

COPY docker/install_packages.sh src/scripts/
RUN src/scripts/install_packages.sh
Expand All @@ -12,26 +11,9 @@ RUN src/scripts/download_vim.sh
COPY docker/build_vim.sh src/scripts/
RUN src/scripts/build_vim.sh

# We clone the plugins we currently depend on manually here. Initially we check
# if their master has changed since last time we build, this will invalidate
# the cache.
RUN mkdir -p /tmp/UltiSnips_test_vim_plugins

ADD https://api.github.com/repos/tpope/vim-pathogen/git/refs/heads/master?access_token=$GITHUB_ACCESS_TOKEN \
/src/scripts/vim-pathogen_version.json
RUN git clone --recursive --depth 1 https://github.com/tpope/vim-pathogen /tmp/UltiSnips_test_vim_plugins/vim-pathogen

ADD https://api.github.com/repos/ervandew/supertab/git/refs/heads/master?access_token=$GITHUB_ACCESS_TOKEN \
/src/scripts/supertab_version.json
RUN git clone --recursive --depth 1 https://github.com/ervandew/supertab /tmp/UltiSnips_test_vim_plugins/supertab

# Unidecode is not a Vim plugin, but a Python library we depend on. We also
# install the latest version through pip. But we still use GitHub activity as a
# marker to invalidate the installation step, just to make sure we occasionally
# reinstall a new version.
ADD https://api.github.com/repos/avian2/unidecode/git/refs/heads/master?access_token=$GITHUB_ACCESS_TOKEN \
/src/scripts/unidecode_version.json
RUN pip install unidecode

COPY . /src/UltiSnips
WORKDIR /src/UltiSnips

RUN ./test_all.py --clone-plugins
11 changes: 0 additions & 11 deletions docker/load_docker_cache.sh

This file was deleted.

14 changes: 0 additions & 14 deletions docker/save_docker_cache.sh

This file was deleted.

0 comments on commit 01c4bde

Please sign in to comment.