2015-10-09 22:25:51 -07:00
language : java
jdk :
2015-10-09 22:55:22 -07:00
- oraclejdk8
2017-04-22 02:13:51 -07:00
2015-10-09 22:55:22 -07:00
cache :
directories :
- $HOME/.m2
2017-04-22 01:32:46 -07:00
- $HOME/.node_modules
- $HOME/.chromium_dist
2015-10-12 10:51:46 -07:00
branches :
only :
- master
- /^release-.+$/
2017-02-16 11:55:30 -08:00
- /^dev-.+/
2017-04-22 03:23:52 -07:00
addons :
apt :
packages :
- libstdc++
2017-04-22 02:13:51 -07:00
2017-02-16 10:37:42 -08:00
before_install :
2017-04-22 02:13:51 -07:00
- nvm install 7
2017-04-22 01:32:46 -07:00
- CHROMIUM_BUILD=466537
- mkdir -p $HOME/.chromium_dist/
2017-04-22 02:39:49 -07:00
- CHROMIUM_ZIP=$HOME/.chromium_dist/chromium-$CHROMIUM_BUILD.zip
- if [ ! -f $CHROMIUM_ZIP ]; then wget https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F$CHROMIUM_BUILD%2Fchrome-linux.zip?alt=media -O $CHROMIUM_ZIP; fi
- unzip -q $CHROMIUM_ZIP
2017-02-16 11:14:00 -08:00
- OLD_VERSION=`mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -Ev "(^\[|Download\w+:)"`
2017-02-16 11:20:49 -08:00
- NEW_VERSION=${OLD_VERSION%-SNAPSHOT}-dev-`printf %d $TRAVIS_BUILD_NUMBER`
2017-02-16 11:09:10 -08:00
- echo "Building version $NEW_VERSION"
2017-02-16 10:37:42 -08:00
- mvn versions:set -DnewVersion=$NEW_VERSION
2017-04-22 02:13:51 -07:00
2017-02-18 09:18:17 -08:00
install :
- mvn install -Dteavm.build.all=false -P with-idea -DskipTests=true -Dmaven.javadoc.skip=true -B -V
2017-04-22 01:32:46 -07:00
- pushd tests/src/test/js
2017-04-22 01:45:28 -07:00
- npm config set prefix=$HOME/.node_modules
- npm install
2017-04-22 01:32:46 -07:00
- npm run build
- popd
2017-04-22 02:13:51 -07:00
2017-04-22 01:32:46 -07:00
script :
2017-04-22 02:13:51 -07:00
- mvn -e test -P \!htmlUnit
2017-04-22 01:32:46 -07:00
- BASE_PATH=`pwd`
- pushd tests/src/test/js
2017-04-22 03:00:12 -07:00
- $BASE_PATH/chrome-linux/chrome --headless --remote-debugging-port=9222 --disable-gpu about:blank &
2017-04-22 01:32:46 -07:00
- CHROME_PID=$!
- node start.js $BASE_PATH/tests/target/js-tests
- node start.js $BASE_PATH/html4j/target/js-tests
- kill $CHROME_PID
- popd
2017-04-22 02:13:51 -07:00
2017-02-16 10:37:42 -08:00
after_success : >
2017-02-16 11:55:30 -08:00
if [[ "${TRAVIS_PULL_REQUEST:-unknown}" == "false" && $TRAVIS_BRANCH == dev-* ]] ; then
2017-02-18 09:18:17 -08:00
export NEW_VERSION
export TEAVM_FTP_HOST
export TEAVM_FTP_LOGIN
export TEAVM_FTP_PASSWORD
2017-02-18 12:50:31 -08:00
mvn deploy -Dteavm.build.all=false -DskipTests --settings travis-settings.xml -P deploy-to-bintray -P with-idea && \
2017-02-18 09:18:17 -08:00
./update-idea-repository.sh
2017-02-16 10:37:42 -08:00
fi
2015-10-09 22:55:22 -07:00
after_script :
2015-10-10 01:38:00 -07:00
- rm -rf $HOME/.m2/repository/org/teavm