From 942b45b697059e4fb3f8d1aea14ae01c1efc1765 Mon Sep 17 00:00:00 2001 From: Olivier Blanvillain Date: Wed, 8 May 2019 14:00:00 +0200 Subject: [PATCH] Fix #5055: Run tests with Java 11 --- .drone.yml | 10 ++++++++++ project/scripts/sbt | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/.drone.yml b/.drone.yml index de8559f872fe..a38ef7a242c1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -42,6 +42,16 @@ pipeline: - git submodule update --init --recursive --jobs 7 - ./project/scripts/sbt community-build/test + test_bootstrapped_java11: + group: test + image: lampepfl/dotty:2019-04-22 + commands: + - export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/" + - cp -R . /tmp/6/ && cd /tmp/6/ + - ./project/scripts/sbt ";compile ;test" + # when: + # event: [ push, tag, deployment ] + test_sbt: group: test image: lampepfl/dotty:2019-04-22 diff --git a/project/scripts/sbt b/project/scripts/sbt index 957b229128d1..ed8c1f9a7443 100755 --- a/project/scripts/sbt +++ b/project/scripts/sbt @@ -6,6 +6,12 @@ set -e CMD="${1:?Missing sbt command}" +if [ -z "$JAVA_HOME" ]; then + SET_JAVA_VERSION="" +else + SET_JAVA_VERSION="-java-home" +fi + # run sbt with the supplied arg sbt -J-Xmx4096m \ -J-XX:ReservedCodeCacheSize=512m \ @@ -13,4 +19,5 @@ sbt -J-Xmx4096m \ -Ddotty.drone.mem=4096m \ -Dsbt.ivy.home=/var/cache/drone/ivy2 \ -no-colors \ + "$SET_JAVA_VERSION" "$JAVA_HOME" \ "$CMD"