forked from eclipse/scanning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
80 lines (63 loc) · 2.8 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
dist: trusty
sudo: required
# SonarQube
# See https://docs.travis-ci.com/user/sonarqube/
addons:
sonarqube:
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_install:
- chmod +x ./org.eclipse.scanning.releng/build/commit-msg.sh
- bash ./org.eclipse.scanning.releng/build/commit-msg.sh
# Stat 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 as per the travis docs
- "/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=master 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/[email protected]:/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 -q clean install surefire:test -Dtest.includes=org/eclipse/scanning/**/Suite.java
- mvn -q surefire:test -Dtest.includes=org/eclipse/scanning/**/UISuite.java -Dlog4j.configuration=log4j.properties
- sonar-scanner