forked from graphhopper/graphhopper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (50 loc) · 2.43 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
language: java
sudo: false
env:
global:
- GPG_EXECUTABLE=gpg
# TODO move this into the travis settings
- secure: "j6a61/qnfFcSjx5XxmxO2hqBOwtVx5HWrD1+4Atl7WG/pRKz9+jSga1Y7oDAFb2SIl8S65kDmPQB/vC8aHxUDj/Wizjxnxn1FhPqoe9yO6Ztft+984FKFyvj7s6tsBJKcehGec+chTOwZQpH4oI4rU6IlepDHnGLHiOd0Iviryg="
- secure: "GiFr+v2lTQk/sTQB7CYjju1/mupS8LSJupmizLqY454utiZkabDMBOZQnF9ukpy7WhveB9hKQyEKf9iP2w7HSYEjgvogT26vZ5f2MeLnR4SWvqEtf/WBvvh+W+k/rb2f6YgitkB4Jlxn2izemBEDuKplGJphzGW41lf8XZ2IxVI="
dist: trusty
group: edge
jdk:
- oraclejdk8
- oraclejdk9
- openjdk8
# matrix:
# allow_failures:
# - jdk: oraclejdk9
# avoid default dependency command for maven, 'true' means 'return true' and continue
install: true
# store them into travis via https://dracoblue.net/dev/uploading-snapshots-and-releases-to-maven-central-with-travis/
# gpg -a --export-secret-keys [email protected] | base64 -w 0
# gpg --export-ownertrust | base64 -w 0
before_install:
- if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
# avoid increase of memory via travis https://github.com/travis-ci/travis-ci/issues/8408
before_script:
- _JAVA_OPTIONS=
# Undo `_JAVA_OPTIONS` environment variable; see https://github.com/travis-ci/travis-ci/issues/8408
before_script:
- _JAVA_OPTIONS=
script:
- "mvn --version && mvn clean test verify checkstyle:check findbugs:check forbiddenapis:check -B"
after_success:
# deploy snapshot artifacts to sonatype and if tagged deploy the release to maven central
- if [ "$TRAVIS_JDK_VERSION" == "openjdk8" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
mvn deploy --settings core/files/settings.xml -DskipTests=true -B;
elif [ "$TRAVIS_JDK_VERSION" == "openjdk8" ] && [ "$TRAVIS_TAG" != "" ]; then
echo "release to maven central";
mvn versions:set -DnewVersion=$TRAVIS_TAG -DgenerateBackupPoms=false;
mvn deploy -P release --settings core/files/settings.xml -DskipTests=true -B;
else
echo "Not deploying artifacts for $TRAVIS_BRANCH";
fi
notifications:
email:
- secure: l7/fjqL0c/9UcULXdhaKxsroZMg07nfNDiOHRBf7YKf8wrKdH52Z5kP7E10+a8iD/ieLD+ZaZPlom1bE7HymE1bVkp3d17Ezha47W5sdyOOb3NBDpg8olS4TkehOKo3AQhLXSfF6QGtipxY8Iy9QknXHngQOrcoGYiOlzCZ3BTQ=
cache:
directories:
- $HOME/.m2