Skip to content

Commit 6842ed2

Browse files
committed
Use AdoptOpenJDK JDK 8 and 11
1 parent 2234e39 commit 6842ed2

File tree

2 files changed

+26
-16
lines changed

2 files changed

+26
-16
lines changed

.travis.yml

+25-15
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
language: scala
1+
dist: xenial
2+
group: stable
23

3-
jdk:
4-
- openjdk8
5-
- openjdk11
4+
language: scala
65

76
scala:
87
- 2.12.8
@@ -19,20 +18,30 @@ env:
1918
- secure: "Xw7rI/qlML1nD2e2XwlakkhKAWNGZKqqE+Q3ntTvFpfHryl7KLCvVzJ4LIavnL6kGJaWOgy9vlSoEWn5g9nqHSfE31C/k5pY5nTMAKiwiJzfAS+r0asKXW2gmKhwtcTBkqyLVOZLCJSPVlFRQyfBJHY+Fs0L3KWcnMQgtBlyDhU="
2019
matrix:
2120
# The empty SCALAJS_VERSION will only compile for the JVM
22-
- SCALAJS_VERSION=
23-
- SCALAJS_VERSION=0.6.28
24-
- SCALAJS_VERSION=1.0.0-M8
21+
- SCALAJS_VERSION= ADOPTOPENJDK=8
22+
- SCALAJS_VERSION=0.6.28 ADOPTOPENJDK=8
23+
- SCALAJS_VERSION=1.0.0-M8 ADOPTOPENJDK=8
24+
- SCALAJS_VERSION= ADOPTOPENJDK=11
2525

2626
matrix:
2727
exclude:
28-
- jdk: openjdk11
29-
env: SCALAJS_VERSION=0.6.28
30-
- jdk: openjdk11
31-
env: SCALAJS_VERSION=1.0.0-M8
3228
- scala: 0.15.0-RC1
33-
env: SCALAJS_VERSION=0.6.28
29+
env: SCALAJS_VERSION=0.6.28 ADOPTOPENJDK=8
3430
- scala: 0.15.0-RC1
35-
env: SCALAJS_VERSION=1.0.0-M8
31+
env: SCALAJS_VERSION=1.0.0-M8 ADOPTOPENJDK=8
32+
33+
before_install:
34+
# adding $HOME/.sdkman to cache would create an empty directory, which interferes with the initial installation
35+
- "[[ -d /home/travis/.sdkman/ ]] && [[ -d /home/travis/.sdkman/bin/ ]] || rm -rf /home/travis/.sdkman/"
36+
- curl -sL https://get.sdkman.io | bash
37+
- echo sdkman_auto_answer=true > /home/travis/.sdkman/etc/config
38+
- source "/home/travis/.sdkman/bin/sdkman-init.sh"
39+
40+
install:
41+
- sdk install java $(sdk list java | grep -o "$ADOPTOPENJDK\.[0-9\.]*hs-adpt" | tail -1)
42+
- unset _JAVA_OPTIONS
43+
- unset JAVA_HOME
44+
- java -Xmx32m -version
3645

3746
script:
3847
- admin/build.sh
@@ -42,5 +51,6 @@ before_cache:
4251
- find $HOME/.ivy2/cache -name "ivydata-*.properties" | xargs rm
4352
cache:
4453
directories:
45-
- $HOME/.ivy2/cache
46-
- $HOME/.sbt
54+
- $HOME/.ivy2/cache
55+
- $HOME/.sbt
56+
- $HOME/.sdkman

admin/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ set -e
1616
# of the existing tag. Then a new tag can be created for that commit, e.g., `v1.2.3#2.13.0-M5`.
1717
# Everything after the `#` in the tag name is ignored.
1818

19-
if [[ "$TRAVIS_JDK_VERSION" == "openjdk8" && "$TRAVIS_SCALA_VERSION" =~ 2\.1[23]\..* ]]; then
19+
if [[ "$ADOPTOPENJDK" == "8" && "$TRAVIS_SCALA_VERSION" =~ 2\.1[23]\..* ]]; then
2020
RELEASE_COMBO=true;
2121
fi
2222

0 commit comments

Comments
 (0)