From 733f84d1a42e910daea108d872bfd1cc42a99151 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Thu, 28 Mar 2019 16:57:55 +0100 Subject: [PATCH 1/3] Run the community build CI with the correct sbt wrapper In particular, this avoids situations where the JVM goes into interpreter-only mode because CodeCache is full. --- .drone.yml | 2 +- .../communitybuild/CommunityBuildTest.scala | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 14a67a41edc3..98cfbb390101 100644 --- a/.drone.yml +++ b/.drone.yml @@ -41,7 +41,7 @@ pipeline: - cp -R . /tmp/3/ && cd /tmp/3/ - git submodule update --init --recursive --jobs 7 - export PATH=/tmp/4/project/scripts:$PATH - - sbt community-build/test + - ./project/scripts/sbt community-build/test test_sbt: group: test diff --git a/community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala b/community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala index eef7623d2dfa..badcb38d0ab7 100644 --- a/community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala +++ b/community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala @@ -58,11 +58,19 @@ class CommunityBuildTest { val pluginFilePath = communitybuildDir.resolve("sbt-dotty-sbt").toAbsolutePath().toString() // Run the sbt command with the compiler version and sbt plugin set in the build - val arguments = extraSbtArgs ++ Seq( - "-sbt-version", "1.2.7", - s"--addPluginSbtFile=$pluginFilePath", - s";clean ;set updateOptions in Global ~= (_.withLatestSnapshots(false)) ;++$compilerVersion! $testCommand" - ) + val arguments = { + val sbtProps = Option(System.getProperty("sbt.ivy.home")) match { + case Some(ivyHome) => + Seq(s"-Dsbt.ivy.home=$ivyHome") + case _ => + Seq() + } + extraSbtArgs ++ sbtProps ++ Seq( + "-sbt-version", "1.2.7", + s"--addPluginSbtFile=$pluginFilePath", + s";clean ;set updateOptions in Global ~= (_.withLatestSnapshots(false)) ;++$compilerVersion! $testCommand" + ) + } val exitCode = exec("sbt", arguments: _*) From 7f2f04140e3c61a5dd66c5b82cefc438bddbc50d Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Thu, 28 Mar 2019 18:08:24 +0100 Subject: [PATCH 2/3] Turn off sbt-coursier in community-build projects It messes with our CI. --- community-build/community-projects/fastparse | 2 +- community-build/community-projects/sourcecode | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/community-build/community-projects/fastparse b/community-build/community-projects/fastparse index 3cd994617054..79431b056713 160000 --- a/community-build/community-projects/fastparse +++ b/community-build/community-projects/fastparse @@ -1 +1 @@ -Subproject commit 3cd9946170543fef8bd89d4d2445805c90f0232f +Subproject commit 79431b0567131084e82ed1f5769c3063e2917bf6 diff --git a/community-build/community-projects/sourcecode b/community-build/community-projects/sourcecode index 54291ae38493..f8a839871c02 160000 --- a/community-build/community-projects/sourcecode +++ b/community-build/community-projects/sourcecode @@ -1 +1 @@ -Subproject commit 54291ae384937a6d140b17502848a0bf96873d61 +Subproject commit f8a839871c02a7ef45afc4bfa6ed2688e7e67aa1 From 17e78adbd2c9db47d75c54bc9cf8ee4468436e26 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Thu, 28 Mar 2019 18:15:34 +0100 Subject: [PATCH 3/3] Remove broken PATH setting - It didn't work because it looked into /tmp/4/ instead of /tmp/3/ - Fixing that doesn't help, because project/scripts/sbt is not meant to be in the PATH: the script will try to run `sbt` to find the real sbt launcher, so if it is itself in the PATH we end up with an infinite loop. --- .drone.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 98cfbb390101..d9d9d223b88a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -40,7 +40,6 @@ pipeline: commands: - cp -R . /tmp/3/ && cd /tmp/3/ - git submodule update --init --recursive --jobs 7 - - export PATH=/tmp/4/project/scripts:$PATH - ./project/scripts/sbt community-build/test test_sbt: