Skip to content

Commit

Permalink
Merge pull request typelevel#251 from imarios/split_travis_jobs
Browse files Browse the repository at this point in the history
[Final] Decomposing single-job build into three stages, each having 50 minutes to complete
  • Loading branch information
OlivierBlanvillain authored Feb 19, 2018
2 parents 6aca77e + 647f413 commit 652fa18
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 11 deletions.
15 changes: 13 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
language: scala
sudo: false
scala:
- 2.11.12
- 2.11.12

sbt_args: "-J-Xmx2G"

jobs:
include:
- stage: Documentation
env: PHASE=A
- stage: Unit Tests
env: PHASE=B
- stage: Publish
env: PHASE=C

script:
- travis_wait 65 scripts/travis-publish.sh
- scripts/travis-publish.sh

after_script:
- find $HOME/.sbt -name "*.lock" | xargs rm
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm

Expand Down
6 changes: 4 additions & 2 deletions dataset/src/test/scala/frameless/TypedDatasetSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ trait SparkTesting { self: BeforeAndAfterAll =>

class TypedDatasetSuite extends FunSuite with Checkers with BeforeAndAfterAll with SparkTesting {
// Limit size of generated collections and number of checks because Travis
implicit override val generatorDrivenConfig =
PropertyCheckConfiguration(sizeRange = PosZInt(10), minSize = PosZInt(10))
implicit override val generatorDrivenConfig = {
val i: PosZInt = scala.util.Properties.envOrNone("CI").fold(PosZInt(100))(_ => PosZInt(10))
PropertyCheckConfiguration(sizeRange = i, minSize = i)
}

implicit val sparkDelay: SparkDelay[Job] = Job.framelessSparkDelayForJob

Expand Down
20 changes: 13 additions & 7 deletions scripts/travis-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ export publish_cmd="publishLocal"

sbt_cmd="sbt ++$TRAVIS_SCALA_VERSION -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M"

test_cmd="$sbt_cmd test"

docs_cmd="$sbt_cmd doc tut"

coverage="$sbt_cmd coverage test && sbt coverageReport && bash <(curl -s https://codecov.io/bash)"

run_cmd="$coverage && $docs_cmd && $test_cmd $publish_cmd"
case "$PHASE" in
A)
docs_cmd="$sbt_cmd doc tut"
run_cmd="$docs_cmd"
;;
B)
coverage="$sbt_cmd coverage test && sbt coverageReport && bash <(curl -s https://codecov.io/bash)"
run_cmd="$coverage"
;;
C)
run_cmd="$sbt_cmd clean $publish_cmd"
;;
esac
eval $run_cmd

0 comments on commit 652fa18

Please sign in to comment.