eagler-teavm-fork/.travis.yml

80 lines
2.3 KiB
YAML
Raw Normal View History

2015-10-09 22:25:51 -07:00
language: java
2017-04-22 08:57:06 -07:00
sudo: false
addons:
chrome: stable
2017-04-22 08:57:06 -07:00
2015-10-09 22:25:51 -07:00
jdk:
- oraclejdk11
cache:
directories:
2018-10-26 03:54:42 -07:00
- $HOME/mvn_repo
- $HOME/.node_modules
branches:
only:
- master
- travis
- /^release-.+$/
2017-02-16 11:55:30 -08:00
- /^dev-.+/
before_install:
- export MVN_CMD="mvn -Dmaven.repo.local=$HOME/mvn_repo -B"
- nvm install 7
2018-10-26 04:51:37 -07:00
- 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`
2018-01-10 13:21:18 -08:00
- 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
2018-10-26 03:54:42 -07:00
- rm -rf $HOME/.phpenv
- rm -rf $HOME/.rvm
- rm -rf $HOME/.m2
2017-02-18 09:18:17 -08:00
install:
- pushd tests/src/test/js
2017-04-22 01:45:28 -07:00
- npm config set prefix=$HOME/.node_modules
- npm install
- npm run build
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 index.html &
- BROWSER_PID=$!
- node start.js test
- node ./bin/test-chrome.js
- kill $BROWSER_PID
- popd
2018-10-26 04:51:37 -07:00
- rm -rf tools/idea/idea-artifacts/dependencies
script:
- $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
- BASE_PATH=`pwd`
2017-04-22 04:14:50 -07:00
- pushd tests/src/test/js
- google-chrome-stable --headless --disable-gpu index.html &
- BROWSER_PID=$!
2017-04-22 04:14:50 -07:00
- node start.js $BASE_PATH/tests/target/js-tests
- node start.js $BASE_PATH/html4j/target/js-tests
- kill $BROWSER_PID
2017-04-22 04:14:50 -07:00
- popd
- rm -rf $BASE_PATH/tests/target/js-tests
- rm -rf $BASE_PATH/html4j/target/js-tests
2018-10-26 09:13:04 -07:00
- du -sh $HOME/.[!.]* /home/travis/* | sort -h
- df
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 FTP_HOST
export FTP_PORT
2019-04-03 02:04:48 -07:00
export FTP_USER
export FTP_PATH
export SSH_KEY
2018-10-26 09:13:04 -07:00
mv -f $HOME/built_artifacts_backup $HOME/mvn_repo/org/teavm
$MVN_CMD deploy -Dteavm.build.all=false -DskipTests --settings travis-settings.xml \
2018-10-26 09:45:24 -07:00
-P deploy-to-bintray -P with-idea -P !download-dependencies && \
./upload-files.sh
fi
before_cache:
2018-10-26 09:13:04 -07:00
- mv -f $HOME/mvn_repo/org/teavm $HOME/built_artifacts_backup