From 5378076302de94d8db64d00652c89eeacbd2649c Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Thu, 17 Nov 2016 13:02:10 +0100 Subject: Add drone integration --- .drone.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .drone.yml (limited to '.drone.yml') diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 000000000..78fb0f454 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,12 @@ +pipeline: + test: + image: felixmulder/dotty:0.2 + commands: + - ln -s /var/cache/drone/scala-scala scala-scala + - sbt -mem 4096 -ivy /var/cache/drone/ivy2 "${TEST}" + +matrix: + TEST: + - test + - partest-only-no-bootstrap --show-diff --verbose + - partest-only --show-diff --verbose -- cgit v1.2.3 From e5bd55758a4a1fd95fb66a4938d213204adebae6 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Tue, 22 Nov 2016 13:38:10 +0100 Subject: increase threads to 2 in reduced threads cases --- .drone.yml | 1 + compiler/test/dotty/partest/DPConsoleRunner.scala | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to '.drone.yml') diff --git a/.drone.yml b/.drone.yml index 78fb0f454..1a1af8b88 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,3 +10,4 @@ matrix: - test - partest-only-no-bootstrap --show-diff --verbose - partest-only --show-diff --verbose + - scripted diff --git a/compiler/test/dotty/partest/DPConsoleRunner.scala b/compiler/test/dotty/partest/DPConsoleRunner.scala index 06a36f661..363012683 100644 --- a/compiler/test/dotty/partest/DPConsoleRunner.scala +++ b/compiler/test/dotty/partest/DPConsoleRunner.scala @@ -105,9 +105,9 @@ extends SuiteRunner(testSourcePath, fileManager, updateCheck, failed, javaCmdPat val seqResults = if (!sequentialTests.isEmpty) { val savedThreads = sys.props("partest.threads") - sys.props("partest.threads") = "1" + sys.props("partest.threads") = "2" - NestUI.echo(s"## we will run ${sequentialTests.length} tests sequentially") + NestUI.echo(s"## we will run ${sequentialTests.length} tests using ${PartestDefaults.numThreads} thread(s)") val res = super.runTestsForFiles(sequentialTests, kind) if (savedThreads != null) @@ -120,7 +120,7 @@ extends SuiteRunner(testSourcePath, fileManager, updateCheck, failed, javaCmdPat val parResults = if (!parallelTests.isEmpty) { - NestUI.echo(s"## we will run ${parallelTests.length} tests in parallel using ${PartestDefaults.numThreads} threads") + NestUI.echo(s"## we will run ${parallelTests.length} tests in parallel using ${PartestDefaults.numThreads} thread(s)") super.runTestsForFiles(parallelTests, kind) } else Array[TestState]() -- cgit v1.2.3 From e01e970b755e01eeb7307832580780f329a7bd57 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Tue, 22 Nov 2016 15:42:22 +0100 Subject: Propagate memory setting to tests --- .drone.yml | 2 +- project/Build.scala | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to '.drone.yml') diff --git a/.drone.yml b/.drone.yml index 1a1af8b88..ec66d5903 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,7 +3,7 @@ pipeline: image: felixmulder/dotty:0.2 commands: - ln -s /var/cache/drone/scala-scala scala-scala - - sbt -mem 4096 -ivy /var/cache/drone/ivy2 "${TEST}" + - sbt -Ddotty.drone.mem=4096m -ivy /var/cache/drone/ivy2 "${TEST}" matrix: TEST: diff --git a/project/Build.scala b/project/Build.scala index 31cf53cac..1fc707bfe 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -17,6 +17,7 @@ object DottyBuild extends Build { val jenkinsMemLimit = List("-Xmx1500m") val JENKINS_BUILD = "dotty.jenkins.build" + val DRONE_MEM = "dotty.drone.mem" val scalaCompiler = "me.d-d" % "scala-compiler" % "2.11.5-20160322-171045-e19b30b3cd" @@ -335,9 +336,11 @@ object DottyBuild extends Build { path.contains("sbt-interface") } yield "-Xbootclasspath/p:" + path - val travis_build = // propagate if this is a travis build + val ci_build = // propagate if this is a ci build if (sys.props.isDefinedAt(JENKINS_BUILD)) List(s"-D$JENKINS_BUILD=${sys.props(JENKINS_BUILD)}") ::: jenkinsMemLimit + else if (sys.props.isDefinedAt(DRONE_MEM)) + List("-Xmx" + sys.props(DRONE_MEM)) else List() val tuning = @@ -346,7 +349,7 @@ object DottyBuild extends Build { List("-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1") else List() - ("-DpartestParentID=" + pid) :: tuning ::: agentOptions ::: travis_build ::: path.toList + ("-DpartestParentID=" + pid) :: tuning ::: agentOptions ::: ci_build ::: path.toList } ). settings(publishing) @@ -530,12 +533,14 @@ object DottyInjectedPlugin extends AutoPlugin { val fullpath = ("-Xbootclasspath/a:" + bin) :: path.toList // System.err.println("BOOTPATH: " + fullpath) - val travis_build = // propagate if this is a travis build + val ci_build = // propagate if this is a ci build if (sys.props.isDefinedAt(JENKINS_BUILD)) List(s"-D$JENKINS_BUILD=${sys.props(JENKINS_BUILD)}") + else if (sys.props.isDefinedAt(DRONE_MEM)) + List("-Xmx" + sys.props(DRONE_MEM)) else List() - val res = agentOptions ::: travis_build ::: fullpath + val res = agentOptions ::: ci_build ::: fullpath println("Running with javaOptions: " + res) res } -- cgit v1.2.3 From 8253cd055ce00891ee6bd71b42070ffc718c3c76 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Tue, 22 Nov 2016 16:52:21 +0100 Subject: make drone use img with openjdk8 and javadoc --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.drone.yml') diff --git a/.drone.yml b/.drone.yml index ec66d5903..ccd116ea7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,7 @@ pipeline: test: - image: felixmulder/dotty:0.2 + image: felixmulder/dotty:0.1 + pull: true commands: - ln -s /var/cache/drone/scala-scala scala-scala - sbt -Ddotty.drone.mem=4096m -ivy /var/cache/drone/ivy2 "${TEST}" @@ -10,4 +11,3 @@ matrix: - test - partest-only-no-bootstrap --show-diff --verbose - partest-only --show-diff --verbose - - scripted -- cgit v1.2.3