From ed1b14de369415334402de98bf92094cfb011299 Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Thu, 20 Jun 2019 13:21:45 +0800 Subject: [PATCH 01/13] Use OpenJDK for Win at CI --- appveyor.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c55a3b24f..eb5f4300c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,14 +1,17 @@ version: '{build}' os: Windows Server 2012 install: + - cmd: choco install zulu8 -ia "INSTALLDIR=""C:\zulu""" + - 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 From 2d0b70dff25f57c3f929b2914470e9bdfd72a49e Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Fri, 21 Jun 2019 10:47:48 +0800 Subject: [PATCH 02/13] Use Zulu OpenJDK for Linux at CI --- .travis.yml | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4c8ba49f7..fa284a8ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: java scala: 2.12.7 os: linux -jdk: openjdk8 addons: apt: @@ -17,9 +16,12 @@ cache: - $HOME/.m2 - $HOME/.ivy2 - $GRAALVM_PARENT_DIRECTORY + - $HOME/.jabba env: global: + - TRAVIS_JDK=zulu@1.8 + - JABBA_HOME=$HOME/.jabba - GRAALVM_PARENT_DIRECTORY: ${HOME}/.local/share - COMMIT_AUTHOR_EMAIL: "sbt-native-packager@muki.rocks" - RELEASE_BRANCH: master @@ -35,6 +37,11 @@ before_install: brew install xz; brew install sbt; fi + - if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then + wget -qO- https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh; + $JABBA_HOME/bin/jabba install $TRAVIS_JDK; + export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK" && export PATH="$JAVA_HOME/bin:$PATH" && java -version; + fi before_script: - .travis/download-sbt @@ -52,8 +59,12 @@ jobs: script: sbt "^validateUniversal" if: type = pull_request OR (type = push AND branch = master) name: "scripted universal tests" - - script: sbt "^validateGraalVMNativeImage" if: type = pull_request OR (type = push AND branch = master) + - 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" name: "scripted GraalVM native-image tests" - script: sbt "^validateJar" name: "scripted jar tests" @@ -73,18 +84,26 @@ jobs: - script: sbt "^validateDockerUnit" name: "scripted docker unit-tests" if: type = pull_request OR (type = push AND branch = master) - - script: sbt "^validateJdkPackagerTravis" + - 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" 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: | + $JABBA_HOME/bin/jabba install zulu@1.11 + export JAVA_HOME="$JABBA_HOME/jdk/zulu@1.11" && 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: | + $JABBA_HOME/bin/jabba install zulu@1.12 + export JAVA_HOME="$JABBA_HOME/jdk/zulu@1.12" && 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" From 9d4a2178f2b0b44499a4b6a79b3f99fc51c39d2c Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Fri, 21 Jun 2019 10:51:13 +0800 Subject: [PATCH 03/13] Remove original GraalVM installation --- .travis.yml | 4 ---- .travis/download-graalvm | 42 ---------------------------------------- 2 files changed, 46 deletions(-) delete mode 100755 .travis/download-graalvm diff --git a/.travis.yml b/.travis.yml index fa284a8ab..0f7ba69a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,14 +15,12 @@ cache: - $HOME/.sbt - $HOME/.m2 - $HOME/.ivy2 - - $GRAALVM_PARENT_DIRECTORY - $HOME/.jabba env: global: - TRAVIS_JDK=zulu@1.8 - JABBA_HOME=$HOME/.jabba - - GRAALVM_PARENT_DIRECTORY: ${HOME}/.local/share - COMMIT_AUTHOR_EMAIL: "sbt-native-packager@muki.rocks" - RELEASE_BRANCH: master - secure: bK5zEd2s3y+ScGwuGcxlP0tXx83nvurmF/SWuQSmI0A2KRelipGSSY2BTa+URKk9smJusJIZUi72EqEwMHDhxLCfHomjze5BmpJB5Mr3fQI700nxPEA95cbM4Z1G9+K6fYWy2pi5S7Xmz1Sg07bP4sfzyVYlNB20aquLCmB9Llk= @@ -45,8 +43,6 @@ before_install: before_script: - .travis/download-sbt -- .travis/download-graalvm - # job definitions jobs: diff --git a/.travis/download-graalvm b/.travis/download-graalvm deleted file mode 100755 index b73803f4d..000000000 --- a/.travis/download-graalvm +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# Make GraalVM `native-image` available and nothing else -function setup_os_specific_envs() { - case $(uname | tr '[:upper:]' '[:lower:]') in - linux*) - OS_NAME=linux - BIN_PATH=bin - ;; - darwin*) - OS_NAME=darwin - BIN_PATH=Contents/Home/bin/ - ;; - *) - echo "Unsupported OS" - exit - esac -} - -setup_os_specific_envs -GRAALVM_VERSION=19.0.0 -GRAALVM_DISTRIBUTION=graalvm-ce -GRAAL_DIRECTORY=${GRAALVM_PARENT_DIRECTORY}/${GRAALVM_DISTRIBUTION}-${GRAALVM_VERSION} -TAR_GZ_FILENAME=${GRAALVM_DISTRIBUTION}-${OS_NAME}-amd64-${GRAALVM_VERSION}.tar.gz -TAR_GZ_URL=https://github.com/oracle/graal/releases/download/vm-${GRAALVM_VERSION}/${TAR_GZ_FILENAME} -NATIVE_IMAGE=${GRAAL_DIRECTORY}/${BIN_PATH}/native-image -NATIVE_IMAGE_TARGET_DIRECTORY=${HOME}/.local/bin -NATIVE_IMAGE_TARGET=${NATIVE_IMAGE_TARGET_DIRECTORY}/native-image -if [[ ! -f ${NATIVE_IMAGE} ]] -then - (mkdir -p ${GRAALVM_PARENT_DIRECTORY} && - cd ${GRAALVM_PARENT_DIRECTORY} && - wget -O ${TAR_GZ_FILENAME} ${TAR_GZ_URL} && - tar zxf ${TAR_GZ_FILENAME} && - ${GRAAL_DIRECTORY}/${BIN_PATH}/gu install native-image && - rm -f ${TAR_GZ_FILENAME}) -else - echo "GraalVM Native Image already exists" -fi -ls -lsa ${NATIVE_IMAGE} -mkdir -p ${NATIVE_IMAGE_TARGET_DIRECTORY} -ln -f -s ${NATIVE_IMAGE} ${NATIVE_IMAGE_TARGET} -export PATH=${NATIVE_IMAGE_TARGET_DIRECTORY}:${PATH} From d64c41900dfef8536921dd4e7d6ca2fec4858a05 Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Thu, 20 Jun 2019 13:38:19 +0800 Subject: [PATCH 04/13] Typo --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 915f6dbc4..18440e3da 100644 --- a/build.sbt +++ b/build.sbt @@ -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.") => From fd645398384923c40c642b98d6b594bb2a5a7a84 Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Fri, 21 Jun 2019 11:06:00 +0800 Subject: [PATCH 05/13] Remove original sbt installation --- .travis.yml | 4 +--- .travis/download-sbt | 11 ----------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100755 .travis/download-sbt diff --git a/.travis.yml b/.travis.yml index 0f7ba69a8..74dc15d75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -language: java +language: scala scala: 2.12.7 os: linux @@ -41,8 +41,6 @@ before_install: export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK" && export PATH="$JAVA_HOME/bin:$PATH" && java -version; fi -before_script: -- .travis/download-sbt # job definitions jobs: diff --git a/.travis/download-sbt b/.travis/download-sbt deleted file mode 100755 index 52bf41ae1..000000000 --- a/.travis/download-sbt +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -SBT_VERSION=1.2.6 -SBT_LAUNCH_JAR_URL=http://dl.bintray.com/sbt/maven-releases/org/scala-sbt/sbt-launch/${SBT_VERSION}/sbt-launch.jar -TARGET_SBT_LAUNCH_JAR=${HOME}/.sbt/launchers/${SBT_VERSION}/sbt-launch.jar - -if [ -f ${TARGET_SBT_LAUNCH_JAR} ]; then - echo "sbt ${SBT_VERSION} already exists" - exit -fi - -curl -L --create-dirs -o ${TARGET_SBT_LAUNCH_JAR} ${SBT_LAUNCH_JAR_URL} From a3ab816cf7172a7a5ae29988b0ad06c8064e1589 Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Fri, 21 Jun 2019 15:07:18 +0800 Subject: [PATCH 06/13] Don't need to install sbt at osx --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 74dc15d75..6a392f2ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,6 @@ before_install: - if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then brew update; brew install xz; - brew install sbt; fi - if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then wget -qO- https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh; From 2e81dae34ad2b1b9fe47bdf8905d01e1db5f271e Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Fri, 21 Jun 2019 22:08:18 +0800 Subject: [PATCH 07/13] Already install OpenJFX for Java 8 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2914fa520..73f68853b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -77,13 +77,13 @@ jobs: - script: sbt "^validateDockerUnit" name: "scripted docker unit-tests" if: type = pull_request OR (type = push AND branch = master) + # 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/ From 243520cc1260e5cf1df212576f06b418110c7705 Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Fri, 21 Jun 2019 21:47:35 +0800 Subject: [PATCH 08/13] Fix error by rebasing incorrectly --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 73f68853b..3fad0120e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,12 +52,12 @@ jobs: script: sbt "^validateUniversal" if: type = pull_request OR (type = push AND branch = master) name: "scripted universal tests" - if: type = pull_request OR (type = push AND branch = master) - 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" name: "scripted jar tests" From 74bdb7bae33e667c55d029a754d7d9d4cc59bc55 Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Fri, 21 Jun 2019 21:53:43 +0800 Subject: [PATCH 09/13] Install OpenJDK through jabba at osx --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3fad0120e..b2ca379dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,9 +34,13 @@ before_install: brew update; brew install xz; fi - - if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then + - 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; + elfi [[ "$TRAVIS_OS_NAME" = "osx" ]]; then export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK" && export PATH="$JAVA_HOME/bin:$PATH" && java -version; fi @@ -106,7 +110,6 @@ jobs: 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 From 34e50021655cef905c785e22e029e9d1dc659cff Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Fri, 21 Jun 2019 22:02:32 +0800 Subject: [PATCH 10/13] Remove typo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b2ca379dd..1c74bb178 100644 --- a/.travis.yml +++ b/.travis.yml @@ -104,7 +104,7 @@ jobs: name: "scripted jlink tests" 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 From c48d3faca327cfb031781b3b8effd98e220f0112 Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Fri, 21 Jun 2019 22:20:39 +0800 Subject: [PATCH 11/13] Fix osx's JAVA_HOME --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1c74bb178..e6d719eac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,7 @@ before_install: - if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK" && export PATH="$JAVA_HOME/bin:$PATH" && java -version; elfi [[ "$TRAVIS_OS_NAME" = "osx" ]]; then - export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK" && export PATH="$JAVA_HOME/bin:$PATH" && java -version; + export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK/Contents/Home" && export PATH="$JAVA_HOME/bin:$PATH" && java -version; fi # job definitions From 7b197de864ce3e0d443884e8daa7e38152054455 Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Fri, 21 Jun 2019 22:21:04 +0800 Subject: [PATCH 12/13] Fix bash error --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e6d719eac..daab7119e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ before_install: fi - if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then export JAVA_HOME="$JABBA_HOME/jdk/$TRAVIS_JDK" && export PATH="$JAVA_HOME/bin:$PATH" && java -version; - elfi [[ "$TRAVIS_OS_NAME" = "osx" ]]; then + 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 From bd70ffbbd022b34d2122032a8cb490b4dccc9b6b Mon Sep 17 00:00:00 2001 From: Jimin Hsieh Date: Fri, 21 Jun 2019 23:45:32 +0800 Subject: [PATCH 13/13] Specific Java patch version --- .travis.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index daab7119e..8b7cb3312 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ cache: env: global: - - TRAVIS_JDK=zulu@1.8 + - TRAVIS_JDK=zulu@1.8.212 - JABBA_HOME=$HOME/.jabba - COMMIT_AUTHOR_EMAIL: "sbt-native-packager@muki.rocks" - RELEASE_BRANCH: master @@ -92,14 +92,16 @@ jobs: # docker configuration as described in # https://docs.travis-ci.com/user/docker/ - script: | - $JABBA_HOME/bin/jabba install zulu@1.11 - export JAVA_HOME="$JABBA_HOME/jdk/zulu@1.11" && export PATH="$JAVA_HOME/bin:$PATH" && java -version + 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" if: type = pull_request OR (type = push AND branch = master) - script: | - $JABBA_HOME/bin/jabba install zulu@1.12 - export JAVA_HOME="$JABBA_HOME/jdk/zulu@1.12" && export PATH="$JAVA_HOME/bin:$PATH" && java -version + 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" if: type = pull_request OR (type = push AND branch = master)