mirror of
https://github.com/konsoletyper/teavm.git
synced 2024-11-21 01:00:54 +08:00
57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
language: java
|
|
jdk:
|
|
- oraclejdk8
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.m2
|
|
- $HOME/.node_modules
|
|
- $HOME/.chromium_dist
|
|
branches:
|
|
only:
|
|
- master
|
|
- /^release-.+$/
|
|
- /^dev-.+/
|
|
|
|
before_install:
|
|
- nvm install 7
|
|
- CHROMIUM_BUILD=466537
|
|
- mkdir -p $HOME/.chromium_dist/
|
|
- 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
|
|
- 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
|
|
|
|
install:
|
|
- mvn install -Dteavm.build.all=false -P with-idea -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
|
|
|
|
script:
|
|
- mvn -e test -P \!htmlUnit
|
|
- BASE_PATH=`pwd`
|
|
- pushd tests/src/test/js
|
|
- $BASE_PATH/chrome-linux/chrome --headless --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: >
|
|
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 && \
|
|
./update-idea-repository.sh
|
|
fi
|
|
after_script:
|
|
- rm -rf $HOME/.m2/repository/org/teavm |