blob: 1f5f46593c5c64de3eb9ca1d2f8800dec25671d0 [file] [log] [blame]
# More details on how to configure the Travis build
# https://docs.travis-ci.com/user/customizing-the-build/
# Speed up build by leveraging travis caches
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
# Enabling container based infrastructure hoping it will help the build speed <= this didn't work well, so it's reverted
# see https://docs.travis-ci.com/user/migrating-from-legacy/ and https://docs.travis-ci.com/user/ci-environment
sudo: true
language: java
# new workaround for https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913
addons:
hosts:
- mockito-cd
hostname: mockito-cd
before_install:
- export TRAVIS_COMMIT_MESSAGE=$(git log --format=%B -n 1 $TRAVIS_COMMIT)
- echo "$TRAVIS_COMMIT_MESSAGE"
jdk:
- oraclejdk7
matrix:
include:
- jdk: oraclejdk7
env: SKIP_RELEASE=true MOCK_MAKER=mock-maker-inline
- jdk: oraclejdk8
env: SKIP_RELEASE=true
- jdk: oraclejdk8
env: SKIP_RELEASE=true MOCK_MAKER=mock-maker-inline
env:
global:
- TERM=dumb
- GRADLE_OPTS="-XX:+UseCompressedOops -Djava.awt.headless=true"
branches:
except:
- /^v\d/
install:
- true
script:
- ./gradlew build idea -s -PcheckJava6Compatibility
after_success:
- ./gradlew travisRelease -s
- ./gradlew --stacktrace coverageReport && cp build/reports/jacoco/mockitoCoverage/mockitoCoverage.xml jacoco.xml || echo "Code coverage failed"
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"