diff options
author | w0rp <devw0rp@gmail.com> | 2018-07-01 11:38:07 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-07-01 11:38:07 +0100 |
commit | 1990efdba7fe16723940eb119d9b2fc11c7eda41 (patch) | |
tree | fd7794ae3759ae7804fafd0414c86ab3c82d9645 /.travis.yml | |
parent | b88bf6ecba5d037c12cf6a94afcb70787a932704 (diff) | |
download | ale-1990efdba7fe16723940eb119d9b2fc11c7eda41.zip |
Try adding Docker caching for Travis CI
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml index f5389f74..70c9aa7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,21 @@ --- +# yamllint disable rule:line-length sudo: required services: - docker language: generic +# Set up Docker caching per: https://github.com/travis-ci/travis-ci/issues/5358#issuecomment-248915326 +before_cache: + # Save tagged docker images + - > + mkdir -p $HOME/docker && docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}' + | xargs -n 2 -t sh -c 'test -e $HOME/docker/$1.tar.gz || docker save $0 | gzip -2 > $HOME/docker/$1.tar.gz' +before_install: + # Load cached docker images + - if [[ -d $HOME/docker ]]; then ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; fi +cache: + bundler: true + directories: + - $HOME/docker script: | ./run-tests |