/
.travis.yml
78 lines (64 loc) · 2.32 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
language: java
jdk:
- openjdk8
addons:
apt:
packages:
- graphviz
- libalut0
- dbus-x11
- tidy
- pulseaudio-module-x11
firefox: latest
chrome: beta
services:
- xvfb
before_install:
# ensure no unwanted defaults are set
# see https://github.com/travis-ci/travis-ci/issues/4613#issuecomment-181845546
- export MAVEN_SKIP_RC="true"
# install graphviz on macOS
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install graphviz ; fi
install:
- mvn verify -DskipTests=true -Dmaven.javadoc.skip=true -B -V
before_script:
# start audio services
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then start-pulseaudio-x11 ; fi
# silence errors from firefox about dbus.
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dbus-launch ; fi
# install Code Climate test coverage reporter
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- if [[ "$PRINT_SUMMARY" == "false" ]] ; then travis_wait 50 ./scripts/travis.sh ; else ./scripts/travis.sh ; fi
cache:
directories:
- $HOME/.m2
os:
- linux
# - osx # temporarilly disabled -- its more complex than originally anticipated to do conditional matrixes based on PR/push differentiation
dist: xenial
sudo: required
env:
global:
# false to silence most maven output; true to catch tests that do not complete
- PRINT_SUMMARY=true
- MAVEN_OPTS=-Xmx1536m
# see http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#runOrder for valid values
- RUN_ORDER=filesystem
- CC_TEST_REPORTER_ID=b584d95af6e0716d39b5117f5cbd365af573363628a7848b92b297a93c55fa42
matrix:
- HEADLESS=false STATIC=false
- HEADLESS=true STATIC=false
- HEADLESS=true STATIC=true
matrix:
exclude:
- os: osx
env: HEADLESS=true STATIC=true
- os: osx
env: HEADLESS=true STATIC=false
after_success:
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$HEADLESS" == "false" ]] ; then mvn jacoco:report coveralls:report -U -P travis-coverage ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$HEADLESS" == "false" ]] ; then JACOCO_SOURCE_PATH=java/src ./cc-test-reporter format-coverage target/site/jacoco/jacoco.xml --input-type jacoco ; ./cc-test-reporter upload-coverage ; fi