From d16785152667f5f77381e06b94ad81c13ee2dd4e Mon Sep 17 00:00:00 2001 From: Stew O'Connor Date: Sun, 25 Sep 2016 23:13:09 -0700 Subject: [PATCH] go back to how we used to build, now that perhaps I know how to travis better --- .jvmopts | 11 ----------- build.sbt | 19 ++++++++----------- scripts/travis-build.sh | 5 ++--- tests/src/test/scala/DogsSuite.scala | 13 +++++-------- tests/src/test/scala/StreamingTests.scala | 2 +- 5 files changed, 16 insertions(+), 34 deletions(-) delete mode 100644 .jvmopts diff --git a/.jvmopts b/.jvmopts deleted file mode 100644 index 53602da5..00000000 --- a/.jvmopts +++ /dev/null @@ -1,11 +0,0 @@ -# see https://weblogs.java.net/blog/kcpeppe/archive/2013/12/11/case-study-jvm-hotspot-flags --Dfile.encoding=UTF8 --Xms1G --Xmx3G --XX:ReservedCodeCacheSize=250M --XX:+TieredCompilation --XX:-UseGCOverheadLimit -# effectively adds GC to Perm space --XX:+CMSClassUnloadingEnabled -# must be enabled for CMSClassUnloadingEnabled to work --XX:+UseConcMarkSweepGC diff --git a/build.sbt b/build.sbt index e0ee407b..dae34313 100644 --- a/build.sbt +++ b/build.sbt @@ -8,23 +8,23 @@ scalaVersion in Global := "2.11.8" resolvers in Global += Resolver.sonatypeRepo("snapshots") -lazy val dogs = project.in(file(".")).aggregate(dogsJVM/*, dogsJS*/).settings(noPublishSettings) +lazy val dogs = project.in(file(".")).aggregate(dogsJVM, dogsJS).settings(noPublishSettings) lazy val dogsJVM = project.aggregate(coreJVM, docs, testsJVM, bench).settings(noPublishSettings) -// lazy val dogsJS = project.aggregate(coreJS, testsJS).settings(noPublishSettings) +lazy val dogsJS = project.aggregate(coreJS, testsJS).settings(noPublishSettings) lazy val core = crossProject.crossType(CrossType.Pure) -// .jsSettings(commonJsSettings:_*) + .jsSettings(commonJsSettings:_*) lazy val coreJVM = core.jvm.settings(publishSettings) -// lazy val coreJS = core.js.settings(noPublishSettings) +lazy val coreJS = core.js.settings(publishSettings) lazy val tests = crossProject.crossType(CrossType.Pure) dependsOn core -// .jsSettings(commonJsSettings:_*) + .jsSettings(commonJsSettings:_*) lazy val testsJVM = tests.jvm.settings(noPublishSettings) -// lazy val testsJS = tests.js.settings(noPublishSettings) +lazy val testsJS = tests.js.settings(noPublishSettings) lazy val docs = project.dependsOn(coreJVM).settings(noPublishSettings) @@ -32,7 +32,6 @@ lazy val bench = project.dependsOn(coreJVM).settings(noPublishSettings) lazy val botBuild = settingKey[Boolean]("Build by TravisCI instead of local dev environment") -/* lazy val commonJsSettings = Seq( scalaJSStage in Global := FastOptStage, parallelExecution := false, @@ -45,16 +44,14 @@ lazy val commonJsSettings = Seq( // batch mode decreases the amount of memory needed to compile scala.js code scalaJSOptimizerOptions := scalaJSOptimizerOptions.value.withBatchMode(botBuild.value) ) - */ addCommandAlias("buildJVM", ";coreJVM/compile;coreJVM/test;testsJVM/test;bench/test") addCommandAlias("validateJVM", ";scalastyle;buildJVM;makeSite") -//addCommandAlias("validateJS", ";coreJS/compile;testsJS/test") +addCommandAlias("validateJS", ";coreJS/compile;testsJS/test") -//addCommandAlias("validate", ";validateJS;validateJVM") -addCommandAlias("validate", ";validateJVM") +addCommandAlias("validate", ";validateJS;validateJVM") addCommandAlias("gitSnapshots", ";set version in ThisBuild := git.gitDescribedVersion.value.get + \"-SNAPSHOT\"") diff --git a/scripts/travis-build.sh b/scripts/travis-build.sh index 4304184e..496261c1 100755 --- a/scripts/travis-build.sh +++ b/scripts/travis-build.sh @@ -9,8 +9,7 @@ fi coverage="$sbt_cmd coverage validateJVM coverageReport && bash <(curl -s https://codecov.io/bash)" scala_js="$sbt_cmd coreJS/compile" # && $sbt_cmd testsJS/test" -scala_jvm="$sbt_cmd coreJVM/compile" +scala_jvm="$sbt_cmd validateJVM" -# run_cmd="$coverage && $scala_js && $scala_jvm $publish_cmd" -run_cmd="$coverage && $scala_jvm $publish_cmd" +run_cmd="$coverage && $scala_js && $scala_jvm $publish_cmd" eval $run_cmd diff --git a/tests/src/test/scala/DogsSuite.scala b/tests/src/test/scala/DogsSuite.scala index 68269683..1a9a380f 100644 --- a/tests/src/test/scala/DogsSuite.scala +++ b/tests/src/test/scala/DogsSuite.scala @@ -7,7 +7,7 @@ import catalysts.Platform import cats._ -import org.scalatest.{BeforeAndAfterAll, FunSuite, PropSpec, Matchers} +import org.scalatest.{FunSuite, PropSpec, Matchers} import org.scalatest.prop.{Configuration, GeneratorDrivenPropertyChecks} import org.typelevel.discipline.scalatest.Discipline @@ -18,25 +18,22 @@ import scala.util.{Failure, Success, Try} trait TestSettings extends Configuration with Matchers { lazy val checkConfiguration: PropertyCheckConfiguration = -/* if (Platform.isJvm) + if (Platform.isJvm) if(scala.sys.env.get("TRAVIS").isDefined) - PropertyCheckConfiguration(minSuccessful = 3, maxDiscardedFactor = 10F, minSize = 0, sizeRange = 10, workers = 4) + PropertyCheckConfiguration(minSuccessful = 3, maxDiscardedFactor = 500F, minSize = 0, sizeRange = 50, workers = 4) else PropertyCheckConfiguration(minSuccessful = 100, maxDiscardedFactor = 500F, minSize = 0, sizeRange = 100, workers = 4) else - */ PropertyCheckConfiguration(minSuccessful = 1, maxDiscardedFactor = 10F, minSize = 0, sizeRange = 3, workers = 4) lazy val slowCheckConfiguration: PropertyCheckConfiguration = -/* if (Platform.isJvm) if(scala.sys.env.get("TRAVIS").isDefined) - PropertyCheckConfiguration(minSuccessful = 3, maxDiscardedFactor = 10F, minSize = 0, sizeRange = 5, workers = 4) + PropertyCheckConfiguration(minSuccessful = 3, maxDiscardedFactor = 500F, minSize = 0, sizeRange = 5, workers = 4) else PropertyCheckConfiguration(minSuccessful = 10, maxDiscardedFactor = 500F, minSize = 0, sizeRange = 100, workers = 4) else - */ - PropertyCheckConfiguration(minSuccessful = 1, maxDiscardedFactor = 10F, minSize = 0, sizeRange = 3, workers = 8) + PropertyCheckConfiguration(minSuccessful = 1, maxDiscardedFactor = 10F, minSize = 0, sizeRange = 3, workers = 4) } trait DogsSuite extends FunSuite diff --git a/tests/src/test/scala/StreamingTests.scala b/tests/src/test/scala/StreamingTests.scala index 8484bcb3..eb0b3a5d 100644 --- a/tests/src/test/scala/StreamingTests.scala +++ b/tests/src/test/scala/StreamingTests.scala @@ -52,7 +52,7 @@ class StreamingTests extends DogsSuite { } } -class AdHocStreamingTests extends SlowDogsSuite { +class AdHocStreamingTests extends DogsSuite { implicit val ex0: Eq[(Int,Int)] = eqTuple2[Int,Int] implicit val ex1: Eq[(List[Int],List[Int])] = eqTuple2[List[Int],List[Int]]