<commit_before>language: java
sudo: true
dist: xenial

env:
  global:
    - GPG_EXECUTABLE=gpg
    # TODO move this into the travis settings
    - secure: "<KEY>
    - secure: "<KEY>

matrix:
  include:
    - env: JDKNAME='8.0.302-open'
    - env: JDKNAME='11.0.12-open'
    - env: JDKNAME='18-open'
    - env: JDKNAME='19.ea.17-open'

# avoid default dependency command for maven, 'true' means 'return true' and continue
install: true

# store them into travis via https://dracoblue.net/dev/uploading-snapshots-and-releases-to-maven-central-with-travis/
# gpg --export-secret-keys <keyID> | base64 -w 0
# gpg --export-ownertrust | base64 -w 0
before_install:
  - if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
  - if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
  - curl -s "https://get.sdkman.io" | bash
  - source "$HOME/.sdkman/bin/sdkman-init.sh"
  - sdk install java $JDKNAME
  - sdk use java $JDKNAME

# Undo `_JAVA_OPTIONS` environment variable; see https://github.com/travis-ci/travis-ci/issues/8408
before_script:
  - _JAVA_OPTIONS=
  - "mvn --version"
  - "if [ -z \"$API_KEY\" ]; then API_KEY=78da6e9a-273e-43d1-bdda-8f24e007a1fa; fi" # change in GraphHopperWebIT too

script:
  - "mvn -Dkey=$API_KEY clean install -B"

after_success:
  # often spotbugs etc take long to be compatible with a future JDK version so skip them
  - if [ "$SKIP_EXT_TESTS" != "true" ]; then
        mvn checkstyle:check forbiddenapis:check;
    fi
  # if tagged deploy then release to maven central or deploy snapshot artifacts to sonatype
  - if [ "$TRAVIS_JDK_VERSION" == "openjdk8" ] && [ "$TRAVIS_TAG" != "" ]; then
        echo "release to maven central";
        mvn versions:set -DnewVersion=$TRAVIS_TAG -DgenerateBackupPoms=false;
        mvn deploy -P release --settings core/files/settings.xml -DskipTests=true -B;
    elif [ "$TRAVIS_JDK_VERSION" == "openjdk8" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
        mvn deploy --settings core/files/settings.xml -DskipTests=true -B;
    else
        echo "Not deploying artifacts for $TRAVIS_BRANCH";<commit_msg>remove sdkman: it does not support 'latest ea'; use JDK URL directly; replace LTS 11 with 17, related to #2552<commit_after>language: java
sudo: true
dist: xenial

env:
  global:
    - GPG_EXECUTABLE=gpg
    # TODO move this into the travis settings
    - secure: "<KEY>
    - secure: "<KEY>

matrix:
  include:
    - env: JDK='8/ga' # for backward compatibility
    - env: JDK='17/ga'# latest LTS
    - env: JDK='18/ga'# latest
    - env: JDK='19/ea'# latest early access

# avoid default dependency command for maven, 'true' means 'return true' and continue
install: true

# store them into travis via https://dracoblue.net/dev/uploading-snapshots-and-releases-to-maven-central-with-travis/
# gpg --export-secret-keys <keyID> | base64 -w 0
# gpg --export-ownertrust | base64 -w 0
before_install:
  - if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
  - if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
  - wget -q "https://api.adoptium.net/v3/binary/latest/$JDK/linux/x64/jdk/hotspot/normal/eclipse" -O java.tar.gz
  - tar xzf java.tar.gz
  - export JAVA_HOME=$(ls -d $PWD/jdk*); echo $JAVA_HOME

# Undo `_JAVA_OPTIONS` environment variable; see https://github.com/travis-ci/travis-ci/issues/8408
before_script:
  - _JAVA_OPTIONS=
  - "mvn --version"
  - "if [ -z \"$API_KEY\" ]; then API_KEY=78da6e9a-273e-43d1-bdda-8f24e007a1fa; fi" # change in GraphHopperWebIT too

script:
  - "mvn -Dkey=$API_KEY clean install -B"

after_success:
  # often spotbugs etc take long to be compatible with a future JDK version so skip them
  - if [ "$SKIP_EXT_TESTS" != "true" ]; then
        mvn checkstyle:check forbiddenapis:check;
    fi
  # if tagged deploy then release to maven central or deploy snapshot artifacts to sonatype
  - if [ "$TRAVIS_JDK_VERSION" == "openjdk8" ] && [ "$TRAVIS_TAG" != "" ]; then
        echo "release to maven central";
        mvn versions:set -DnewVersion=$TRAVIS_TAG -DgenerateBackupPoms=false;
        mvn deploy -P release --settings core/files/settings.xml -DskipTests=true -B;
    elif [ "$TRAVIS_JDK_VERSION" == "openjdk8" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
        mvn deploy --settings core/files/settings.xml -DskipTests=true -B;
    else
        echo "Not deploying artifacts for $TRAVIS_BRANCH";
{'fraction_non_alphanumeric': 0.1358637049816692, 'fraction_numerical': 0.021565667457407806, 'mean_word_length': 3.4003795066413662, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1110293', 'n_tokens_mistral': 1817, 'n_tokens_neox': 1710, 'n_words': 439}