Skip to content

Commit

Permalink
sbt 1.13.3, latest JDKs, latest test libs, fewer CI steps (#2412)
Browse files Browse the repository at this point in the history
  • Loading branch information
ennru committed Sep 16, 2020
1 parent 3f9220b commit d1d41d3
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 29 deletions.
31 changes: 14 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
language: scala
sudo: false

services:
- docker

before_install:
# make comparing to origin/master work and fetch full history for correct current and previous version detection
- git remote set-branches --add origin master && git fetch --unshallow
# make comparing to origin/master work and fetch full history for correct current and previous version detection
git:
depth: 500

# using jabba for custom jdk management (see ./scripts/build.sh)

# default script for jobs, that do not have any specified
script: ./scripts/travis.sh

jobs:
include:
- stage: check
script: sbt verifyCodeStyle
name: "Code style check. Run locally with: sbt verifyCodeStyle"
env: CMD="verifyCodeStyle; mimaReportBinaryIssues"
name: "Code style check and MiMa. Run locally with: sbt verifyCodeStyle; mimaReportBinaryIssues"
if: type != cron
- env: CMD="++2.11.12 Test/compile"
name: "Compile all code with Scala 2.11"
if: type != cron
- env: CMD="++2.12.11 Test/compile"
name: "Compile all code with Scala 2.12 and fatal warnings enabled. Run locally with: env CI=true sbt ++2.12.11 Test/compile"
- env: CMD="++2.13.2 Test/compile"
- env: CMD="++2.13.3 Test/compile"
name: "Compile all code with Scala 2.13"
- env: CMD="unidoc"
name: "Create all API docs"
- env: CMD="docs/paradox"
name: "Create site with Paradox"
- env: CMD="mimaReportBinaryIssues"
name: "Check binary compatibility (MiMa)"
- env: CMD="unidoc; docs/paradox"
name: "Create all API docs and create site with Paradox"

- stage: test
name: amqp
Expand Down Expand Up @@ -130,7 +128,7 @@ jobs:
- name: "Publish artifacts for Scala 2.12"
env: CMD="++2.12.11 publish"
- name: "Publish artifacts for Scala 2.13"
env: CMD="++2.13.2 publish"
env: CMD="++2.13.3 publish"
- script: openssl aes-256-cbc -K $encrypted_bbf1dc4f2a07_key -iv $encrypted_bbf1dc4f2a07_iv -in .travis/travis_alpakka_rsa.enc -out .travis/id_rsa -d && eval "$(ssh-agent -s)" && chmod 600 .travis/id_rsa && ssh-add .travis/id_rsa && sbt -jvm-opts .jvmopts-travis docs/publishRsync
name: "Publish API and reference documentation"

Expand Down Expand Up @@ -163,9 +161,8 @@ cache:
directories:
- $HOME/.cache/coursier
- $HOME/.ivy2/cache
- $HOME/.sbt/boot
- $HOME/.sbt/launchers
- $HOME/.jabba/jdk
- $HOME/.sbt
- $HOME/.jabba
timeout: 900

addons:
Expand Down
18 changes: 10 additions & 8 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ object Dependencies {

val CronBuild = sys.env.get("TRAVIS_EVENT_TYPE").contains("cron")

val Scala211 = "2.11.12"
val Scala212 = "2.12.11"
val Scala213 = "2.13.2"
val Scala211 = "2.11.12" // update even 2 places in .travis.yml
val Scala212 = "2.12.11" // update even 2 places in .travis.yml
val Scala213 = "2.13.3" // update even 2 places in .travis.yml
val ScalaVersions = Seq(Scala212, Scala211, Scala213).filterNot(_ == Scala211 && CronBuild)

val Akka25Version = "2.5.31"
Expand All @@ -25,7 +25,8 @@ object Dependencies {
val AkkaHttp102 = "10.2.0"
val AkkaHttpVersion = if (CronBuild) AkkaHttp102 else AkkaHttp101
val AkkaHttpBinaryVersion = if (CronBuild) "10.2" else "10.1"
val mockitoVersion = "3.1.0"
val ScalaTestVersion = "3.2.2"
val mockitoVersion = "3.4.6" // check even https://github.com/scalatest/scalatestplus-mockito/releases

val CouchbaseVersion = "2.7.13"
val CouchbaseVersionForDocs = "2.7"
Expand All @@ -39,7 +40,7 @@ object Dependencies {
// This is only compile time dependency, therefore it does not affect the generated bytecode
// https://github.com/ghik/silencer
val Silencer = {
val Version = "1.7.0"
val Version = "1.7.1"
Seq(
compilerPlugin("com.github.ghik" % "silencer-plugin" % Version cross CrossVersion.full),
"com.github.ghik" % "silencer-lib" % Version % Provided cross CrossVersion.full
Expand All @@ -55,12 +56,12 @@ object Dependencies {

val testkit = Seq(
libraryDependencies := Seq(
"org.scala-lang.modules" %% "scala-collection-compat" % "2.1.1",
"org.scala-lang.modules" %% "scala-collection-compat" % "2.2.0",
"com.typesafe.akka" %% "akka-stream" % AkkaVersion,
"com.typesafe.akka" %% "akka-stream-testkit" % AkkaVersion,
"com.typesafe.akka" %% "akka-slf4j" % AkkaVersion,
"ch.qos.logback" % "logback-classic" % "1.2.3", // Eclipse Public License 1.0
"org.scalatest" %% "scalatest" % "3.1.0", // ApacheV2
"org.scalatest" %% "scalatest" % ScalaTestVersion,
"com.novocode" % "junit-interface" % "0.11", // BSD-style
"ch.qos.logback" % "logback-classic" % "1.2.3", // Eclipse Public License 1.0
"junit" % "junit" % "4.13" // Eclipse Public License 1.0
Expand All @@ -69,7 +70,8 @@ object Dependencies {

val Mockito = Seq(
"org.mockito" % "mockito-core" % mockitoVersion % Test,
"org.scalatestplus" %% "mockito-1-10" % "3.1.0.0" % Test
// https://github.com/scalatest/scalatestplus-mockito/releases
"org.scalatestplus" %% "mockito-3-4" % (ScalaTestVersion + ".0") % Test
)

// Releases https://github.com/FasterXML/jackson-databind/releases
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.3.9
sbt.version=1.3.13
6 changes: 3 additions & 3 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ set -x
PRE_CMD=$1
CMD=$2

[ "$TRAVIS_EVENT_TYPE" == "cron" ] && JDK="adopt@~1.11.0-4" || JDK="adopt@~1.8.0-222"
[ "$TRAVIS_EVENT_TYPE" == "cron" ] && JDK="adopt@~1.11-0" || JDK="adopt@~1.8-0"

# using jabba for custom jdk management
curl -sL https://raw.githubusercontent.com/shyiko/jabba/0.11.2/install.sh | bash
if [ ! -f ~/.jabba/jabba.sh ]; then curl -L -v --retry 5 -o jabba-install.sh https://raw.githubusercontent.com/shyiko/jabba/0.11.2/install.sh && bash jabba-install.sh; fi
. ~/.jabba/jabba.sh
jabba install "$JDK"
jabba use "$JDK"
java -version
$PRE_CMD

sbt -jvm-opts .jvmopts-travis "$CMD"
sbt -jvm-opts .jvmopts-travis "$CMD"

0 comments on commit d1d41d3

Please sign in to comment.