From 787150ec10685efd7341b073e4a0df6060a9f69c Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 17 Mar 2021 09:51:06 -0700 Subject: [PATCH] Travis-CI: use standardized JDK+sbt setup The issue here is that by default, Travis-CI has an outdated sbt-extras script that doesn't work with sbt 1.4.8+. A more minimal fix would be to add the workaround suggested in the sbt 1.4.8 and 1.4.9 release notes. But down that path lies further hand-maintenance. I think it's better to use the Travis-CI stuff in the scala-dev repo, which is maintained by the Scala team at lightbend. It handles JDK installation (via SDKMAN not Jabba), addresses the sbt 1.4.8+ issue (and will address any other such issues that arise in the future), and handles caching, too. --- .travis.yml | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index b195954f..26578d0a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ version: ~> 1.0 +import: scala/scala-dev:travis/default.yml + language: scala git: @@ -6,7 +8,7 @@ git: env: matrix: - - TRAVIS_JDK=11 + - ADOPTOPENJDK=11 global: # encrypt with: travis encrypt --pro BINTRAY_USER=... @@ -14,10 +16,6 @@ env: # encrypt with: travis encrypt --pro BINTRAY_PASS=... - secure: "XHaF/fAX2H78Bc/5+nyQkSYLQfRX17SP4xBjF15iTxr9v9F2P0KxqsZ4qng2xHaQeUN122iXssOaZviQo4W+Z/o9FqoLXuUq9ukMol48RCFQjJXXnNNmdLmivetOJXOogAu9hHcRTeOoZ197RovIKbgnHIiavicsA3HMPNtm/bw=" - -before_install: curl -Ls https://raw.githubusercontent.com/shyiko/jabba/0.11.2/install.sh | bash && . ~/.jabba/jabba.sh -install: jabba install "adopt@~1.$TRAVIS_JDK.0-0" && jabba use "$_" && java -Xmx32m -version - jobs: include: - stage: test @@ -28,25 +26,25 @@ jobs: script: scripts/test-code.sh env: - TRAVIS_SCALA_VERSION=2.12.13 - - TRAVIS_JDK=11 + - ADOPTOPENJDK=11 - name: "Run tests with Scala 2.13 and AdoptOpenJDK 11" script: scripts/test-code.sh env: - TRAVIS_SCALA_VERSION=2.13.5 - - TRAVIS_JDK=11 + - ADOPTOPENJDK=11 - name: "Run tests with Scala 2.12 and AdoptOpenJDK 8" script: scripts/test-code.sh env: - TRAVIS_SCALA_VERSION=2.12.13 - - TRAVIS_JDK=8 + - ADOPTOPENJDK=8 - name: "Run tests with Scala 2.13 and AdoptOpenJDK 8" script: scripts/test-code.sh env: - TRAVIS_SCALA_VERSION=2.13.5 - - TRAVIS_JDK=8 + - ADOPTOPENJDK=8 - stage: docs script: scripts/validate-docs.sh @@ -63,19 +61,6 @@ stages: # Snapshots from Bintray are picked up by a scheduled build on Lightbend's Vegemite if: ((branch = master AND type = push) OR (tag IS present)) AND NOT fork -cache: - directories: - - "$HOME/.cache/coursier" - - "$HOME/.ivy2/cache" - - "$HOME/.jabba/jdk" - - "$HOME/.sbt" - -before_cache: - - rm -rf $HOME/.ivy2/cache/com.typesafe.play/twirl* - - rm -rf $HOME/.ivy2/cache/scala_*/sbt_*/com.typesafe.sbt/sbt-twirl - - find $HOME/.ivy2 -name "ivydata-*.properties" -delete - - find $HOME/.sbt -name "*.lock" -delete - notifications: webhooks: urls: https://webhooks.gitter.im/e/d2c8a242a2615f659595