From c641ebd55e7de17b4c9f02d64989996e578772ac Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Wed, 19 Aug 2020 11:36:23 -0700 Subject: [PATCH] Use latest sbt version in a travis build Moving forward, it would be great for sbt to use the latest code to run the scripted tests. This could help detect regressions that aren't noticed by manual dogfooding. We can do this by first publishing 1.4.0-SNAPSHOT binaries before running tests. I didn't want to do this for all of the builds because it does make each build that publishes binaries take about a minute longer. The last build in the matrix is much faster than the other builds though so I made just that build use the snapshot version. Since that build almost always finishes first, this should have little effect on the actual time to run ci even though the cpu time will increase a bit. --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f3036cf9b..e17c5bb7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,8 @@ env: - SCALA_213=2.13.1 - UTIL_TESTS="utilCache/test;utilControl/test;utilInterface/test;utilLogging/test;utilPosition/test;utilRelation/test;utilScripted/test;utilTracking/test" # WHITESOURCE_PASSWORD= + - SBT_VERSION_PROP="" + - SBT_LOCAL=false - secure: d3bu2KNwsVHwfhbGgO+gmRfDKBJhfICdCJFGWKf2w3Gv86AJZX9nuTYRxz0KtdvEHO5Xw8WTBZLPb2thSJqhw9OCm4J8TBAVqCP0ruUj4+aqBUFy4bVexQ6WKE6nWHs4JPzPk8c6uC1LG3hMuzlC8RGETXtL/n81Ef1u7NjyXjs= matrix: - SBT_CMD="mimaReportBinaryIssues ; javafmtCheck ; Test / javafmtCheck; scalafmtCheckAll ; scalafmtSbtCheck; serverTestProj/scalafmtCheckAll; headerCheck ;test:headerCheck ;whitesourceOnPush ;test:compile; publishLocal; test; serverTestProj/test; doc; $UTIL_TESTS; ++$SCALA_213; $UTIL_TESTS" @@ -20,11 +22,14 @@ matrix: fast_finish: true include: - env: + - SBT_LOCAL=true + - SBT_VERSION_PROP=-Dsbt.version=1.4.0-SNAPSHOT - TRAVIS_JDK=adopt@1.8.0-222 - SBT_CMD="++$SCALA_213; $UTIL_TESTS; ++$SCALA_212; $UTIL_TESTS; scripted actions/* source-dependencies/*1of3 dependency-management/*1of4 java/*" before_install: - curl -sL https://raw.githubusercontent.com/shyiko/jabba/0.11.0/install.sh | bash && . ~/.jabba/jabba.sh + - if [ $SBT_LOCAL == true ]; then sbt -Dsbt.io.virtual=false publishLocalBin; fi install: - $JABBA_HOME/bin/jabba install $TRAVIS_JDK @@ -34,7 +39,7 @@ install: script: # It doesn't need that much memory because compile and run are forked - - sbt -Dsbt.io.virtual=false -Dsbt.ci=true -J-XX:ReservedCodeCacheSize=128m -J-Xmx800M -J-Xms800M -J-server "$SBT_CMD" + - sbt -Dsbt.io.virtual=false $SBT_VERSION_PROP -Dsbt.ci=true -J-XX:ReservedCodeCacheSize=128m -J-Xmx800M -J-Xms800M -J-server "$SBT_CMD" before_cache: - find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete