diff --git a/.travis.yml b/.travis.yml index 30e14c9509..e4f8ac6a31 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ env: global: - secure: Kf44XQFpq2QGe3rn98Dsf5Uz3WXzPDralS54co7sqT5oQGs1mYLYZRYz+I75ZSo5ffZ86H7M+AI9YFofqGwAjBixBbqf1tGkUh3oZp2fN3QfqzazGV3HzC+o41zALG5FL+UBaURev9ChQ5fYeTtFB7YAzejHz4y5E97awk934Rg= - secure: QbNAu0jCaKrwjJi7KZtYEBA/pYbTJ91Y1x/eLAJpsamswVOvwnThA/TLYuux+oiZQCiDUpBzP3oxksIrEEUAhl0lMtqRFY3MrcUr+si9NIjX8hmoFwkvZ5o1b7pmLF6Vz3rQeP/EWMLcljLzEwsrRXeK0Ei2E4vFpsg8yz1YXJg= + - CATS_BOT_BUILD=true cache: directories: - $HOME/.sbt/0.13/dependency diff --git a/build.sbt b/build.sbt index 51e15edba7..14dfe856c7 100644 --- a/build.sbt +++ b/build.sbt @@ -5,6 +5,8 @@ import sbtunidoc.Plugin.UnidocKeys._ import ReleaseTransformations._ import ScoverageSbtPlugin._ +lazy val botBuild = settingKey[Boolean]("Jenkins/TravisCI build mode") + lazy val scoverageSettings = Seq( ScoverageKeys.coverageMinimum := 60, ScoverageKeys.coverageFailOnMinimum := false, @@ -55,7 +57,11 @@ lazy val commonJsSettings = Seq( s"-P:scalajs:mapSourceURI:$a->$g/" }, scalaJSStage in Global := FastOptStage, - parallelExecution := false + parallelExecution := false, + // Only use for scala.js for now + botBuild := sys.props.getOrElse("CATS_BOT_BUILD", default="false") == "true", + // batch mode decreases the amount of memory needed to compile scala.js code + scalaJSOptimizerOptions := scalaJSOptimizerOptions.value.withBatchMode(botBuild.value) ) lazy val commonJvmSettings = Seq(