Skip to content

Commit

Permalink
Fix scala#5055: Run tests with Java 11
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierBlanvillain committed May 9, 2019
1 parent b34ea5d commit 050264b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ pipeline:
when:
event: [ push, tag, deployment ]

test_java11:
group: test
image: lampepfl/dotty:2019-04-22
commands:
- export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/"
- export PATH="$JAVA_HOME:$PATH"
- cp -R . /tmp/6/ && cd /tmp/6/
- ./project/scripts/sbt ";compile ;test"
# when:
# event: [ push, tag, deployment ]

# DOCUMENTATION:
documentation:
image: lampepfl/dotty:2019-04-22
Expand Down
7 changes: 7 additions & 0 deletions project/scripts/sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ set -e

CMD="${1:?Missing sbt command}"

if [ -z "$JAVA_HOME" ]; then
SET_JAVA_VERSION=""
else
SET_JAVA_VERSION="-java-home $JAVA_HOME"
fi

# run sbt with the supplied arg
sbt -J-Xmx4096m \
-J-XX:ReservedCodeCacheSize=512m \
-J-XX:MaxMetaspaceSize=1024m \
-Ddotty.drone.mem=4096m \
-Dsbt.ivy.home=/var/cache/drone/ivy2 \
-no-colors \
"$SET_JAVA_VERSION" \
"$CMD"

0 comments on commit 050264b

Please sign in to comment.