language: java

sudo: false
dist: trusty

# Specify which branches/tags that we do not want to be built: r5.0.0-M5
branches:
  except:
    - /^r\d.*$/

before_install:
# https://github.com/travis-ci/travis-ci/issues/8408
# Also interferes with platform-tooling-support-tests expectations
  - unset _JAVA_OPTIONS

jdk:
  - openjdk10
  - openjdk-ea

env:
  - JACOCO='-PenableJaCoCo' INSTALL='publishToMavenLocal'

script:
# Display Gradle, Groovy, JVM and other versions
  - ./gradlew --version
# Build JUnit 5
  - ./gradlew --scan --stacktrace --warning-mode=all ${JACOCO} build ${INSTALL}

after_success:
# If variable JACOCO is set, run JaCoCo report and send report to codecov.io after build success
  - test -v JACOCO && ./gradlew ${JACOCO} jacocoRootReport && bash <(curl -s https://codecov.io/bash) || true
# If variable INSTALL is set, run platform-tooling-support-tests
  - test -v INSTALL && ./gradlew --scan --stacktrace -Dplatform.tooling.support.tests.enabled=true build || true

language: java

sudo: false
dist: trusty

# Specify which branches/tags that we do not want to be built: r5.0.0-M5
branches:
  except:
    - /^r\d.*$/

before_install:
# https://github.com/travis-ci/travis-ci/issues/8408
# Also interferes with platform-tooling-support-tests expectations
  - unset _JAVA_OPTIONS

os:
  - linux
  - osx

jdk:
  - openjdk10
  - openjdk-ea

env:
  - JACOCO='-PenableJaCoCo'
  - INSTALL='publishToMavenLocal'

matrix:
  exclude:
    - os: linux
      jdk: openjdk-ea
      env: JACOCO='-PenableJaCoCo'
    - os: osx
      jdk: openjdk-ea
      env: JACOCO='-PenableJaCoCo'

script:
# Display Gradle, Groovy, JVM and other versions
  - ./gradlew --version
# Build JUnit 5
  - ./gradlew --scan --stacktrace --warning-mode=all ${JACOCO} build ${INSTALL}

after_success:
# If variable JACOCO is set, run JaCoCo report and send report to codecov.io after build success
  - test -v JACOCO && ./gradlew ${JACOCO} jacocoRootReport && bash <(curl -s https://codecov.io/bash) || true
# If variable INSTALL is set, run platform-tooling-support-tests
  - test -v INSTALL && ./gradlew --scan --stacktrace -Dplatform.tooling.support.tests.enabled=true build || true

Add os axis to the matrix and exclude jacoco on jdk-ea builds
Add os axis to the matrix and exclude jacoco on jdk-ea builds
