Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: tweek travis build #554

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@ language: java
git:
depth: false

jdk:
- openjdk8
- openjdk11
jobs:
include:
- jdk: openjdk8
env: JAVA_VERSION_PROFILE=jdk8
- jdk: openjdk11
env: JAVA_VERSION_PROFILE=jdk11
- jdk: openjdk16
env: JAVA_VERSION_PROFILE=jdk11
allow_failures:
- jdk: openjdk16

addons:
apt:
Expand All @@ -16,20 +23,22 @@ addons:
sonarcloud:
organization: datadriven

install: true

before_script:
- wget https://github.com/sormuras/bach/raw/master/install-jdk.sh

script:
- mvn spotless:check -B -V && mvn install -B -V -Pallow-snapshots,with-coverage,travis -Dorg.slf4j.simpleLogger.log.org.apache.maven.plugins.shade=error || (sleep 5; exit 1)
- echo "Running with profile: ${JAVA_VERSION_PROFILE}"
- mvn spotless:check -B -V && mvn install -B -V -Pallow-snapshots,with-coverage,travis,${JAVA_VERSION_PROFILE} -Dorg.slf4j.simpleLogger.log.org.apache.maven.plugins.shade=error || (sleep 5; exit 1)

after_script:
- export JAVA_HOME=$HOME/openjdk11
- chmod u+x $TRAVIS_BUILD_DIR/install-jdk.sh
- $TRAVIS_BUILD_DIR/install-jdk.sh --feature 11 --target $JAVA_HOME
- if [ "${TRAVIS_PULL_REQUEST}" != "false" ] || [ "${TRAVIS_BRANCH}" == "master" ]; then mvn sonar:sonar -B -V -Pallow-snapshots,with-coverage,travis; fi
- if [ "${TRAVIS_PULL_REQUEST}" != "false" ] || [ "${TRAVIS_BRANCH}" == "master" ]; then mvn sonar:sonar -B -V -Pallow-snapshots,with-coverage,travis,${JAVA_VERSION_PROFILE}; fi

before_cache: rm -rf ~/.m2/repository/cz/o2/proxima || /bin/true

cache:
directories:
- '$HOME/.m2/repository'
- '$HOME/.sonar/cache'
- $HOME/.m2/repository
- $HOME/.sonar/cache