diff options
Diffstat (limited to '.travis.sh')
-rwxr-xr-x | .travis.sh | 60 |
1 files changed, 32 insertions, 28 deletions
@@ -43,26 +43,31 @@ function install_jdk { fi } +# Preinstalled JDKs: +ls -lA /usr/lib/jvm/ + + case "$JDK" in 5) install_jdk $JDK5_URL false ;; -6) +6 | 7 | 8) + jdk_switcher /usr/lib/jvm/java-8-oracle ;; -7) - jdk_switcher /usr/lib/jvm/java-7-openjdk-amd64 +9) + jdk_switcher /usr/lib/jvm/java-9-oracle ;; -8) - jdk_switcher /usr/lib/jvm/java-8-oracle +10) + install_jdk $JDK10_URL ;; -8-ea) - install_jdk $JDK8_EA_URL +11) + install_jdk $JDK11_URL ;; -9) - install_jdk $JDK9_URL +12) + install_jdk $JDK12_URL ;; -10-ea) - install_jdk $JDK10_EA_URL +13-ea) + install_jdk $JDK13_EA_URL ;; esac @@ -72,34 +77,33 @@ esac export MAVEN_SKIP_RC=true # Build: -# TODO(Godin): see https://github.com/jacoco/jacoco/issues/300 about "bytecode.version" case "$JDK" in 5) if [[ ${TRAVIS_PULL_REQUEST} == 'false' && ${TRAVIS_BRANCH} == 'master' ]] then + # Travis does shallow clone, but SonarQube performs "git blame" and so requires full history + git fetch --unshallow + # goal "deploy:deploy" used directly instead of "deploy" phase to avoid pollution of Maven repository by "install" phase - mvn -V -B -e -f org.jacoco.build verify deploy:deploy -DdeployAtEnd -Djdk.version=1.5 --toolchains=./.travis/toolchains.xml --settings=./.travis/settings.xml -Dsonar.host.url=${SONARQUBE_URL} -Dsonar.login=${SONARQUBE_TOKEN} + mvn -V -B -e -f org.jacoco.build verify sonar:sonar deploy:deploy -DdeployAtEnd -Djdk.version=5 --toolchains=./.travis/toolchains.xml --settings=./.travis/settings.xml -Dsonar.host.url=${SONARQUBE_URL} -Dsonar.login=${SONARQUBE_TOKEN} python ./.travis/trigger-site-deployment.py else - mvn -V -B -e verify -Djdk.version=1.5 --toolchains=./.travis/toolchains.xml + mvn -V -B -e verify -Djdk.version=5 --toolchains=./.travis/toolchains.xml \ + --settings=./.travis/settings.xml fi ;; -6) - mvn -V -B -e verify -Djdk.version=1.6 -Dbytecode.version=1.6 --toolchains=./.travis/travis-toolchains.xml - ;; -7) - mvn -V -B -e verify -Dbytecode.version=1.7 +6 | 7 | 8 | 9) + mvn -V -B -e verify -Djdk.version=${JDK} -Dbytecode.version=${JDK} -Decj=${ECJ:-} --toolchains=./.travis/travis-toolchains.xml \ + --settings=./.travis/settings.xml ;; -8 | 8-ea) - mvn -V -B -e verify -Dbytecode.version=1.8 -Decj=${ECJ:-} - ;; -9) - export MAVEN_OPTS="-Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts" - mvn -V -B -e verify -Dbytecode.version=1.9 \ - -Dinvoker.mavenOpts="-Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts" +10 | 11 | 12) + mvn -V -B -e verify -Dbytecode.version=${JDK} \ + --settings=./.travis/settings.xml ;; -10-ea) - mvn -V -B -e verify -Dbytecode.version=1.9 +13-ea) + mvn -V -B -e verify -Dbytecode.version=13 \ + --projects \!org.jacoco.core.test.validation.groovy \ + --settings=./.travis/settings.xml ;; *) echo "Incorrect JDK [$JDK]" |