From c01be0395d4e12120ffa0659e2f08e72e916ec31 Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Wed, 19 Aug 2020 09:26:08 -0700 Subject: [PATCH 1/4] Bump sbt build to 1.4.0-M2 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 797e7ccfd..1c415701e 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.3.10 +sbt.version=1.4.0-M2 From b2d7ba3aec778a8e1c381c76df3fb28fb02cb46e Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Wed, 19 Aug 2020 11:22:37 -0700 Subject: [PATCH 2/4] Disable virtual io in CI The travis tty does not work with virtual io. We should disable virtual io by default when sbt detects that it's being run in CI but until we release 1.4.0-M3 or 1.4.0-RC1, we need this flag to fix the travis output. --- .appveyor.yml | 8 ++++---- .travis.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index a4ceb59ef..c7fbdcf8b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -39,7 +39,7 @@ for: - export PATH="$PATH:~/.jabba/jdk/adopt@1.8.0-222/bin" - export PATH="$PATH:graalvm-ce-java8-20.1.0/bin" - gu install native-image - - sbt -Dsbt.native-image=$(pwd)/graalvm-ce-java8-20.1.0/bin/native-image "sbtClientProj/buildNativeThinClient" + - sbt "-Dsbt.io.virtual=false" "-Dsbt.native-image=$(pwd)/graalvm-ce-java8-20.1.0/bin/native-image" "sbtClientProj/buildNativeThinClient" - matrix: @@ -70,7 +70,7 @@ for: - export PATH="$PATH:~/.jabba/jdk/adopt@1.8.0-222/Contents/Home/bin" - export PATH="$PATH:graalvm-ce-java8-20.1.0/Contents/Home/bin" - gu install native-image - - sbt -Dsbt.native-image=$(pwd)/graalvm-ce-java8-20.1.0/Contents/Home/bin/native-image "sbtClientProj/buildNativeThinClient" + - sbt "-Dsbt.io.virtual=false" "-Dsbt.native-image=$(pwd)/graalvm-ce-java8-20.1.0/Contents/Home/bin/native-image" "sbtClientProj/buildNativeThinClient" - matrix: @@ -123,7 +123,7 @@ for: - '%USERPROFILE%\.sbt' test_script: - - sbt "-Dsbt.native-image=C:\graalvm-ce-java8-20.1.0\bin\native-image.cmd" "sbtClientProj/buildNativeThinClient" + - sbt "-Dsbt.io.virtual=false" "-Dsbt.native-image=C:\graalvm-ce-java8-20.1.0\bin\native-image.cmd" "sbtClientProj/buildNativeThinClient" - matrix: only: @@ -157,4 +157,4 @@ for: test_script: # The server tests often fail in CI when run together so just run a single test to ensure # that the thin client works on windows - - sbt "scripted actions/* classloader-cache/* nio/* watch/*" "serverTestProj/testOnly testpkg.ClientTest" + - sbt "-Dsbt.io.virtual=false" "scripted actions/* classloader-cache/* nio/* watch/*" "serverTestProj/testOnly testpkg.ClientTest" diff --git a/.travis.yml b/.travis.yml index bbbba1e75..f3036cf9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ install: script: # It doesn't need that much memory because compile and run are forked - - sbt -Dsbt.ci=true -J-XX:ReservedCodeCacheSize=128m -J-Xmx800M -J-Xms800M -J-server "$SBT_CMD" + - sbt -Dsbt.io.virtual=false -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 From f4d72c8d0f9b29562e16281caa996b7ba511ddf8 Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Wed, 19 Aug 2020 11:25:39 -0700 Subject: [PATCH 3/4] Disable pipelining in CI sbt 1.4.0-M2 failed to build util-tracking in 2.13.3 in CI with pipelining enabled. It works fine with pipelining disabled. --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 79d77d3ac..2d7013b6b 100644 --- a/build.sbt +++ b/build.sbt @@ -14,7 +14,7 @@ ThisBuild / version := { ThisBuild / scalafmtOnCompile := !(Global / insideCI).value ThisBuild / Test / scalafmtOnCompile := !(Global / insideCI).value ThisBuild / turbo := true -ThisBuild / SettingKey[Boolean]("usePipelining") := true +ThisBuild / SettingKey[Boolean]("usePipelining") := !(Global / insideCI).value val excludeLint = SettingKey[Set[Def.KeyedInitialize[_]]]("excludeLintKeys") Global / excludeLint := (Global / excludeLint).?.value.getOrElse(Set.empty) From c641ebd55e7de17b4c9f02d64989996e578772ac Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Wed, 19 Aug 2020 11:36:23 -0700 Subject: [PATCH 4/4] 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