source: .travis.yml @ 859584c

Last change on this file since 859584c was f9c1396, checked in by str4d <str4d@…>, 17 months ago

Travis CI: Test against JDK 9+

  • Property mode set to 100644
File size: 1.7 KB
Line 
1language: java
2
3jdk:
4  - oraclejdk11
5  - oraclejdk9
6  - openjdk11
7  - openjdk10
8  - openjdk9
9
10matrix:
11  include:
12    - jdk: oraclejdk8
13      addons:
14        sonarcloud:
15          organization: "i2p"
16      before_install:
17        - export JAVA7_HOME=$(jdk_switcher home openjdk7)
18        - sed -i "1iplugins {\n    id 'org.sonarqube' version '2.6.1'\n}\n" build.gradle
19    - jdk: openjdk8
20      before_install:
21        - export JAVA7_HOME=$(jdk_switcher home openjdk7)
22    - jdk: openjdk7
23      sudo: required
24      before_install: # Work around missing crypto in openjdk7
25        - export JAVA7_HOME=$(jdk_switcher home openjdk7)
26        - sudo wget "https://bouncycastle.org/download/bcprov-ext-jdk15on-158.jar" -O "${JAVA_HOME}/jre/lib/ext/bcprov-ext-jdk15on-158.jar"
27        - sudo perl -pi.bak -e 's/^(security\.provider\.)([0-9]+)/$1.($2+1)/ge' /etc/java-7-openjdk/security/java.security
28        - echo "security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider" | sudo tee -a /etc/java-7-openjdk/security/java.security
29      install:
30        - export TARGET_JAVA_HOME=$JAVA_HOME
31        - jdk_switcher use oraclejdk8
32        - ./gradlew assemble
33
34before_cache:
35  - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
36  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
37cache:
38  directories:
39    - $HOME/.gradle/caches/
40    - $HOME/.gradle/wrapper/
41    - $HOME/.sonar/cache/
42    - .gradle
43
44script:
45  - |
46    if [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then
47      ./gradlew sonarqube codeCoverageReport
48    else
49      ./gradlew check codeCoverageReport
50    fi
51
52after_success:
53  - bash <(curl -s https://codecov.io/bash)
54
55notifications:
56  irc:
57    channels:
58      - "chat.freenode.net#i2p-dev"
59    on_success: change
60    on_failure: always
Note: See TracBrowser for help on using the repository browser.