Skip to content

Commit

Permalink
go back to how we used to build, now that perhaps I know how to travi…
Browse files Browse the repository at this point in the history
…s better
  • Loading branch information
stew committed Sep 26, 2016
1 parent e3d34fc commit d167851
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 34 deletions.
11 changes: 0 additions & 11 deletions .jvmopts

This file was deleted.

19 changes: 8 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,30 @@ 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)

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,
Expand All @@ -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\"")

Expand Down
5 changes: 2 additions & 3 deletions scripts/travis-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 5 additions & 8 deletions tests/src/test/scala/DogsSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/src/test/scala/StreamingTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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]]

Expand Down

0 comments on commit d167851

Please sign in to comment.