source: .travis.yml @ 2556c77

Last change on this file since 2556c77 was 2556c77, checked in by str4d <str4d@…>, 19 months ago

Travis CI: Update config to handle cross-compilation

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