[groovy] branch java13-build created (now d7d54b5)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[groovy] branch java13-build created (now d7d54b5)

Daniel.Sun
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a change to branch java13-build
in repository https://gitbox.apache.org/repos/asf/groovy.git.


      at d7d54b5  Add Java13 build on Travis-CI

This branch includes the following new commits:

     new d7d54b5  Add Java13 build on Travis-CI

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Apache Groovy committer & PMC member

Blog: http://blog.sunlan.me
Twitter: @daniel_sun
Reply | Threaded
Open this post in threaded view
|

[groovy] 01/01: Add Java13 build on Travis-CI

Daniel.Sun
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch java13-build
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit d7d54b5f6c8f277138e278c418896edc63859d8c
Author: Daniel Sun <[hidden email]>
AuthorDate: Mon Jan 13 18:29:50 2020 +0800

    Add Java13 build on Travis-CI
---
 .travis.yml        | 10 +++++++++-
 build.gradle       |  1 +
 gradle/test.gradle |  3 +++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index a620fa8..218f268 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,6 +23,9 @@ install: true
 
 matrix:
   include:
+    - env: BC='legacy' FEATURE='13' TARGET_JAVA_HOME="/home/travis/openjdk$FEATURE" LICENSE='GPL'
+      jdk: openjdk11
+
     - env: BC='legacy'
       jdk: openjdk12
 
@@ -38,6 +41,9 @@ matrix:
     - env: BC='legacy'
       jdk: oraclejdk8
 
+    - env: BC='indy' FEATURE='13' TARGET_JAVA_HOME="/home/travis/openjdk$FEATURE" LICENSE='GPL'
+      jdk: openjdk11
+
     - env: BC='indy'
       jdk: openjdk12
 
@@ -58,7 +64,9 @@ before_script:
 
 script:
   - ./gradlew -version
-  - if [ "$BC" == "legacy" ]; then travis_wait 60 ./gradlew test; else travis_wait 60 ./gradlew testWithIndy; fi
+  - if [ "$TARGET_JAVA_HOME" != "" ]; then wget https://github.com/sormuras/bach/raw/master/install-jdk.sh -P /tmp/ && chmod 755 /tmp/install-jdk.sh; fi
+  - if [ "$TARGET_JAVA_HOME" != "" ]; then /tmp/install-jdk.sh --target "$TARGET_JAVA_HOME" --workspace "/home/travis/.cache/install-jdk" --feature "$FEATURE" --license "$LICENSE" --cacerts; fi
+  - if [ "$BC" == "legacy" ]; then travis_wait 60 ./gradlew test -Ptarget.java.home=$TARGET_JAVA_HOME; else travis_wait 60 ./gradlew testWithIndy -Ptarget.java.home=$TARGET_JAVA_HOME; fi
 
 # As recommended in:
 # https://docs.travis-ci.com/user/languages/java/#Caching
diff --git a/build.gradle b/build.gradle
index 4ea1475..ef510ed 100644
--- a/build.gradle
+++ b/build.gradle
@@ -66,6 +66,7 @@ ext.modules = {
     subprojects.findAll{ !['performance', 'binary-compatibility'].contains(it.name) }
 }
 ext.isReleaseVersion = !groovyVersion.toLowerCase().endsWith("snapshot")
+ext.targetJavaHome = rootProject.hasProperty('target.java.home') ? rootProject.property('target.java.home') : ''
 
 apply from: 'gradle/bad-practices.gradle'
 //apply from: 'gradle/indy.gradle'
diff --git a/gradle/test.gradle b/gradle/test.gradle
index 4d3d282..069856b 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -36,6 +36,9 @@ allprojects {
         }
         systemProperties 'apple.awt.UIElement': 'true', 'javadocAssertion.src.dir': './src/main'
 
+        if (rootProject.targetJavaHome) {
+            executable = "${rootProject.targetJavaHome}/bin/java"
+        }
         forkEvery = 50
         maxParallelForks = isRunningOnCI() ? 1 : Runtime.runtime.availableProcessors()
         scanForTestClasses = true

Apache Groovy committer & PMC member

Blog: http://blog.sunlan.me
Twitter: @daniel_sun