Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use OpenJDK intead of Oracle JDK #1241

Merged
merged 14 commits into from
Jun 24, 2019
53 changes: 35 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: java
language: scala
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice for trying that out! I hope that this works as expected

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this change, we don't need to download sbt ourself. Travis CI will include a sbt

scala: 2.12.7
os: linux
jdk: openjdk8

addons:
apt:
Expand All @@ -16,11 +15,12 @@ cache:
- $HOME/.sbt
- $HOME/.m2
- $HOME/.ivy2
- $GRAALVM_PARENT_DIRECTORY
- $HOME/.jabba

env:
global:
- GRAALVM_PARENT_DIRECTORY: ${HOME}/.local/share
- TRAVIS_JDK=zulu@1.8.212
- JABBA_HOME=$HOME/.jabba
- COMMIT_AUTHOR_EMAIL: "sbt-native-packager@muki.rocks"
- RELEASE_BRANCH: master
- secure: bK5zEd2s3y+ScGwuGcxlP0tXx83nvurmF/SWuQSmI0A2KRelipGSSY2BTa+URKk9smJusJIZUi72EqEwMHDhxLCfHomjze5BmpJB5Mr3fQI700nxPEA95cbM4Z1G9+K6fYWy2pi5S7Xmz1Sg07bP4sfzyVYlNB20aquLCmB9Llk=
Expand All @@ -33,12 +33,16 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then
brew update;
brew install xz;
brew install sbt;
fi

before_script:
- .travis/download-sbt
- .travis/download-graalvm
- if [[ "$TRAVIS_OS_NAME" = "linux" ]] || [[ "$TRAVIS_OS_NAME" = "osx" ]]; then
wget -qO- https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh;
$JABBA_HOME/bin/jabba install $TRAVIS_JDK;
fi
- if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then
export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK" && export PATH="$JAVA_HOME/bin:$PATH" && java -version;
elif [[ "$TRAVIS_OS_NAME" = "osx" ]]; then
export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK/Contents/Home" && export PATH="$JAVA_HOME/bin:$PATH" && java -version;
fi

# job definitions

Expand All @@ -52,7 +56,11 @@ jobs:
script: sbt "^validateUniversal"
if: type = pull_request OR (type = push AND branch = master)
name: "scripted universal tests"
- script: sbt "^validateGraalVMNativeImage"
- script: |
$JABBA_HOME/bin/jabba install graalvm@19.0.0
export JAVA_HOME="$JABBA_HOME/jdk/graalvm@19.0.0" && export PATH="$JAVA_HOME/bin:$PATH" && java -version
gu install native-image
sbt "^validateGraalVMNativeImage"
if: type = pull_request OR (type = push AND branch = master)
name: "scripted GraalVM native-image tests"
- script: sbt "^validateJar"
Expand All @@ -73,28 +81,37 @@ jobs:
- script: sbt "^validateDockerUnit"
name: "scripted docker unit-tests"
if: type = pull_request OR (type = push AND branch = master)
- script: sbt "^validateJdkPackagerTravis"
# below will install ZuluFX OpenJFX
- script: |
wget https://cdn.azul.com/zulu/bin/zulu8.38.0.13-ca-fx-jdk8.0.212-linux_x64.tar.gz
tar -xvf zulu8.38.0.13-ca-fx-jdk8.0.212-linux_x64.tar.gz -C $JAVA_HOME --strip 1
rm zulu8.38.0.13-ca-fx-jdk8.0.212-linux_x64.tar.gz
sbt "^validateJdkPackagerTravis"
name: "scripted jdk-packager tests"
jdk: oraclejdk10 # jdk11 doesn't ship with javafx which is required by tests
if: type = pull_request OR (type = push AND branch = master)
# docker configuration as described in
# https://docs.travis-ci.com/user/docker/
- script: sbt "^validateJlink"
- script: |
export TRAVIS_JDK=zulu@1.11.0-2
$JABBA_HOME/bin/jabba install $TRAVIS_JDK
export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK" && export PATH="$JAVA_HOME/bin:$PATH" && java -version
sbt "^validateJlink"
name: "scripted jlink tests"
jdk: openjdk11
if: type = pull_request OR (type = push AND branch = master)
- script: sbt "^validateJlink"
- script: |
export TRAVIS_JDK=zulu@1.12.0-1
$JABBA_HOME/bin/jabba install $TRAVIS_JDK
export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK" && export PATH="$JAVA_HOME/bin:$PATH" && java -version
sbt "^validateJlink"
name: "scripted jlink tests"
jdk: openjdk12
if: type = pull_request OR (type = push AND branch = master)
- script: sbt "^validateDocker"
name: "scripted docker integration-tests"1239
name: "scripted docker integration-tests"
if: type = pull_request OR (type = push AND branch = master)
services: docker
sudo: required
- script: sbt "^validateOSX"
name: "scripted osx tests"
jdk: openjdk11
if: type = pull_request OR (type = push AND branch = master)
os: osx
osx_image: xcode8
Expand Down
42 changes: 0 additions & 42 deletions .travis/download-graalvm

This file was deleted.

11 changes: 0 additions & 11 deletions .travis/download-sbt

This file was deleted.

7 changes: 5 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
version: '{build}'
os: Windows Server 2012
install:
- cmd: choco install zulu8 -ia "INSTALLDIR=""C:\zulu"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appveyor was still working I guess. Is this necessary to do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At AppVeyor, it used Oracle JDK, so I think it would be good to use the same JDK at different OS

- cmd: SET JAVA_HOME="C:\zulu"
- cmd: choco install sbt -ia "INSTALLDIR=""C:\sbt"""
- cmd: SET PATH=C:\sbt\bin;%JAVA_HOME%\bin;%PATH%
- cmd: SET SBT_OPTS=-XX:MaxPermSize=2g -Xmx4g
- cmd: java -version
- cmd: SET SBT_OPTS=-Xms4g -Xmx4g
build_script:
- sbt clean compile
test_script:
- sbt validateWindows
cache:
- C:\sbt\
- C:\Users\appveyor\.sbt
- C:\Users\appveyor\.m2
- C:\Users\appveyor\.ivy2
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.5" % Test
)

// sbt dependend libraries
// sbt dependent libraries
libraryDependencies ++= {
(pluginCrossBuild / sbtVersion).value match {
case v if v.startsWith("1.") =>
Expand Down