-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
85 lines (69 loc) · 3.22 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
80
81
82
83
84
85
dist: trusty
sudo: required
group: deprecated-2017Q2
# SonarCloud
# See https://docs.travis-ci.com/user/sonarcloud/
addons:
sonarcloud:
token:
# See https://travis-ci.org/eclipse/scanning/settings, here be variables
# SONAR_TOKEN = SONAR_GITHUB_TOKEN = The sonar token at https://sonarqube.com/account/security/
secure: $SONAR_TOKEN
github_token:
# See https://travis-ci.org/eclipse/scanning/settings, here be variables
# GITHUB_READ_REPO = https://github.com/settings/tokens sonarqube-travis token ('repo' and 'admin:repo_hook' permissions)
secure: $GITHUB_READ_REPO
language: java
# Makes build faster to cache maven things.
cache:
directories:
- .autoconf
- $HOME/.m2
services:
- docker
# whitelist
branches:
only:
- master
jdk:
- oraclejdk8
# Handle git submodules manually
git:
submodules: false
before_script:
# Start Xvfb, this allows SWTBot to execute in tests.
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
before_install:
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
# Clone the extra repos.
- git clone --depth=50 --branch=master https://github.com/eclipse/richbeans.git ../../eclipse/org.eclipse.richbeans
- git clone --depth=50 --branch=master https://github.com/eclipse/dawnsci.git ../../eclipse/org.eclipse.dawnsci
- git clone --depth=50 --branch=master https://github.com/DawnScience/dawn-hdf.git ../../dawn-hdf
# Just needed for travis build, not if making an IDE version. No need to copy this if doing
# a manual checkout because uk.ac.diamond.jython is in the target or an appropriate OSGi jython bundle.
- git clone --depth=50 --branch=gda-9.5 https://github.com/openGDA/diamond-jython.git ../../diamond-jython
# Only needed for submodules which we are not currently using.
# Replace the SSH URL with the public URL, then initialize submodules
# - sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
# - git submodule update --init --recursive
# Run the build from org.eclipse.scanning
install:
- cd ../../eclipse
- mv ../eclipse/scanning org.eclipse.scanning
- cd org.eclipse.scanning
# Set LD_LIBRARY_PATH for the tests. Also set a variable that attempts to clear /tmp on the travis node to avoid it getting large
env:
- CLEAR_TMP=true LD_LIBRARY_PATH=/home/travis/build/dawn-hdf/hdf.hdf5lib/lib/linux-x86_64
# compile and test
script:
- mvn -T 4 -q clean install
- mvn -q surefire:test -Dtest.includes=org/eclipse/scanning/**/Suite.java
- mvn -q surefire:test -Dtest.includes=org/eclipse/scanning/**/UISuite.java -Dlog4j.configuration=log4j.properties
# Exclude external modules from sonar, to prevent `should be relative to project baseDir` error in travis
# see https://stackoverflow.com/q/46243616/42473
# Add never fail to the sonar scan job so that the failure when processing a pull request from a forked repository
# doesn't block those pull requests from ever being merged. This also prevents pull requests which touch lots of files
# from being blocked due to there being too many existing critical or blocker sonar issues.
- mvn -e -P !externalModules --fail-never sonar:sonar