From f2629c221bc1b11bdd779df4990e10d90cc47ce2 Mon Sep 17 00:00:00 2001 From: Lukas Drbal Date: Mon, 31 May 2021 22:01:13 +0200 Subject: [PATCH 1/3] WIP: tweek travis build --- .travis.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index c187c7d34..49a327887 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,16 @@ language: java git: depth: false -jdk: - - openjdk8 - - openjdk11 +jobs: + include: + - jdk: openjdk8 + env: MVN_PROFILE=jdk8 + - jdk: openjdk11 + env: MVN_PROFILE=jdk11 + - jdk: openjdk16 + env: MVN_PROFILE=jdk11 + allow_failures: + - jdk: openjdk16 addons: apt: @@ -21,11 +28,11 @@ 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) + - mvn spotless:check -B -V && mvn install -B -V -Pallow-snapshots,with-coverage,travis,${MVN_PROFILE} -Dorg.slf4j.simpleLogger.log.org.apache.maven.plugins.shade=error || (sleep 5; exit 1) - 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,${MVN_PROFILE}; fi before_cache: rm -rf ~/.m2/repository/cz/o2/proxima || /bin/true From d011c2107f1f20b9da64ce0b129eb213ba4dbab3 Mon Sep 17 00:00:00 2001 From: Lukas Drbal Date: Mon, 31 May 2021 22:16:31 +0200 Subject: [PATCH 2/3] Test 2 --- .travis.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 49a327887..2d23e15b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,11 +8,11 @@ git: jobs: include: - jdk: openjdk8 - env: MVN_PROFILE=jdk8 + env: JAVA_VERSION_PROFILE=jdk8 - jdk: openjdk11 - env: MVN_PROFILE=jdk11 + env: JAVA_VERSION_PROFILE=jdk11 - jdk: openjdk16 - env: MVN_PROFILE=jdk11 + env: JAVA_VERSION_PROFILE=jdk11 allow_failures: - jdk: openjdk16 @@ -23,16 +23,18 @@ 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,${MVN_PROFILE} -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,${MVN_PROFILE}; 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 From 24779dedd2e465c07401cdda7897ed1a93d6d655 Mon Sep 17 00:00:00 2001 From: Lukas Drbal Date: Mon, 31 May 2021 22:45:02 +0200 Subject: [PATCH 3/3] x --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2d23e15b3..44966cb4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,5 +40,5 @@ 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