teavm/.travis.yml

59 lines
1.7 KiB
YAML
Raw Normal View History

2015-10-10 13:25:51 +08:00
language: java
jdk:
- oraclejdk8
cache:
directories:
- $HOME/.m2
- $HOME/.node_modules
- $HOME/.chromium_dist
branches:
only:
- master
- travis
- /^release-.+$/
2017-02-17 03:55:30 +08:00
- /^dev-.+/
before_install:
- nvm install 7
2017-04-22 19:17:23 +08:00
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
2017-04-22 19:14:50 +08:00
- export DISPLAY=:99.0
- sudo dpkg -i google-chrome*.deb
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- OLD_VERSION=`mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -Ev "(^\[|Download\w+:)"`
- NEW_VERSION=${OLD_VERSION%-SNAPSHOT}-dev-`printf %d $TRAVIS_BUILD_NUMBER`
- echo "Building version $NEW_VERSION"
- mvn versions:set -DnewVersion=$NEW_VERSION
2017-02-19 01:18:17 +08:00
install:
- mvn install -Dteavm.build.all=false -P with-idea -DskipTests=true -Dmaven.javadoc.skip=true -B -V
- pushd tests/src/test/js
2017-04-22 16:45:28 +08:00
- npm config set prefix=$HOME/.node_modules
- npm install
- npm run build
- popd
script:
2017-04-22 19:14:50 +08:00
- mvn -e test -P \!htmlUnit
- BASE_PATH=`pwd`
2017-04-22 19:14:50 +08:00
- pushd tests/src/test/js
- $CHROME_BIN --remote-debugging-port=9222 --disable-gpu about:blank &
- CHROME_PID=$!
- node start.js $BASE_PATH/tests/target/js-tests
- node start.js $BASE_PATH/html4j/target/js-tests
- kill $CHROME_PID
- popd
after_success: >
2017-02-17 03:55:30 +08:00
if [[ "${TRAVIS_PULL_REQUEST:-unknown}" == "false" && $TRAVIS_BRANCH == dev-* ]] ; then
2017-02-19 01:18:17 +08:00
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 && \
2017-02-19 01:18:17 +08:00
./update-idea-repository.sh
fi
after_script:
2015-10-10 16:38:00 +08:00
- rm -rf $HOME/.m2/repository/org/teavm