Skip to content

Commit

Permalink
Optimize Travis CI file caching
Browse files Browse the repository at this point in the history
- store ivy cache
- don't store the whole ~/.sbt foldertree in S3
- add a new trick to avoid unnecessary ivy cache uploads

Follow up of scalaz#867.

(cherry picked from commit 578ebc7)
  • Loading branch information
gildegoma authored and xuwei-k committed Jan 31, 2015
1 parent 74069ae commit 9f88439
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@ sudo: false

cache:
directories:
- $HOME/.sbt
- $HOME/.ivy2
- $HOME/.ivy2/cache

# At the moment, sbt 0.13.5 is preinstalled in Travis VM image,
# which fortunately corresponds to current scalaz settings.
# The line below can be used to cache a given sbt version.
# - $HOME/.sbt/launchers/0.13.x

# At the moment, Scala 2.11.2 and 2.10.4 are preinstalled in Travis VM
# image, which fortunately corresponds to current scalaz settings.
# The line below is used to cache the scala version used by the build
# job, as these versions might be replaced after a Travis CI build
# environment upgrade (e.g. scala 2.11.2 could be replaced by scala 2.11.4).
- $HOME/.sbt/boot/scala-$TRAVIS_SCALA_VERSION

language: scala
scala:
Expand All @@ -18,5 +29,6 @@ jdk:
script:
- sbt ++$TRAVIS_SCALA_VERSION check-gen-type-classes test mima-report-binary-issues

# Trick to avoid unnecessary cache updates
# Tricks to avoid unnecessary cache updates
- find $HOME/.sbt -name "*.lock" | xargs rm
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm

0 comments on commit 9f88439

Please sign in to comment.