forked from konsoletyper/teavm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
79 lines (72 loc) · 2.33 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
language: java
sudo: false
addons:
chrome: stable
jdk:
- oraclejdk11
cache:
directories:
- $HOME/mvn_repo
- $HOME/.node_modules
branches:
only:
- master
- travis
- /^release-.+$/
- /^dev-.+/
before_install:
- export MVN_CMD="mvn -Dmaven.repo.local=$HOME/mvn_repo -B"
- nvm install 7
- 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`
- 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
- rm -rf $HOME/.phpenv
- rm -rf $HOME/.rvm
- rm -rf $HOME/.m2
install:
- pushd tests/src/test/js
- 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
- 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`
- pushd tests/src/test/js
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 index.html &
- BROWSER_PID=$!
- node start.js $BASE_PATH/tests/target/js-tests
- node start.js $BASE_PATH/html4j/target/js-tests
- kill $BROWSER_PID
- popd
- rm -rf $BASE_PATH/tests/target/js-tests
- rm -rf $BASE_PATH/html4j/target/js-tests
- du -sh $HOME/.[!.]* /home/travis/* | sort -h
- df
after_success: >
if [[ "${TRAVIS_PULL_REQUEST:-unknown}" == "false" && $TRAVIS_BRANCH == dev-* ]] ; then
export NEW_VERSION
export FTP_HOST
export FTP_PORT
export FTP_USER
export FTP_PATH
export SSH_KEY
mv -f $HOME/built_artifacts_backup $HOME/mvn_repo/org/teavm
$MVN_CMD deploy -Dteavm.build.all=false -DskipTests --settings travis-settings.xml \
-P deploy-to-bintray -P with-idea -P with-cli -P !download-dependencies && \
./upload-files.sh
fi
before_cache:
- mv -f $HOME/mvn_repo/org/teavm $HOME/built_artifacts_backup