From c661b29b8e6e48709d2992333f49fea8da32849c Mon Sep 17 00:00:00 2001 From: Jadon Fowler Date: Tue, 17 Jul 2018 09:47:05 -0700 Subject: [PATCH] Add cache to Travis Signed-off-by: Jadon Fowler --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.travis.yml b/.travis.yml index e545f0d3a..f2e177297 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,5 +10,16 @@ jdk: scala: - 2.12.6 +# Caching taken from https://www.scala-sbt.org/1.0/docs/Travis-CI-with-sbt.html#Caching +cache: + directories: + - $HOME/.ivy2/cache + - $HOME/.sbt + +before_cache: + # Cleanup the cached directories to avoid unnecessary cache updates + - find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete + - find $HOME/.sbt -name "*.lock" -print -delete + script: - sbt ++$TRAVIS_SCALA_VERSION compile