2015-10-10 13:25:51 +08:00
|
|
|
language: java
|
2017-04-22 23:57:06 +08:00
|
|
|
sudo: false
|
|
|
|
|
|
|
|
addons:
|
|
|
|
firefox: "53.0"
|
|
|
|
|
2015-10-10 13:25:51 +08:00
|
|
|
jdk:
|
2015-10-10 13:55:22 +08:00
|
|
|
- oraclejdk8
|
2017-04-22 17:13:51 +08:00
|
|
|
|
2015-10-10 13:55:22 +08:00
|
|
|
cache:
|
|
|
|
directories:
|
2018-10-26 18:54:42 +08:00
|
|
|
- $HOME/mvn_repo
|
2017-04-22 16:32:46 +08:00
|
|
|
- $HOME/.node_modules
|
2015-10-13 01:51:46 +08:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
2017-04-22 20:45:34 +08:00
|
|
|
- travis
|
2015-10-13 01:51:46 +08:00
|
|
|
- /^release-.+$/
|
2017-02-17 03:55:30 +08:00
|
|
|
- /^dev-.+/
|
2017-04-22 17:13:51 +08:00
|
|
|
|
2017-02-17 02:37:42 +08:00
|
|
|
before_install:
|
2018-10-26 21:10:36 +08:00
|
|
|
- export MVN_CMD="mvn -Dmaven.repo.local=$HOME/mvn_repo -B"
|
2017-04-22 17:13:51 +08:00
|
|
|
- nvm install 7
|
2018-10-26 19:51:37 +08:00
|
|
|
- OLD_VERSION=`$MVN_CMD help:evaluate -Dexpression=project.version 2>/dev/null | grep -Ev "(^\[|Download)"`
|
2018-01-11 04:51:53 +08:00
|
|
|
- BASE_VERSION=${OLD_VERSION%-SNAPSHOT}
|
|
|
|
- NEW_VERSION=${BASE_VERSION}-dev-`printf %d $TRAVIS_BUILD_NUMBER`
|
2018-01-11 05:21:18 +08:00
|
|
|
- ECLIPSE_VERSION=${BASE_VERSION}.dev_`printf %d $TRAVIS_BUILD_NUMBER`
|
2018-01-01 20:05:30 +08:00
|
|
|
- export NEW_VERSION
|
2018-01-11 04:51:53 +08:00
|
|
|
- export ECLIPSE_VERSION
|
|
|
|
- export BASE_VERSION
|
2017-02-17 03:09:10 +08:00
|
|
|
- echo "Building version $NEW_VERSION"
|
2018-01-11 04:51:53 +08:00
|
|
|
- ./set-version.sh $NEW_VERSION $ECLIPSE_VERSION
|
2018-10-26 18:54:42 +08:00
|
|
|
- rm -rf $HOME/.phpenv
|
|
|
|
- rm -rf $HOME/.rvm
|
|
|
|
- rm -rf $HOME/.m2
|
2017-04-22 17:13:51 +08:00
|
|
|
|
2017-02-19 01:18:17 +08:00
|
|
|
install:
|
2017-04-22 16:32:46 +08:00
|
|
|
- pushd tests/src/test/js
|
2017-04-22 16:45:28 +08:00
|
|
|
- npm config set prefix=$HOME/.node_modules
|
|
|
|
- npm install
|
2017-04-22 16:32:46 +08:00
|
|
|
- npm run build
|
|
|
|
- popd
|
2018-10-26 19:51:37 +08:00
|
|
|
- rm -rf tools/idea/idea-artifacts/dependencies
|
2017-04-22 17:13:51 +08:00
|
|
|
|
2017-04-22 16:32:46 +08:00
|
|
|
script:
|
2018-11-26 16:40:58 +08:00
|
|
|
- $MVN_CMD -e install -Dteavm.junit.optimized=false -Dteavm.junit.js.decodeStack=false -P with-idea -P with-cli -Dteavm.junit.js.runner=none -V
|
2017-04-22 16:32:46 +08:00
|
|
|
- BASE_PATH=`pwd`
|
2017-04-22 19:14:50 +08:00
|
|
|
- pushd tests/src/test/js
|
2017-07-04 11:02:13 +08:00
|
|
|
- "export DISPLAY=:99.0"
|
|
|
|
- "sh -e /etc/init.d/xvfb start"
|
2017-07-02 21:25:11 +08:00
|
|
|
- sleep 10
|
2017-04-23 01:33:21 +08:00
|
|
|
- firefox index.html &
|
2017-04-22 23:18:00 +08:00
|
|
|
- FIREFOX_PID=$!
|
2017-04-22 19:14:50 +08:00
|
|
|
- node start.js $BASE_PATH/tests/target/js-tests
|
|
|
|
- node start.js $BASE_PATH/html4j/target/js-tests
|
2017-04-22 23:18:00 +08:00
|
|
|
- kill $FIREFOX_PID
|
2017-04-22 19:14:50 +08:00
|
|
|
- popd
|
2018-10-25 19:02:49 +08:00
|
|
|
- rm -rf $BASE_PATH/tests/target/js-tests
|
|
|
|
- rm -rf $BASE_PATH/html4j/target/js-tests
|
2018-10-27 00:13:04 +08:00
|
|
|
- du -sh $HOME/.[!.]* /home/travis/* | sort -h
|
2018-10-25 23:49:23 +08:00
|
|
|
- df
|
2017-04-22 17:13:51 +08:00
|
|
|
|
2017-02-17 02:37:42 +08:00
|
|
|
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
|
2018-10-27 00:13:04 +08:00
|
|
|
mv -f $HOME/built_artifacts_backup $HOME/mvn_repo/org/teavm
|
2018-10-26 21:10:36 +08:00
|
|
|
$MVN_CMD deploy -Dteavm.build.all=false -DskipTests --settings travis-settings.xml \
|
2018-10-27 00:45:24 +08:00
|
|
|
-P deploy-to-bintray -P with-idea -P !download-dependencies && \
|
2018-10-26 21:10:36 +08:00
|
|
|
./upload-files.sh
|
2017-02-17 02:37:42 +08:00
|
|
|
fi
|
2018-10-26 21:10:36 +08:00
|
|
|
before_cache:
|
2018-10-27 00:13:04 +08:00
|
|
|
- mv -f $HOME/mvn_repo/org/teavm $HOME/built_artifacts_backup
|