groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [groovy] 01/01: Add Java13 build on Travis-CI
Date Mon, 13 Jan 2020 10:30:21 GMT
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 <sunlan@apache.org>
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


Mime
View raw message