Skip to content

Commit 942b45b

Browse files
Fix #5055: Run tests with Java 11
1 parent b34ea5d commit 942b45b

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.drone.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ pipeline:
4242
- git submodule update --init --recursive --jobs 7
4343
- ./project/scripts/sbt community-build/test
4444

45+
test_bootstrapped_java11:
46+
group: test
47+
image: lampepfl/dotty:2019-04-22
48+
commands:
49+
- export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/"
50+
- cp -R . /tmp/6/ && cd /tmp/6/
51+
- ./project/scripts/sbt ";compile ;test"
52+
# when:
53+
# event: [ push, tag, deployment ]
54+
4555
test_sbt:
4656
group: test
4757
image: lampepfl/dotty:2019-04-22

project/scripts/sbt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ set -e
66

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

9+
if [ -z "$JAVA_HOME" ]; then
10+
SET_JAVA_VERSION=""
11+
else
12+
SET_JAVA_VERSION="-java-home"
13+
fi
14+
915
# run sbt with the supplied arg
1016
sbt -J-Xmx4096m \
1117
-J-XX:ReservedCodeCacheSize=512m \
1218
-J-XX:MaxMetaspaceSize=1024m \
1319
-Ddotty.drone.mem=4096m \
1420
-Dsbt.ivy.home=/var/cache/drone/ivy2 \
1521
-no-colors \
22+
"$SET_JAVA_VERSION" "$JAVA_HOME" \
1623
"$CMD"

0 commit comments

Comments
 (0)