<commit_before>language: java
sudo: false

addons:
  firefox: "53.0"

jdk:
  - oraclejdk8

cache:
  directories:
  - $HOME/.m2
  - $HOME/.node_modules
branches:
  only:
    - master
    - travis
    - /^release-.+$/
    - /^dev-.+/

before_install:
  - nvm install 7
  - OLD_VERSION=`mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -Ev "(^\[|Download)"`
  - BASE_VERSION=${OLD_VERSION%-SNAPSHOT}
  - NEW_VERSION=${BASE_VERSION}-dev-`printf %d $TRAVIS_BUILD_NUMBER`
  - ECLIPSE_VERSION=${BASE_VERSION}.dev_`printf %d $TRAVIS_BUILD_NUMBER`
  - export NEW_VERSION
  - export ECLIPSE_VERSION
  - export BASE_VERSION
  - echo "Building version $NEW_VERSION"
  - ./set-version.sh $NEW_VERSION $ECLIPSE_VERSION

install:
  - mvn install -Dteavm.build.all=false -P with-idea -P with-eclipse -P with-cli -DskipTests=true -Dmaven.javadoc.skip=true -B -V
  - pushd tests/src/test/js
  - npm config set prefix=$HOME/.node_modules
  - npm install
  - npm run build
  - popd
  - rm -rf $BASE_PATH/idea-artifacts/dependencies

script:
  - mvn -e test -Dteavm.junit.optimized=false -Dteavm.junit.js.runner=none
  - BASE_PATH=`pwd`
  - pushd tests/src/test/js
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - sleep 10
  - firefox index.html &
  - FIREFOX_PID=$!
  - node start.js $BASE_PATH/tests/target/js-tests
  - node start.js $BASE_PATH/html4j/target/js-tests
  - kill $FIREFOX_PID
  - popd
  - rm -rf $BASE_PATH/tests/target/js-tests
  - rm -rf $BASE_PATH/html4j/target/js-tests
  - du -sh *
  - du -sh /home/travis/.[!.]* *
  - df

after_success: >
   if [[ "${TRAVIS_PULL_REQUEST:-unknown}" == "false" && $TRAVIS_BRANCH == dev-* ]] ; then
     export NEW_VERSION
     export TEAVM_FTP_HOST
     export TEAVM_FTP_LOGIN
     export TEAVM_FTP_PASSWORD
     mvn deploy -Dteavm.build.all=false -DskipTests --settings travis-settings.xml -P deploy-to-bintray -P with-idea && \
     ./upload-files.sh
   fi
after_script:
  - rm -rf $HOME/.m2/repository/org/teavm<commit_msg>Travis: reduce used disk space<commit_after>language: java
sudo: false

addons:
  firefox: "53.0"

jdk:
  - oraclejdk8

cache:
  directories:
  - $HOME/mvn_repo
  - $HOME/.node_modules
branches:
  only:
    - master
    - travis
    - /^release-.+$/
    - /^dev-.+/

before_install:
  - MVN_CMD='mvn -Dmaven.repo.local=$HOME/mvn_repo'
  - nvm install 7
  - OLD_VERSION=`$MVN_CMD help:evaluate -Dexpression=project.version 2>/dev/null | grep -Ev "(^\[|Download)"`
  - BASE_VERSION=${OLD_VERSION%-SNAPSHOT}
  - NEW_VERSION=${BASE_VERSION}-dev-`printf %d $TRAVIS_BUILD_NUMBER`
  - ECLIPSE_VERSION=${BASE_VERSION}.dev_`printf %d $TRAVIS_BUILD_NUMBER`
  - export NEW_VERSION
  - export ECLIPSE_VERSION
  - export BASE_VERSION
  - echo "Building version $NEW_VERSION"
  - ./set-version.sh $NEW_VERSION $ECLIPSE_VERSION
  - rm -rf $HOME/.phpenv
  - rm -rf $HOME/.rvm
  - rm -rf $HOME/.m2

install:
  - $MVN_CMD install -Dteavm.build.all=false -P with-idea -P with-eclipse -P with-cli -DskipTests=true -Dmaven.javadoc.skip=true -B -V
  - pushd tests/src/test/js
  - npm config set prefix=$HOME/.node_modules
  - npm install
  - npm run build
  - popd
  - rm -rf $BASE_PATH/tools/idea/idea-artifacts/dependencies
  - rm -rf $HOME/mvn_repo/org/teavm/idea

script:
  - $MVN_CMD -e test -Dteavm.junit.optimized=false -Dteavm.junit.js.runner=none
  - BASE_PATH=`pwd`
  - pushd tests/src/test/js
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - sleep 10
  - firefox index.html &
  - FIREFOX_PID=$!
  - node start.js $BASE_PATH/tests/target/js-tests
  - node start.js $BASE_PATH/html4j/target/js-tests
  - kill $FIREFOX_PID
  - popd
  - rm -rf $BASE_PATH/tests/target/js-tests
  - rm -rf $BASE_PATH/html4j/target/js-tests
  - du -sh /*
  - du -sh /home/travis/.[!.]* *
  - df

after_success: >
   if [[ "${TRAVIS_PULL_REQUEST:-unknown}" == "false" && $TRAVIS_BRANCH == dev-* ]] ; then
     export NEW_VERSION
     export TEAVM_FTP_HOST
     export TEAVM_FTP_LOGIN
     export TEAVM_FTP_PASSWORD
     $MVN_CMD deploy -Dteavm.build.all=false -DskipTests --settings travis-settings.xml -P deploy-to-bintray -P with-idea && \
     ./upload-files.sh
   fi
after_script:
  - rm -rf $HOME/.m2/repository/org/teavm
{'fraction_non_alphanumeric': 0.14639371578195667, 'fraction_numerical': 0.007141156867412521, 'mean_word_length': 2.8943466172381833, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4837510', 'n_tokens_mistral': 1756, 'n_tokens_neox': 1699, 'n_words': 319}