Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix doctest plugin / use same command for release and travis build #1322

Merged
merged 6 commits into from
Aug 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ lazy val commonJsSettings = Seq(
// Only used for scala.js for now
botBuild := scala.sys.env.get("TRAVIS").isDefined,
// batch mode decreases the amount of memory needed to compile scala.js code
scalaJSOptimizerOptions := scalaJSOptimizerOptions.value.withBatchMode(botBuild.value)
scalaJSOptimizerOptions := scalaJSOptimizerOptions.value.withBatchMode(botBuild.value),
doctestGenTests := Seq.empty
)

lazy val commonJvmSettings = Seq(
Expand Down Expand Up @@ -188,6 +189,7 @@ lazy val catsJS = project.in(file(".catsJS"))
.enablePlugins(ScalaJSPlugin)



lazy val macros = crossProject.crossType(CrossType.Pure)
.settings(moduleName := "cats-macros")
.settings(catsSettings:_*)
Expand Down Expand Up @@ -293,6 +295,7 @@ lazy val js = project
.settings(commonJsSettings:_*)
.enablePlugins(ScalaJSPlugin)


// cats-jvm is JVM-only
lazy val jvm = project
.dependsOn(macrosJVM, coreJVM, testsJVM % "test-internal -> test")
Expand Down Expand Up @@ -383,13 +386,17 @@ lazy val publishSettings = Seq(
) ++ credentialSettings ++ sharedPublishSettings ++ sharedReleaseProcess

// These aliases serialise the build for the benefit of Travis-CI.
addCommandAlias("buildJVM", ";macrosJVM/compile;coreJVM/compile;kernelLawsJVM/compile;lawsJVM/compile;freeJVM/compile;kernelLawsJVM/test;coreJVM/test;testsJVM/test;freeJVM/test;jvm/test;bench/test")
addCommandAlias("buildJVM", "catsJVM/test")

addCommandAlias("validateJVM", ";scalastyle;buildJVM;makeSite")

addCommandAlias("validateJS", ";macrosJS/compile;kernelJS/compile;coreJS/compile;kernelLawsJS/compile;lawsJS/compile;kernelLawsJS/test;testsJS/test;js/test")
addCommandAlias("validateJS", ";catsJS/compile;testsJS/test;js/test")

addCommandAlias("validateKernelJS", "kernelLawsJS/test")

addCommandAlias("validateFreeJS", "freeJS/test") //separated due to memory constraint on travis

addCommandAlias("validate", ";clean;validateJS;validateJVM")
addCommandAlias("validate", ";clean;validateJS;validateKernelJS;validateFreeJS;validateJVM")

////////////////////////////////////////////////////////////////////////////////////////////////////
// Base Build Settings - Should not need to edit below this line.
Expand Down Expand Up @@ -469,8 +476,8 @@ lazy val sharedReleaseProcess = Seq(
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
//runClean, // disabled to reduce memory usage during release
//runTest, // temporarily disabled for 0.7.0
runClean,
releaseStepCommand("validate"),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
Expand Down
11 changes: 5 additions & 6 deletions scripts/travis-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ fi

sbt_cmd="sbt ++$TRAVIS_SCALA_VERSION"

coverage="$sbt_cmd coverage validateJVM coverageReport && codecov"


scala_js="$sbt_cmd macrosJS/compile coreJS/compile lawsJS/compile && $sbt_cmd kernelLawsJS/test && $sbt_cmd testsJS/test && $sbt_cmd js/test"
scala_jvm="$sbt_cmd validateJVM"
js="$sbt_cmd validateJS"
kernel_js="$sbt_cmd validateKernelJS"
free_js="$sbt_cmd validateFreeJS"
jvm="$sbt_cmd coverage validateJVM coverageReport && codecov"

run_cmd="$coverage && $scala_js && $scala_jvm $publish_cmd"
run_cmd="$js && $free_js && $kernel_js && $jvm && $sbt_cmd $publish_cmd"

eval $run_cmd